From 46cc4bc4c5cf84a1b679b4341dc9e08fadfda40e Mon Sep 17 00:00:00 2001 From: Cody Jackson Date: Wed, 15 Jan 2025 09:52:41 -0700 Subject: [PATCH] Converting the management cluster list and detail pages to be paginated fixes #9548 --- shell/config/product/manager.js | 20 +- shell/config/settings.ts | 2 +- .../detail/provisioning.cattle.io.cluster.vue | 454 +++++++----------- shell/list/provisioning.cattle.io.cluster.vue | 328 ++++++++++--- shell/mixins/resource-fetch-api-pagination.js | 5 +- shell/plugins/dashboard-store/actions.js | 15 + shell/plugins/steve/steve-pagination-utils.ts | 9 +- shell/utils/cluster.js | 22 +- shell/utils/settings.ts | 6 +- 9 files changed, 489 insertions(+), 372 deletions(-) diff --git a/shell/config/product/manager.js b/shell/config/product/manager.js index 5de1739ef0c..f343e380ac1 100644 --- a/shell/config/product/manager.js +++ b/shell/config/product/manager.js @@ -14,6 +14,16 @@ import { BLANK_CLUSTER } from '@shell/store/store-types.js'; export const NAME = 'manager'; +export const MACHINE_SUMMARY = { + name: 'summary', + labelKey: 'tableHeaders.machines', + sort: false, + search: false, + formatter: 'MachineSummaryGraph', + align: 'center', + width: 100, +}; + export function init(store) { const { product, @@ -162,16 +172,6 @@ export function init(store) { weightGroup('advanced', -1, true); - const MACHINE_SUMMARY = { - name: 'summary', - labelKey: 'tableHeaders.machines', - sort: false, - search: false, - formatter: 'MachineSummaryGraph', - align: 'center', - width: 100, - }; - headers(CAPI.RANCHER_CLUSTER, [ STATE, { diff --git a/shell/config/settings.ts b/shell/config/settings.ts index 43c76e5bec3..edf34cb2f80 100644 --- a/shell/config/settings.ts +++ b/shell/config/settings.ts @@ -278,7 +278,7 @@ export const DEFAULT_PERF_SETTING: PerfSettings = { enableAll: false, enableSome: { enabled: [ - { resource: CAPI.RANCHER_CLUSTER, context: ['home', 'side-bar'] }, + { resource: CAPI.RANCHER_CLUSTER, context: ['home', 'side-bar', 'provisioning.cattle.io.clusters'] }, { resource: MANAGEMENT.CLUSTER, context: ['side-bar'] }, ], generic: false, diff --git a/shell/detail/provisioning.cattle.io.cluster.vue b/shell/detail/provisioning.cattle.io.cluster.vue index 9131596a572..b07d7300e08 100644 --- a/shell/detail/provisioning.cattle.io.cluster.vue +++ b/shell/detail/provisioning.cattle.io.cluster.vue @@ -1,12 +1,9 @@ @@ -750,8 +620,7 @@ export default { :label-key="value.isCustom ? 'cluster.tabs.machines' : 'cluster.tabs.machinePools'" :weight="4" > - - - - + - - - - + + +