diff --git a/src/pages/MachineDashboard/index.module.less b/src/pages/MachineDashboard/index.module.less index f5c70bf7..372adcd8 100644 --- a/src/pages/MachineDashboard/index.module.less +++ b/src/pages/MachineDashboard/index.module.less @@ -53,9 +53,17 @@ } .singelNodeMonitor { + background-color: #fff; + background-color: #fff; + box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.08); + padding: 16px; margin: 24px 0; +} + +.singelNodeMonitorHeader { display: flex; justify-content: space-between; + margin-bottom: 24px; } .monitorTitle { diff --git a/src/pages/MachineDashboard/index.tsx b/src/pages/MachineDashboard/index.tsx index 3f6e48e9..9c71a022 100644 --- a/src/pages/MachineDashboard/index.tsx +++ b/src/pages/MachineDashboard/index.tsx @@ -212,7 +212,7 @@ function MachineDashboard(props: IProps) { metricRefs[key] = ref} @@ -236,50 +236,44 @@ function MachineDashboard(props: IProps) {
-
{intl.get('device.nodeResource.singleNodeTitle')}
-
- - +
+
{intl.get('device.nodeResource.singleNodeTitle')}
+
+ + + { + instanceList.map((instance: string) => ( + + )) + } + +
+
+ + + + + info.host === curInstance)} /> + + + + + + + + +
{ - instanceList.map((instance: string) => ( - - )) + renderCardContent() } - - -
+
+
- - - - - info.host === curInstance)} /> - - - - - - - - -
- { - renderCardContent() - } -
-
); } diff --git a/src/store/models/machine.ts b/src/store/models/machine.ts index cc02f7d0..d59de5b5 100644 --- a/src/store/models/machine.ts +++ b/src/store/models/machine.ts @@ -10,15 +10,6 @@ import { getQueryRangeInfo } from '@/utils'; const PROMQL = LINUX; export interface IState { - cpuStat: IStatRangeItem[]; - diskStat: IStatRangeItem[]; - memoryStat: IStatRangeItem[]; - loadStat: IStatRangeItem[]; - networkOutStat: IStatRangeItem[]; - networkInStat: IStatRangeItem[]; - networkStat: IStatRangeItem[]; - memorySizeStat: IStatSingleItem[]; - diskSizeStat: IStatSingleItem[]; instanceList: string[]; metricsFilterValues: MetricsPanelValue; } @@ -26,15 +17,6 @@ export interface IState { export function MachineModelWrapper(service,) { return createModel({ state: { - cpuStat: [] as IStatRangeItem[], - diskStat: [] as IStatRangeItem[], - memoryStat: [] as IStatRangeItem[], - networkOutStat: [] as IStatRangeItem[], - networkInStat: [] as IStatRangeItem[], - networkStat: [] as IStatRangeItem[], - loadStat: [] as IStatRangeItem[], - memorySizeStat: [] as IStatSingleItem[], - diskSizeStat: [] as IStatSingleItem[], instanceList: [] as string[], metricsFilterValues: InitMachineMetricsFilterValues, }, @@ -95,9 +77,6 @@ export function MachineModelWrapper(service,) { ...payload, nameObj: getMetricsUniqName(MetricScene.CPU) }); - this.update({ - cpuStat, - }); return cpuStat; }, @@ -111,9 +90,6 @@ export function MachineModelWrapper(service,) { ...payload, nameObj: getMetricsUniqName(MetricScene.MEMORY) }); - this.update({ - memoryStat, - }); return memoryStat; }, @@ -126,9 +102,6 @@ export function MachineModelWrapper(service,) { if (code === 0) { memorySizeStat = data.result; } - this.update({ - memorySizeStat, - }); return memorySizeStat; }, @@ -142,9 +115,6 @@ export function MachineModelWrapper(service,) { ...payload, nameObj: getMetricsUniqName(MetricScene.DISK) }); - this.update({ - diskStat, - }); return diskStat; }, @@ -157,9 +127,6 @@ export function MachineModelWrapper(service,) { if (code === 0) { diskSizeStat = data.result; } - this.update({ - diskSizeStat, - }); return diskSizeStat; }, @@ -173,9 +140,6 @@ export function MachineModelWrapper(service,) { ...payload, nameObj: getMetricsUniqName(MetricScene.LOAD) }); - this.update({ - loadStat, - }); return loadStat; }, @@ -188,22 +152,6 @@ export function MachineModelWrapper(service,) { }) { const { start, end, metric, clusterID, inOrOut } = payload; let networkStat = await this.asyncGetMetricsData({ start, end, metric, clusterID, nameObj: getMetricsUniqName(MetricScene.NETWORK) }); - switch (inOrOut) { - case 'in': - this.update({ - networkInStat: networkStat, - }); - break; - case 'out': - this.update({ - networkOutStat: networkStat, - }); - break; - default: - this.update({ - networkStat, - }); - } return networkStat; }, diff --git a/src/utils/index.ts b/src/utils/index.ts index 10cbc136..7c7fb1fc 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -88,11 +88,6 @@ export class LocalStorageStorageUtil { } } -export const clearNebulaConnection = () => { - SessionStorageUtil.removeItem('nebulaConnect'); - cookies.remove('nsid'); -} - export const getMenuPathByKey = (menuList: any[], activeKey: string): string[] => { let path: string[] = []; for(let i = 0; i < menuList.length; i++) {