From 24cdeceda4a5deceb67a03a21882a8e9a92b6aab Mon Sep 17 00:00:00 2001 From: Yuqiu Wang Date: Fri, 26 Feb 2021 11:18:53 -0500 Subject: [PATCH] add padding, percentage, and memory chart --- client/src/views/prometheusgraph.tsx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/client/src/views/prometheusgraph.tsx b/client/src/views/prometheusgraph.tsx index 49cbb9d..4dce78f 100644 --- a/client/src/views/prometheusgraph.tsx +++ b/client/src/views/prometheusgraph.tsx @@ -8,6 +8,7 @@ const isDev = process.env.NODE_ENV !== 'production'; const BASE_HTTP_URL = isDev && hostname === 'localhost' ? 'http://localhost:57008' : ''; const GRAPH_QUERIES = [ 'instance:node_cpu:ratio', + 'instance:node_memory_utilisation:ratio', ]; @@ -56,14 +57,23 @@ export default class PrometheusGraph extends Base { return
Pending...
; } return this.state.data.get(value) - &&
+ &&
+ ${value} + data={this.state.data.get(value)} + onNearestXY={(datapoint) => { + return
+ {datapoint.x}
+ {datapoint.y} +
; + }} + /> { />
;