From 88eb44ccc659a755cda239cd0209bdcab423ef9c Mon Sep 17 00:00:00 2001 From: Wangjunqi123 Date: Wed, 15 Nov 2023 14:36:25 +0800 Subject: [PATCH] add charts store --- web/src/stores/charts.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/web/src/stores/charts.ts b/web/src/stores/charts.ts index b3d9c2c..1421d6c 100644 --- a/web/src/stores/charts.ts +++ b/web/src/stores/charts.ts @@ -6,7 +6,7 @@ export const useLayoutStore = defineStore('layoutOption', { return { layout_option: [ { - x: 4, y: 0, w: 2, h: 4, i: '3', + x: 0, y: 0, w: 2, h: 4, i: '3', static: true, display: true, title: 'CPU总使用率', query: { sqls: [{ sql: '100 - (avg(irate(node_cpu_seconds_total{instance="{macIp}",mode="idle"}[5m])) * 100)' }], @@ -19,6 +19,20 @@ export const useLayoutStore = defineStore('layoutOption', { ] } }, + // { + // x: 1, y: 0, w: 2, h: 4, i: '5', + // static: false, display: true, title: '内存使用率', + // query: { + // sqls: [{ sql: '(1 - (node_memory_MemAvailable_bytes{instance="{macIp}"} / (node_memory_MemTotal_bytes{instance="{macIp}"})))* 100' }], + // type: 'gauge', range: false, isChart: true, interval: 5, + // target: 'percent_series', unit: '%', float: 2, min: 0, max: 100, + // color: [ + // [0.8, '#67e0e3'], + // [0.9, '#E6A23C'], + // [1, '#fd666d'] + // ] + // } + // }, ], }; }, -- Gitee