fix(grafana): avoid empty financial readiness stat
This commit is contained in:
@@ -51,35 +51,33 @@
|
|||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"color": "red",
|
"color": "orange",
|
||||||
"value": null
|
"value": null
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"color": "orange",
|
|
||||||
"value": 1
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"color": "green",
|
"color": "green",
|
||||||
"value": 2
|
"value": 1
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"mappings": [
|
"mappings": [
|
||||||
{
|
{
|
||||||
|
"type": "value",
|
||||||
"options": {
|
"options": {
|
||||||
"empty": {
|
"0": {
|
||||||
"text": "EMPTY"
|
"text": "proxy_only",
|
||||||
|
"color": "orange",
|
||||||
|
"index": 0
|
||||||
},
|
},
|
||||||
"ledger_ready": {
|
"1": {
|
||||||
"text": "LEDGER READY"
|
"text": "ledger_ready",
|
||||||
},
|
"color": "green",
|
||||||
"proxy_only": {
|
"index": 1
|
||||||
"text": "PROXY ONLY"
|
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"type": "value"
|
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"displayName": "Статус"
|
||||||
},
|
},
|
||||||
"overrides": []
|
"overrides": []
|
||||||
},
|
},
|
||||||
@@ -102,7 +100,8 @@
|
|||||||
"fields": "",
|
"fields": "",
|
||||||
"values": false
|
"values": false
|
||||||
},
|
},
|
||||||
"textMode": "auto"
|
"textMode": "value",
|
||||||
|
"noValue": "proxy_only"
|
||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
@@ -114,7 +113,7 @@
|
|||||||
"format": 1,
|
"format": 1,
|
||||||
"pluginVersion": "11.2.2",
|
"pluginVersion": "11.2.2",
|
||||||
"queryType": "table",
|
"queryType": "table",
|
||||||
"rawSql": "SELECT readiness_status AS value FROM analytics_1c.v_financial_reporting_readiness",
|
"rawSql": "SELECT value FROM (SELECT if(readiness_status = 'ledger_ready', 1, 0) AS value, 1 AS priority FROM analytics_1c.v_financial_reporting_readiness UNION ALL SELECT 0 AS value, 2 AS priority) ORDER BY priority LIMIT 1",
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user