Skip to content

Commit

Permalink
Converting the management cluster list and detail pages to be paginated
Browse files Browse the repository at this point in the history
  • Loading branch information
codyrancher committed Jan 28, 2025
1 parent 0cd9bff commit 3259fb7
Show file tree
Hide file tree
Showing 9 changed files with 557 additions and 375 deletions.
20 changes: 10 additions & 10 deletions shell/config/product/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
{
Expand Down
4 changes: 3 additions & 1 deletion shell/config/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,10 @@ 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'] },
{ resource: CAPI.MACHINE, context: ['provisioning.cattle.io.clusters', 'provisioning.cattle.io.cluster'] },
{ resource: MANAGEMENT.NODE_TEMPLATE, context: ['provisioning.cattle.io.clusters', 'provisioning.cattle.io.cluster'] }
],
generic: false,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ describe('view: provisioning.cattle.io.cluster', () => {
getters: {
'management/canList': () => true,
'management/schemaFor': jest.fn(),
'management/all': (type: string) => (type === 'cluster.x-k8s.io.machine') ? [] : undefined,
'i18n/t': (text: string) => text,
t: (text: string) => text,
currentStore: () => 'current_store',
Expand Down
Loading

0 comments on commit 3259fb7

Please sign in to comment.