feat(dashboardapi): MGC template polish — group-level only + dashed bounds (#40)
- config/machineGroup.json: every non-row panel now annotated with meta.emittedFields (mode, scaling, abs/relDistFromPeak, flow.total/group, power.total/group). Per-pump fields (ctrl, state, runtime, pressure, temperature) deliberately absent — those live on rotatingMachine children per #39's no-data-duplication contract. - Timeseries panels gain byRegexp dashed-bounds overrides for .min$/.max$ (same pattern as #38). - test/basic/slice40-mgc-template.basic.test.js: 4 cases — no per-pump fields leak in, every non-row annotated, dashed overrides present on TS, composer dedup applies when a child claims an MGC-level field. Closes #40
This commit is contained in:
@@ -122,7 +122,12 @@
|
||||
}
|
||||
],
|
||||
"title": "Scaling",
|
||||
"type": "stat"
|
||||
"type": "stat",
|
||||
"meta": {
|
||||
"emittedFields": [
|
||||
"scaling"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
@@ -174,7 +179,12 @@
|
||||
}
|
||||
],
|
||||
"title": "Abs Dist Peak",
|
||||
"type": "stat"
|
||||
"type": "stat",
|
||||
"meta": {
|
||||
"emittedFields": [
|
||||
"absDistFromPeak"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
@@ -227,7 +237,12 @@
|
||||
}
|
||||
],
|
||||
"title": "Rel Dist Peak",
|
||||
"type": "stat"
|
||||
"type": "stat",
|
||||
"meta": {
|
||||
"emittedFields": [
|
||||
"relDistFromPeak"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"gridPos": {
|
||||
@@ -253,7 +268,58 @@
|
||||
"fillOpacity": 10
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byRegexp",
|
||||
"options": ".+\\.min$"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.lineStyle",
|
||||
"value": {
|
||||
"fill": "dash",
|
||||
"dash": [
|
||||
10,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"mode": "fixed",
|
||||
"fixedColor": "orange"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byRegexp",
|
||||
"options": ".+\\.max$"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.lineStyle",
|
||||
"value": {
|
||||
"fill": "dash",
|
||||
"dash": [
|
||||
10,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"mode": "fixed",
|
||||
"fixedColor": "red"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
@@ -278,7 +344,13 @@
|
||||
}
|
||||
],
|
||||
"title": "Total Flow",
|
||||
"type": "timeseries"
|
||||
"type": "timeseries",
|
||||
"meta": {
|
||||
"emittedFields": [
|
||||
"flow.total",
|
||||
"flow.group"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
@@ -293,7 +365,58 @@
|
||||
"fillOpacity": 10
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byRegexp",
|
||||
"options": ".+\\.min$"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.lineStyle",
|
||||
"value": {
|
||||
"fill": "dash",
|
||||
"dash": [
|
||||
10,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"mode": "fixed",
|
||||
"fixedColor": "orange"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byRegexp",
|
||||
"options": ".+\\.max$"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.lineStyle",
|
||||
"value": {
|
||||
"fill": "dash",
|
||||
"dash": [
|
||||
10,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"mode": "fixed",
|
||||
"fixedColor": "red"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
@@ -318,7 +441,13 @@
|
||||
}
|
||||
],
|
||||
"title": "Total Power",
|
||||
"type": "timeseries"
|
||||
"type": "timeseries",
|
||||
"meta": {
|
||||
"emittedFields": [
|
||||
"power.total",
|
||||
"power.group"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"schemaVersion": 39,
|
||||
|
||||
Reference in New Issue
Block a user