From 6ab15763ff66fe3dea7db679b7289b70a2dd2ed1 Mon Sep 17 00:00:00 2001 From: Manuel Date: Fri, 9 Sep 2022 21:09:47 +0200 Subject: [PATCH 1/9] =?UTF-8?q?=F0=9F=90=9B=20fix=20dash.=20layout=20bugs?= =?UTF-8?q?=20&=20compact=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/dashdot/DashdotModule.tsx | 31 +++++++++++---------------- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/src/modules/dashdot/DashdotModule.tsx b/src/modules/dashdot/DashdotModule.tsx index ddbc03d712f..b3b89adbdce 100644 --- a/src/modules/dashdot/DashdotModule.tsx +++ b/src/modules/dashdot/DashdotModule.tsx @@ -28,13 +28,7 @@ export const DashdotModule = asModule({ graphs: { name: 'descriptor.settings.graphs.label', value: ['CPU', 'RAM', 'Storage', 'Network'], - options: [ - 'CPU', - 'RAM', - 'Storage', - 'Network', - 'GPU', - ], + options: ['CPU', 'RAM', 'Storage', 'Network', 'GPU'], }, url: { name: 'descriptor.settings.url.label', @@ -126,8 +120,7 @@ export function DashdotComponent() { const { classes } = useStyles(); const { colorScheme } = useMantineColorScheme(); - const dashConfig = config.modules?.[DashdotModule.id] - .options as typeof DashdotModule['options']; + const dashConfig = config.modules?.[DashdotModule.id].options as typeof DashdotModule['options']; const isCompact = dashConfig?.useCompactView?.value ?? false; const dashdotService: serviceItem | undefined = config.services.filter( (service) => service.type === 'Dash.' @@ -159,7 +152,7 @@ export function DashdotComponent() { }, }, { - name: t('card.graphs.cpu.title'), + name: t('card.graphs.storage.title'), enabled: storageEnabled && !isCompact, params: { multiView: dashConfig?.storageMultiView?.value ?? false, @@ -222,19 +215,21 @@ export function DashdotComponent() { {graphs.map((graph) => ( - + {graph.name}