differentiate between cancelled and fulfilled orders in dashboard

This commit is contained in:
lza_menace 2020-09-09 22:50:09 -07:00
parent a3cd63d82f
commit 3ebc756a53

View file

@ -116,6 +116,11 @@
},
{
"alias": "C Fulfilled Orders",
"color": "rgb(251, 251, 251)",
"pointradius": 3
},
{
"alias": "D Cancelled Orders",
"color": "rgb(0, 0, 0)",
"pointradius": 3
}
@ -262,7 +267,7 @@
"hide": false,
"metricColumn": "uuid",
"rawQuery": false,
"rawSql": "SELECT\n $__timeGroupAlias(date,$__interval,NULL),\n uuid AS metric,\n avg(price) AS \"Fulfilled Orders\"\nFROM \"order\"\nWHERE\n $__timeFilter(date) AND\n active = 'false'\nGROUP BY 1,2\nORDER BY 1,2",
"rawSql": "SELECT\n $__timeGroupAlias(date,$__interval,NULL),\n uuid AS metric,\n avg(price) AS \"Fulfilled Orders\"\nFROM \"order\"\nWHERE\n $__timeFilter(date) AND\n active = 'false' AND\n cancelled = 'false'\nGROUP BY 1,2\nORDER BY 1,2",
"refId": "C",
"select": [
[
@ -304,6 +309,85 @@
"'false'"
],
"type": "expression"
},
{
"datatype": "bool",
"name": "",
"params": [
"cancelled",
"=",
"'false'"
],
"type": "expression"
}
]
},
{
"format": "table",
"group": [
{
"params": [
"$__interval",
"NULL"
],
"type": "time"
}
],
"hide": false,
"metricColumn": "uuid",
"rawQuery": false,
"rawSql": "SELECT\n $__timeGroupAlias(date,$__interval,NULL),\n uuid AS metric,\n avg(price) AS \"Cancelled Orders\"\nFROM \"order\"\nWHERE\n $__timeFilter(date) AND\n active = 'false' AND\n cancelled = 'true'\nGROUP BY 1,2\nORDER BY 1,2",
"refId": "D",
"select": [
[
{
"params": [
"price"
],
"type": "column"
},
{
"params": [
"avg"
],
"type": "aggregate"
},
{
"params": [
"Cancelled Orders"
],
"type": "alias"
}
]
],
"table": "\"order\"",
"timeColumn": "date",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
},
{
"datatype": "bool",
"name": "",
"params": [
"active",
"=",
"'false'"
],
"type": "expression"
},
{
"datatype": "bool",
"name": "",
"params": [
"cancelled",
"=",
"'true'"
],
"type": "expression"
}
]
}
@ -1816,7 +1900,7 @@
}
}
],
"refresh": "30s",
"refresh": false,
"schemaVersion": 21,
"style": "dark",
"tags": [],
@ -1851,8 +1935,8 @@
]
},
"time": {
"from": "now-1h",
"to": "now"
"from": "2020-09-09T16:37:16.064Z",
"to": "2020-09-09T19:07:27.592Z"
},
"timepicker": {
"refresh_intervals": [
@ -1871,5 +1955,5 @@
"timezone": "",
"title": "XMR",
"uid": "SKVAcXDGk",
"version": 7
"version": 8
}