Test case for multiple targets with hidden

I was trying to figure out how to do multiple target calculations with
hidden targets.  I didn't see this explicitly tested for, so add it.

Change-Id: Ibbbb2810dd531e792f11c07946c21829fcdbe0a1
This commit is contained in:
Ian Wienand 2018-06-04 15:51:41 +10:00
parent 2da2da1a9a
commit f02241f8de
2 changed files with 77 additions and 0 deletions

View File

@ -0,0 +1,58 @@
{
"dashboard": {
"new-dashboard": {
"rows": [
{
"collapse": false,
"editable": true,
"height": "250px",
"panels": [
{
"bars": false,
"datasource": "graphite",
"editable": true,
"error": false,
"fill": 1,
"lines": true,
"linewidth": 2,
"percentage": false,
"pointradius": 5,
"points": false,
"span": 12,
"stack": false,
"steppedLine": false,
"targets": [
{
"hide": true,
"refId": "A",
"target": "stats.gauges.afs.afs01_dfw_openstack_org.part.vicepa.total"
},
{
"hide": false,
"refId": "B",
"target": "divideSeries(stats.gauges.afs.afs01_dfw_openstack_org.part.vicpa.used, #A)"
}
],
"title": "no title (click here)",
"type": "graph",
"x-axis": true,
"y-axis": true
}
],
"showTitle": false,
"title": "New row"
}
],
"templating": {
"enabled": false,
"list": []
},
"time": {
"from": "2018-02-07T08:42:27.000Z",
"to": "2018-02-07T13:48:32.000Z"
},
"timezone": "utc",
"title": "New dashboard"
}
}
}

View File

@ -0,0 +1,19 @@
dashboard:
time:
from: "2018-02-07T08:42:27.000Z"
to: "2018-02-07T13:48:32.000Z"
title: New dashboard
rows:
- title: New row
height: 250px
panels:
- title: no title (click here)
type: graph
datasource: graphite
targets:
- target: "stats.gauges.afs.afs01_dfw_openstack_org.part.vicepa.total"
refId: "A"
hide: true
- target: "divideSeries(stats.gauges.afs.afs01_dfw_openstack_org.part.vicpa.used, #A)"
refId: "B"
hide: false