mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 15:35:55 +01:00
fix: move enabled options to multi-select
This commit is contained in:
@@ -25,25 +25,10 @@ export const DashdotModule = asModule({
|
|||||||
name: 'Use Compact View',
|
name: 'Use Compact View',
|
||||||
value: false,
|
value: false,
|
||||||
},
|
},
|
||||||
showCpu: {
|
graphs: {
|
||||||
name: 'Show CPU Graph',
|
name: 'Graphs',
|
||||||
value: true,
|
value: ['CPU', 'RAM', 'Storage', 'Network'],
|
||||||
},
|
options: ['CPU', 'RAM', 'Storage', 'Network', 'GPU'],
|
||||||
showStorage: {
|
|
||||||
name: 'Show Storage Graph',
|
|
||||||
value: true,
|
|
||||||
},
|
|
||||||
showRam: {
|
|
||||||
name: 'Show RAM Graph',
|
|
||||||
value: true,
|
|
||||||
},
|
|
||||||
showNetwork: {
|
|
||||||
name: 'Show Network Graphs',
|
|
||||||
value: true,
|
|
||||||
},
|
|
||||||
showGpu: {
|
|
||||||
name: 'Show GPU Graph',
|
|
||||||
value: false,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -135,11 +120,12 @@ export function DashdotComponent() {
|
|||||||
const isCompact = dashConfig?.useCompactView?.value ?? false;
|
const isCompact = dashConfig?.useCompactView?.value ?? false;
|
||||||
const dashdotService = config.services.filter((service) => service.type === 'Dash.')[0];
|
const dashdotService = config.services.filter((service) => service.type === 'Dash.')[0];
|
||||||
|
|
||||||
const cpuEnabled = dashConfig?.showCpu?.value ?? true;
|
const enabledGraphs = dashConfig?.graphs?.value ?? ['CPU', 'RAM', 'Storage', 'Network'];
|
||||||
const storageEnabled = dashConfig?.showStorage?.value ?? true;
|
const cpuEnabled = enabledGraphs.includes('CPU');
|
||||||
const ramEnabled = dashConfig?.showRam?.value ?? true;
|
const storageEnabled = enabledGraphs.includes('Storage');
|
||||||
const networkEnabled = dashConfig?.showNetwork?.value ?? true;
|
const ramEnabled = enabledGraphs.includes('RAM');
|
||||||
const gpuEnabled = dashConfig?.showGpu?.value ?? false;
|
const networkEnabled = enabledGraphs.includes('Network');
|
||||||
|
const gpuEnabled = enabledGraphs.includes('GPU');
|
||||||
|
|
||||||
const info = useJson(dashdotService, '/info');
|
const info = useJson(dashdotService, '/info');
|
||||||
const storageLoad = useJson(dashdotService, '/load/storage');
|
const storageLoad = useJson(dashdotService, '/load/storage');
|
||||||
|
|||||||
Reference in New Issue
Block a user