From 55a634be16e4bcb11c0068fe0de44b2712895d27 Mon Sep 17 00:00:00 2001 From: bowen tan Date: Wed, 30 Oct 2024 17:16:09 +0800 Subject: [PATCH] feat: WorkloadPodsTable add loading --- .../WorkloadPodsTable/WorkloadPodsTable.tsx | 6 +++- .../refine/src/pages/nodes/show/index.tsx | 30 +++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/packages/refine/src/components/WorkloadPodsTable/WorkloadPodsTable.tsx b/packages/refine/src/components/WorkloadPodsTable/WorkloadPodsTable.tsx index 60f23077..200d2db4 100644 --- a/packages/refine/src/components/WorkloadPodsTable/WorkloadPodsTable.tsx +++ b/packages/refine/src/components/WorkloadPodsTable/WorkloadPodsTable.tsx @@ -1,4 +1,4 @@ -import { Space } from '@cloudtower/eagle'; +import { Loading, Space } from '@cloudtower/eagle'; import { css } from '@linaria/core'; import { LabelSelector } from 'kubernetes-types/meta/v1'; import React, { useState, useContext } from 'react'; @@ -73,6 +73,10 @@ export const WorkloadPodsTable: React.FC = ({ } }); + if (tableProps.loading) { + return ; + } + if (tableProps.data?.length === 0) { return = () => { ConditionsGroup(i18n), ], }, + { + key: 'pods', + title: 'Pod', + groups: [ + { + areas: [ + { + fields: [ + { + key: 'pods', + path: [], + renderContent: (_, record) => { + return ( +
+ pod.spec?.nodeName === record.name} + namespace={record.metadata.namespace} + hideToolbar + /> +
+ ); + }, + }, + ], + }, + ], + }, + ], + }, ], }} Dropdown={K8sDropdown}