Skip to content

Commit 75d9a83

Browse files
committed
chore: use page size options from common lib
1 parent 7e7ef70 commit 75d9a83

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

src/components/ResourceBrowser/Constants.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,6 @@ export const RESOURCE_EMPTY_PAGE_STATE = {
252252
}`,
253253
}
254254

255-
export const RESOURCE_PAGE_SIZE_OPTIONS = [
256-
{ value: 100, selected: true },
257-
{ value: 150, selected: false },
258-
{ value: 200, selected: false },
259-
]
260-
261255
export const TRYING_TO_CONNECT = 'Trying to connect to the Kubernetes cluster and fetch resources.'
262256
export const TAKING_LONGER_TO_CONNECT =
263257
'It is taking longer than usual to connect to the cluster. If cluster is reachable it may take up to 30 seconds.'

src/components/ResourceBrowser/ResourceList/K8SResourceList.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { useLocation, useParams } from 'react-router-dom'
2020
import {
2121
abortPreviousRequests,
2222
FiltersTypeEnum,
23+
LARGE_PAGE_SIZE_OPTIONS,
2324
Nodes,
2425
PaginationEnum,
2526
SelectAllDialogStatus,
@@ -37,7 +38,7 @@ import {
3738
updateManifestResourceHelmApps,
3839
} from '@Components/v2/appDetails/k8Resource/nodeDetail/nodeDetail.api'
3940

40-
import { NODE_LIST_HEADERS_TO_KEY_MAP, RESOURCE_PAGE_SIZE_OPTIONS } from '../Constants'
41+
import { NODE_LIST_HEADERS_TO_KEY_MAP } from '../Constants'
4142
import { getResourceData } from '../ResourceBrowser.service'
4243
import { K8SResourceListType } from '../Types'
4344
import K8sResourceListTableCellComponent from './K8sResourceListTableCellComponent'
@@ -277,7 +278,7 @@ export const K8SResourceList = ({
277278
id="table__gvk-resource-list"
278279
additionalFilterProps={{
279280
parseSearchParams: parseK8sResourceListSearchParams,
280-
defaultPageSize: RESOURCE_PAGE_SIZE_OPTIONS[0].value,
281+
defaultPageSize: LARGE_PAGE_SIZE_OPTIONS[0].value,
281282
initialSortKey: getDefaultSortKey(),
282283
}}
283284
ViewWrapper={K8SResourceListViewWrapper}
@@ -293,7 +294,7 @@ export const K8SResourceList = ({
293294
reloadResourceListData: handleClearCacheAndReload,
294295
clusterName: selectedCluster?.label ?? '',
295296
}}
296-
pageSizeOptions={!isNodeListing ? RESOURCE_PAGE_SIZE_OPTIONS : undefined}
297+
pageSizeOptions={!isNodeListing ? LARGE_PAGE_SIZE_OPTIONS : undefined}
297298
/>
298299
)
299300
}

src/components/common/DynamicTabs/useTabs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export function useTabs(persistenceKey: string, fallbackTabIndex = FALLBACK_TAB)
207207
(tab) => tab.id === MONITORING_DASHBOARD_TAB_ID,
208208
)
209209

210-
if (!!resourceRecommenderInitTab && monitoringTabIndex > -1) {
210+
if (monitoringTabIndex > -1) {
211211
parsedTabsData.data[persistenceKey].splice(
212212
monitoringTabIndex + 1,
213213
0,

0 commit comments

Comments
 (0)