Adding color code thresholds to standalone GUI to match Grafana

Signed-off-by: coleramos425 <colramos@amd.com>
Tá an tiomantas seo le fáil i:
coleramos425 tiomanta 2023-08-30 16:24:42 -05:00
1 tuismitheoir 44b05c06b3
tiomantas 6461df96e8
1 comhad athraithe
+27 -1
+27 -1
Féach ar an gComhad
@@ -365,7 +365,33 @@ def build_table_chart(
if IS_DARK
else {},
style_data_conditional=[
{"if": {"row_index": "odd"}, "backgroundColor": "rgb(60, 60, 60)"}
{"if": {"row_index": "odd"}, "backgroundColor": "rgb(60, 60, 60)"},
{
"if": {"column_id": "PoP", "filter_query": "{PoP} > 50"},
"backgroundColor": "#ffa90a",
"color": "white",
},
{
"if": {"column_id": "PoP", "filter_query": "{PoP} > 80"},
"backgroundColor": "#ff120a",
"color": "white",
},
{
"if": {
"column_id": "Avg",
"filter_query": "{Unit} = Pct && {Avg} > 50",
},
"backgroundColor": "#ffa90a",
"color": "white",
},
{
"if": {
"column_id": "Avg",
"filter_query": "{Unit} = Pct && {Avg} > 80",
},
"backgroundColor": "#ff120a",
"color": "white",
},
]
if IS_DARK
else [],