From 08be856f6aea3d2f38210e81d6a0863d5dd0116c Mon Sep 17 00:00:00 2001 From: Athrun Date: Sat, 19 Apr 2025 17:18:33 +0200 Subject: [PATCH] Update 06_account_stats.json added "values: true" to separate the reasons in legend remove "1" in group by else it wouldn't group correctly "group by mode" in variable, because it was getting every value instead of unique ones --- default_files/grafana/06_account_stats.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/default_files/grafana/06_account_stats.json b/default_files/grafana/06_account_stats.json index 7ce2abe..00eec09 100644 --- a/default_files/grafana/06_account_stats.json +++ b/default_files/grafana/06_account_stats.json @@ -2668,6 +2668,7 @@ }, "pieType": "pie", "reduceOptions": { + "values": true, "calcs": [ "sum" ], @@ -2690,7 +2691,7 @@ "editorMode": "code", "format": "table", "rawQuery": true, - "rawSql": "select\r\n$__timeGroup(session_end,$interval) as 'time',\r\ncase\r\n when reason_for_session_end like 'ErrGo failed to detect lineup for invasion%' then 'ErrGo failed to detect lineup for invasion' \r\n when reason_for_session_end='ErrDisabled' and (json_extract(counts, '$.METHOD_ENCOUNTER') is not NULL or json_extract(counts, '$.METHOD_GET_MAP_OBJECTS') is not NULL) then 'ErrDisabled'\r\n when reason_for_session_end='ErrDisabled' and (json_extract(counts, '$.METHOD_ENCOUNTER') is NULL and json_extract(counts, '$.METHOD_GET_MAP_OBJECTS') is NULL) then 'instantRotation (rpc18?)'\r\n else reason_for_session_end\r\nend as 'reason_end',\r\ncount(reason_for_session_end) as '.'\r\nfrom stats_accounts\r\nwhere\r\n$__timeFilter(session_end) and mode in ($mode)\r\nGROUP BY 1,reason_end\r\nORDER BY 1", + "rawSql": "select\r\n$__timeGroup(session_end,$interval) as 'time',\r\ncase\r\n when reason_for_session_end like 'ErrGo failed to detect lineup for invasion%' then 'ErrGo failed to detect lineup for invasion' \r\n when reason_for_session_end='ErrDisabled' and (json_extract(counts, '$.METHOD_ENCOUNTER') is not NULL or json_extract(counts, '$.METHOD_GET_MAP_OBJECTS') is not NULL) then 'ErrDisabled'\r\n when reason_for_session_end='ErrDisabled' and (json_extract(counts, '$.METHOD_ENCOUNTER') is NULL and json_extract(counts, '$.METHOD_GET_MAP_OBJECTS') is NULL) then 'instantRotation (rpc18?)'\r\n else reason_for_session_end\r\nend as 'reason_end',\r\ncount(reason_for_session_end) as '.'\r\nfrom stats_accounts\r\nwhere\r\n$__timeFilter(session_end) and mode in ($mode)\r\nGROUP BY reason_end\r\nORDER BY 1", "refId": "A", "sql": { "columns": [ @@ -2779,7 +2780,7 @@ "multi": true, "name": "mode", "options": [], - "query": "select mode from stats_accounts", + "query": "select mode from stats_accounts group by mode", "refresh": 1, "regex": "", "sort": 1,