Skip to content

Commit

Permalink
Adding color code thresholds to standalone GUI to match Grafana
Browse files Browse the repository at this point in the history
Signed-off-by: coleramos425 <colramos@amd.com>
  • Loading branch information
coleramos425 committed Aug 30, 2023
1 parent 44b05c0 commit 6461df9
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion src/omniperf_analyze/utils/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 [],
Expand Down

0 comments on commit 6461df9

Please sign in to comment.