🐛 do not translate params for dashdot

* fix for #444

* Revert "fix for #444"

This reverts commit 3927198617.

* use id instead of name for param
This commit is contained in:
Raphaël Catarino
2022-09-19 21:13:39 +02:00
committed by GitHub
parent be233c24b2
commit 2ee2c70e9e

View File

@@ -145,6 +145,7 @@ export function DashdotComponent() {
const graphs = [ const graphs = [
{ {
id: 'cpu',
name: t('card.graphs.cpu.title'), name: t('card.graphs.cpu.title'),
enabled: cpuEnabled, enabled: cpuEnabled,
params: { params: {
@@ -152,6 +153,7 @@ export function DashdotComponent() {
}, },
}, },
{ {
id: 'storage',
name: t('card.graphs.storage.title'), name: t('card.graphs.storage.title'),
enabled: storageEnabled && !isCompact, enabled: storageEnabled && !isCompact,
params: { params: {
@@ -159,15 +161,18 @@ export function DashdotComponent() {
}, },
}, },
{ {
id: 'ram',
name: t('card.graphs.memory.title'), name: t('card.graphs.memory.title'),
enabled: ramEnabled, enabled: ramEnabled,
}, },
{ {
id: 'network',
name: t('card.graphs.network.title'), name: t('card.graphs.network.title'),
enabled: networkEnabled, enabled: networkEnabled,
spanTwo: true, spanTwo: true,
}, },
{ {
id: 'gpu',
name: t('card.graphs.gpu.title'), name: t('card.graphs.gpu.title'),
enabled: gpuEnabled, enabled: gpuEnabled,
spanTwo: true, spanTwo: true,
@@ -232,7 +237,7 @@ export function DashdotComponent() {
className={classes.iframe} className={classes.iframe}
key={graph.name} key={graph.name}
title={graph.name} title={graph.name}
src={`${dashdotUrl}?singleGraphMode=true&graph=${graph.name.toLowerCase()}&theme=${colorScheme}&surface=${(colorScheme === src={`${dashdotUrl}?singleGraphMode=true&graph=${graph.id.toLowerCase()}&theme=${colorScheme}&surface=${(colorScheme ===
'dark' 'dark'
? theme.colors.dark[7] ? theme.colors.dark[7]
: theme.colors.gray[0] : theme.colors.gray[0]