Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions web/src/pages/EdgesPage/EdgesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { isPresent } from '../../shared/defguard-ui/utils/isPresent';
import { openModal } from '../../shared/hooks/modalControls/modalsSubjects';
import { ModalName } from '../../shared/hooks/modalControls/modalTypes';
import { getEdgesQueryOptions, getLicenseInfoQueryOptions } from '../../shared/query';
import { tableSortingFns } from '../../shared/utils/dateSortingFn';
import { displayDate } from '../../shared/utils/displayDate';
import { canUseEnterpriseFeature, licenseActionCheck } from '../../shared/utils/license';

Expand Down Expand Up @@ -168,6 +169,8 @@ export const EdgesTable = () => {
minSize: 175,
header: m.edges_col_last_modified(),
enableSorting: true,
// @ts-expect-error
sortingFn: 'dateIso',
cell: (info) => (
<TableCell>
<span>{displayDate(info.getValue())}</span>
Expand Down Expand Up @@ -269,6 +272,7 @@ export const EdgesTable = () => {
},
],
},
sortingFns: tableSortingFns,
columns,
data: transformedData,
enableRowSelection: false,
Expand Down
5 changes: 5 additions & 0 deletions web/src/pages/LocationsPage/components/GatewaysTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { Snackbar } from '../../../shared/defguard-ui/providers/snackbar/snackba
import { openModal } from '../../../shared/hooks/modalControls/modalsSubjects';
import { ModalName } from '../../../shared/hooks/modalControls/modalTypes';
import { getGatewaysQueryOptions } from '../../../shared/query';
import { tableSortingFns } from '../../../shared/utils/dateSortingFn';
import { displayDate } from '../../../shared/utils/displayDate';

type RowData = GatewayInfo;
Expand Down Expand Up @@ -155,6 +156,8 @@ export const GatewaysTable = () => {
minSize: 175,
header: m.edges_col_last_modified(),
enableSorting: true,
// @ts-expect-error
sortingFn: 'dateIso',
cell: (info) => (
<TableCell>
<span>{displayDate(info.getValue())}</span>
Expand All @@ -177,6 +180,7 @@ export const GatewaysTable = () => {
header: m.gateway_col_used_in_location(),
size: 220,
minSize: 200,
sortingFn: 'text',
meta: {
flex: true,
},
Expand Down Expand Up @@ -263,6 +267,7 @@ export const GatewaysTable = () => {
},
],
},
sortingFns: tableSortingFns,
columns,
data: transformedData,
enableRowSelection: false,
Expand Down
1 change: 1 addition & 0 deletions web/src/pages/LocationsPage/components/LocationsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ export const LocationsTable = () => {
columnHelper.accessor('location_mfa_mode', {
header: m.location_col_mfa(),
minSize: 100,
sortingFn: 'text',
cell: (info) => {
switch (info.getValue()) {
case 'disabled':
Expand Down
3 changes: 3 additions & 0 deletions web/src/pages/NetworkDevicesPage/NetworkDevicesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export const NetworkDevicesTable = ({ networkDevices }: Props) => {
header: m.form_label_location(),
size: 225,
minSize: 175,
sortingFn: 'text',
cell: (info) => (
<TableCell>
<span>{info.getValue()}</span>
Expand All @@ -143,6 +144,7 @@ export const NetworkDevicesTable = ({ networkDevices }: Props) => {
header: m.form_label_description(),
size: 300,
minSize: 250,
sortingFn: 'text',
cell: (info) => (
<TableCell>
<span>{info.getValue()}</span>
Expand All @@ -153,6 +155,7 @@ export const NetworkDevicesTable = ({ networkDevices }: Props) => {
header: m.network_devices_col_added_by(),
size: 140,
minSize: 100,
sortingFn: 'text',
cell: (info) => (
<TableCell>
<span>{info.getValue()}</span>
Expand Down
4 changes: 4 additions & 0 deletions web/src/pages/RulesPage/RulesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import { TableCell } from '../../shared/defguard-ui/components/table/TableCell/T
import { TableEditCell } from '../../shared/defguard-ui/components/table/TableEditCell/TableEditCell';
import { TableTop } from '../../shared/defguard-ui/components/table/TableTop/TableTop';
import { Snackbar } from '../../shared/defguard-ui/providers/snackbar/snackbar';
import { tableSortingFns } from '../../shared/utils/dateSortingFn';
import { displayDate } from '../../shared/utils/displayDate';
import { canUseBusinessFeature, licenseActionCheck } from '../../shared/utils/license';

Expand Down Expand Up @@ -245,6 +246,8 @@ export const RulesTable = ({
minSize: 175,
header: m.edges_col_last_modified(),
enableSorting: true,
// @ts-expect-error
sortingFn: 'dateIso',
cell: (info) => (
<TableCell>
<span>{displayDate(info.getValue())}</span>
Expand Down Expand Up @@ -396,6 +399,7 @@ export const RulesTable = ({
},
],
},
sortingFns: tableSortingFns,
columns,
data: visibleRules,
enableRowSelection: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const ProfileApiTokensTable = () => {
() => [
columnHelper.accessor('name', {
enableSorting: true,
sortingFn: 'text',
header: m.profile_api_tokens_col_name(),
minSize: 300,
meta: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export const ProfileAuthKeysTable = () => {
columnHelper.accessor('name', {
header: m.profile_auth_keys_table_col_name(),
enableSorting: true,
sortingFn: 'text',
minSize: 200,
size: 200,
meta: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ const DevicesTable = ({ rowData }: { rowData: RowData[] }) => {
size: 300,
minSize: 300,
enableSorting: true,
sortingFn: 'text',
meta: {
flex: true,
},
Expand Down
Loading