Skip to content
Open
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
2 changes: 0 additions & 2 deletions dashboard/src/components/TreeListingPage/TreeTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ import type { ListingTableColumnMeta } from '@/types/table';

import { statusCountToRequiredStatusCount } from '@/utils/status';

import { MemoizedInputTime } from '@/components/InputTime';
import { shouldShowRelativeDate } from '@/lib/date';
import { valueOrEmpty } from '@/lib/string';
import { PinnedTrees } from '@/utils/constants/tables';
Expand Down Expand Up @@ -533,7 +532,6 @@ export function TreeTable({
/>
</span>
<div className="flex justify-end gap-y-2 max-[700px]:flex-wrap">
<MemoizedInputTime navigateFrom={urlFromMap.navigate} />
<ItemsPerPageSelector
table={table}
onPaginationChange={navigateWithPageSize}
Expand Down
3 changes: 0 additions & 3 deletions dashboard/src/components/TreeListingPage/TreeTableV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ import {

import type { ListingTableColumnMeta } from '@/types/table';

import { MemoizedInputTime } from '@/components/InputTime';

import QuerySwitcher from '@/components/QuerySwitcher/QuerySwitcher';
import { MemoizedSectionError } from '@/components/DetailsPages/SectionError';

Expand Down Expand Up @@ -368,7 +366,6 @@ export function TreeTableV2({
/>
</span>
<div className="flex justify-end gap-y-2 max-[700px]:flex-wrap">
<MemoizedInputTime navigateFrom={urlFromMap.navigate} />
<ItemsPerPageSelector
table={table}
onPaginationChange={navigateWithPageSize}
Expand Down
6 changes: 0 additions & 6 deletions dashboard/src/pages/Hardware/HardwareTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ import type { ListingTableColumnMeta } from '@/types/table';

import { RedirectFrom, type TFilter } from '@/types/general';

import { MemoizedInputTime } from '@/components/InputTime';
import { REDUCED_TIME_SEARCH } from '@/utils/constants/general';
import { EMPTY_VALUE } from '@/lib/string';
import { Badge } from '@/components/ui/badge';

Expand Down Expand Up @@ -490,10 +488,6 @@ export function HardwareTable({
/>
</span>
<div className="flex justify-end gap-y-2 max-[700px]:flex-wrap">
<MemoizedInputTime
navigateFrom={navigateFrom}
defaultInterval={REDUCED_TIME_SEARCH}
/>
<ItemsPerPageSelector
table={table}
onPaginationChange={navigateWithPageSize}
Expand Down
6 changes: 3 additions & 3 deletions dashboard/src/routes/_main/hardware/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ import {
type SearchSchema,
} from '@/types/general';
import {
DEFAULT_LISTING_INTERVAL_IN_DAYS,
DEFAULT_LISTING_ITEMS,
REDUCED_TIME_SEARCH,
} from '@/utils/constants/general';

const defaultValues = {
intervalInDays: REDUCED_TIME_SEARCH,
intervalInDays: DEFAULT_LISTING_INTERVAL_IN_DAYS,
hardwareSearch: '',
listingSize: DEFAULT_LISTING_ITEMS,
};

const zHardwareSchema = z.object({
intervalInDays: makeZIntervalInDays(REDUCED_TIME_SEARCH),
intervalInDays: makeZIntervalInDays(DEFAULT_LISTING_INTERVAL_IN_DAYS),
hardwareSearch: z.string().catch(''),
listingSize: zListingSize,
} satisfies SearchSchema);
Expand Down
6 changes: 3 additions & 3 deletions dashboard/src/routes/_main/hardware/v1/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ import {
type SearchSchema,
} from '@/types/general';
import {
DEFAULT_LISTING_INTERVAL_IN_DAYS,
DEFAULT_LISTING_ITEMS,
REDUCED_TIME_SEARCH,
} from '@/utils/constants/general';

const defaultValues = {
intervalInDays: REDUCED_TIME_SEARCH,
intervalInDays: DEFAULT_LISTING_INTERVAL_IN_DAYS,
hardwareSearch: '',
listingSize: DEFAULT_LISTING_ITEMS,
};

const zHardwareSchema = z.object({
intervalInDays: makeZIntervalInDays(REDUCED_TIME_SEARCH),
intervalInDays: makeZIntervalInDays(DEFAULT_LISTING_INTERVAL_IN_DAYS),
hardwareSearch: z.string().catch(''),
listingSize: zListingSize,
} satisfies SearchSchema);
Expand Down
6 changes: 3 additions & 3 deletions dashboard/src/routes/_main/hardware/v2/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ import {
type SearchSchema,
} from '@/types/general';
import {
DEFAULT_LISTING_INTERVAL_IN_DAYS,
DEFAULT_LISTING_ITEMS,
REDUCED_TIME_SEARCH,
} from '@/utils/constants/general';

const defaultValues = {
intervalInDays: REDUCED_TIME_SEARCH,
intervalInDays: DEFAULT_LISTING_INTERVAL_IN_DAYS,
hardwareSearch: '',
listingSize: DEFAULT_LISTING_ITEMS,
};

const zHardwareSchema = z.object({
intervalInDays: makeZIntervalInDays(REDUCED_TIME_SEARCH),
intervalInDays: makeZIntervalInDays(DEFAULT_LISTING_INTERVAL_IN_DAYS),
hardwareSearch: z.string().catch(''),
listingSize: zListingSize,
} satisfies SearchSchema);
Expand Down
6 changes: 3 additions & 3 deletions dashboard/src/routes/_main/tree/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ import {
type SearchSchema,
} from '@/types/general';
import {
DEFAULT_LISTING_INTERVAL_IN_DAYS,
DEFAULT_LISTING_ITEMS,
DEFAULT_TIME_SEARCH,
} from '@/utils/constants/general';

const defaultValues = {
intervalInDays: DEFAULT_TIME_SEARCH,
intervalInDays: DEFAULT_LISTING_INTERVAL_IN_DAYS,
treeSearch: '',
listingSize: DEFAULT_LISTING_ITEMS,
};

export const RootSearchSchema = z.object({
intervalInDays: makeZIntervalInDays(DEFAULT_TIME_SEARCH),
intervalInDays: makeZIntervalInDays(DEFAULT_LISTING_INTERVAL_IN_DAYS),
treeSearch: z.string().catch(''),
listingSize: zListingSize,
} satisfies SearchSchema);
Expand Down
6 changes: 3 additions & 3 deletions dashboard/src/routes/_main/tree/v1/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ import {
type SearchSchema,
} from '@/types/general';
import {
DEFAULT_LISTING_INTERVAL_IN_DAYS,
DEFAULT_LISTING_ITEMS,
DEFAULT_TIME_SEARCH,
} from '@/utils/constants/general';

const defaultValues = {
intervalInDays: DEFAULT_TIME_SEARCH,
intervalInDays: DEFAULT_LISTING_INTERVAL_IN_DAYS,
treeSearch: '',
listingSize: DEFAULT_LISTING_ITEMS,
};

export const RootSearchSchema = z.object({
intervalInDays: makeZIntervalInDays(DEFAULT_TIME_SEARCH),
intervalInDays: makeZIntervalInDays(DEFAULT_LISTING_INTERVAL_IN_DAYS),
treeSearch: z.string().catch(''),
listingSize: zListingSize,
} satisfies SearchSchema);
Expand Down
6 changes: 3 additions & 3 deletions dashboard/src/routes/_main/tree/v2/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ import {
type SearchSchema,
} from '@/types/general';
import {
DEFAULT_LISTING_INTERVAL_IN_DAYS,
DEFAULT_LISTING_ITEMS,
DEFAULT_TIME_SEARCH,
} from '@/utils/constants/general';

const defaultValues = {
intervalInDays: DEFAULT_TIME_SEARCH,
intervalInDays: DEFAULT_LISTING_INTERVAL_IN_DAYS,
treeSearch: '',
listingSize: DEFAULT_LISTING_ITEMS,
};

export const RootSearchSchema = z.object({
intervalInDays: makeZIntervalInDays(DEFAULT_TIME_SEARCH),
intervalInDays: makeZIntervalInDays(DEFAULT_LISTING_INTERVAL_IN_DAYS),
treeSearch: z.string().catch(''),
listingSize: zListingSize,
} satisfies SearchSchema);
Expand Down
1 change: 1 addition & 0 deletions dashboard/src/utils/constants/general.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ export const ItemsPerPageValues = [5, 10, 20, 30, 40, 50];
export const DEFAULT_TIME_SEARCH = 7;
export const REDUCED_TIME_SEARCH = 5;
export const DEFAULT_LISTING_ITEMS = 10;
export const DEFAULT_LISTING_INTERVAL_IN_DAYS = 30;
Loading