Skip to content

Commit

Permalink
chore: fix format of input in dashboard lint script (#5830)
Browse files Browse the repository at this point in the history
* Fix format of input in dashboard lint script

* Fix inputs on remaining dashboards
  • Loading branch information
nflaig authored Aug 1, 2023
1 parent 00b94f3 commit 6ab2f65
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 28 deletions.
8 changes: 4 additions & 4 deletions dashboards/lodestar_networking.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"type": "datasource",
"label": "Prometheus",
"description": "",
"label": "Prometheus",
"name": "DS_PROMETHEUS",
"pluginId": "prometheus",
"pluginName": "Prometheus"
"pluginName": "Prometheus",
"type": "datasource"
}
],
"annotations": {
Expand Down
8 changes: 4 additions & 4 deletions dashboards/lodestar_rest_api.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"label": "Prometheus",
"name": "DS_PROMETHEUS",
"pluginId": "prometheus",
"pluginName": "Prometheus"
"pluginName": "Prometheus",
"type": "datasource"
}
],
"annotations": {
Expand Down
12 changes: 6 additions & 6 deletions dashboards/lodestar_summary.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
"type": "datasource"
},
{
"description": "",
"label": "Beacon node job name",
"name": "VAR_BEACON_JOB",
"type": "constant",
"label": "Beacon node job name",
"value": "beacon",
"description": ""
"value": "beacon"
},
{
"description": "",
"label": "Validator client job name",
"name": "VAR_VALIDATOR_JOB",
"type": "constant",
"label": "Validator client job name",
"value": "validator",
"description": ""
"value": "validator"
}
],
"annotations": {
Expand Down
7 changes: 0 additions & 7 deletions dashboards/lodestar_sync.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@
"pluginId": "prometheus",
"pluginName": "Prometheus",
"type": "datasource"
},
{
"description": "",
"label": "Beacon node job name",
"name": "VAR_BEACON_JOB",
"type": "constant",
"value": "beacon"
}
],
"annotations": {
Expand Down
14 changes: 7 additions & 7 deletions scripts/lint-grafana-dashboard.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ export function lintGrafanaDashboard(json) {
// Always add Prometheus to __inputs
const inputs = [
{
name: variableNameDatasource,
type: "datasource",
label: "Prometheus",
description: "",
label: "Prometheus",
name: variableNameDatasource,
pluginId: "prometheus",
pluginName: "Prometheus",
type: "datasource",
},
];

Expand All @@ -112,19 +112,19 @@ export function lintGrafanaDashboard(json) {
for (const item of json.templating.list) {
if (item.query === "${VAR_BEACON_JOB}") {
inputs.push({
description: "",
label: "Beacon node job name",
name: "VAR_BEACON_JOB",
type: "constant",
label: "Beacon node job name",
value: "beacon",
description: "",
});
} else if (item.query === "${VAR_VALIDATOR_JOB}") {
inputs.push({
description: "",
label: "Validator client job name",
name: "VAR_VALIDATOR_JOB",
type: "constant",
label: "Validator client job name",
value: "validator",
description: "",
});
}
}
Expand Down

0 comments on commit 6ab2f65

Please sign in to comment.