diff --git a/dashboards/Verification/control.json b/dashboards/Verification/control-new.json similarity index 60% rename from dashboards/Verification/control.json rename to dashboards/Verification/control-new.json index 5807eb84ce01dcbca0f88395759040cfac052f65..993f624fde549997196b4d8d6abfc35135848134 100644 --- a/dashboards/Verification/control.json +++ b/dashboards/Verification/control-new.json @@ -19,7 +19,7 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 46, + "id": 153, "links": [], "panels": [ { @@ -106,7 +106,7 @@ }, "gridPos": { "h": 4, - "w": 2, + "w": 3, "x": 0, "y": 1 }, @@ -128,7 +128,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -145,62 +145,52 @@ "transparent": true, "type": "stat" }, - { - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 4, - "x": 2, - "y": 1 - }, - "id": 189, - "options": { - "alertInstanceLabelFilter": "&station", - "alertName": "", - "dashboardAlerts": false, - "folder": { - "title": "Operations", - "uid": "eemnmptod77r4e" - }, - "groupBy": [], - "groupMode": "default", - "maxItems": 20, - "showInactiveAlerts": false, - "sortOrder": 1, - "stateFilter": { - "error": true, - "firing": true, - "noData": false, - "normal": false, - "pending": true - }, - "viewMode": "list" - }, - "pluginVersion": "11.6.0", - "title": "Alarms", - "type": "alertlist" - }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, - "description": "", "fieldConfig": { "defaults": { "color": { - "mode": "thresholds" - }, + "fixedColor": "transparent", + "mode": "fixed" + }, + "custom": { + "axisPlacement": "auto", + "fillOpacity": 100, + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineWidth": 1, + "spanNulls": false + }, + "fieldMinMax": false, "mappings": [ { "options": { - "-1": { + "0": { + "color": "transparent", + "index": 0, + "text": "." + }, + "1": { "color": "dark-red", "index": 1, - "text": "Kapot / Down" + "text": "OFF" + }, + "2": { + "color": "dark-green", + "index": 2, + "text": "ON" + }, + "3": { + "color": "dark-yellow", + "index": 3, + "text": "STANDBY" } }, "type": "value" @@ -210,79 +200,466 @@ "match": "null+nan", "result": { "color": "dark-purple", - "index": 0, - "text": "NaN" + "index": 4, + "text": "---" } }, "type": "special" } ], - "min": 0, - "noValue": "???", "thresholds": { "mode": "absolute", "steps": [ { - "color": "dark-red" - }, + "color": "transparent" + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "count(ds_rcu_band_select{host=\"localhost\",family=\"RECVL\"} == 1) or on() vector(-1)" + }, + "properties": [ { - "color": "dark-purple", - "value": -1 + "id": "mappings", + "value": [ + { + "options": { + "0": { + "color": "dark-blue", + "index": 1, + "text": "not selected" + }, + "-1": { + "color": "transparent", + "index": 0, + "text": "not selected" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "color": "dark-green", + "index": 2 + }, + "to": 999 + }, + "type": "range" + } + ] }, { - "color": "dark-red", - "value": 190 + "id": "displayName", + "value": "#RCU's 10 - 90 MHz" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "count(ds_rcu_band_select{host=\"localhost\",family=\"RECVL\"} == 2) or on() vector(-1)" + }, + "properties": [ + { + "id": "displayName", + "value": "#RCU's 30 - 90 MHz" }, { - "color": "#EAB839", - "value": 200 + "id": "mappings", + "value": [ + { + "options": { + "0": { + "color": "dark-blue", + "index": 1, + "text": "not selected" + }, + "-1": { + "color": "transparent", + "index": 0, + "text": "not selected" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "color": "dark-green", + "index": 2 + }, + "to": 999 + }, + "type": "range" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "count(ds_rcu_band_select{host=\"localhost\",family=\"RECVH\"} == 2) or on() vector(-1)" + }, + "properties": [ + { + "id": "displayName", + "value": "#RCU's 110 - 190 MHz" }, { - "color": "dark-green", - "value": 220 + "id": "mappings", + "value": [ + { + "options": { + "0": { + "color": "dark-blue", + "index": 1, + "text": "not selected" + }, + "-1": { + "color": "transparent", + "index": 0, + "text": "not selected" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "color": "dark-green", + "index": 2 + }, + "to": 999 + }, + "type": "range" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "count(ds_rcu_band_select{host=\"localhost\",family=\"RECVH\"} == 4) or on() vector(-1)" + }, + "properties": [ + { + "id": "displayName", + "value": "#RCU's 210 - 240 MHz" }, { - "color": "dark-orange", - "value": 248 + "id": "mappings", + "value": [ + { + "options": { + "0": { + "color": "dark-blue", + "index": 1, + "text": "not selected" + }, + "-1": { + "color": "transparent", + "index": 0, + "text": "not selected" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "color": "dark-green", + "index": 2 + }, + "to": 999 + }, + "type": "range" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "StationState" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "color": "transparent", + "index": 0, + "text": "." + }, + "1": { + "color": "dark-red", + "index": 1, + "text": "OFF" + }, + "2": { + "color": "dark-green", + "index": 2, + "text": "ON" + }, + "3": { + "color": "dark-yellow", + "index": 3, + "text": "STANDBY" + }, + "4": { + "color": "dark-blue", + "index": 4, + "text": "HIBERNATE" + } + }, + "type": "value" + }, + { + "options": { + "match": "null+nan", + "result": { + "color": "dark-purple", + "index": 5, + "text": "---" + } + }, + "type": "special" + } + ] }, { - "color": "dark-red", - "value": 253 + "id": "custom.lineWidth", + "value": 3 } ] }, - "unit": "volt" - }, - "overrides": [] + { + "matcher": { + "id": "byName", + "options": "count(ds_running_observations{host=\"localhost\", family=\"ObservationControl\"}) or vector(0)" + }, + "properties": [ + { + "id": "displayName", + "value": "# Running Obs" + }, + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "color": "transparent", + "index": 0, + "text": "No Obs" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "color": "dark-green", + "index": 1 + }, + "to": 999999 + }, + "type": "range" + } + ] + } + ] + } + ] }, "gridPos": { - "h": 8, - "w": 2, - "x": 6, + "h": 4, + "w": 18, + "x": 3, "y": 1 }, - "id": 135, + "id": 134, "options": { - "colorMode": "background_solid", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "alignValue": "center", + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": false }, - "showPercentChange": false, + "mergeValues": true, + "rowHeight": 0.98, + "showValue": "always", + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "12.0.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "(ds_station_state{host=\"$station\",ds_station_state=\"OFF\"} * 1 )\r\n+ on(host, member) ( ds_station_state{host=\"$station\",ds_station_state=\"ON\"} * 2 )\r\n+ on(host, member) ( ds_station_state{host=\"$station\",ds_station_state=\"STANDBY\"} * 3 ) \r\n+ on(host, member) ( ds_station_state{host=\"$station\",ds_station_state=\"HIBERNATE\"} * 4 ) ", + "format": "time_series", + "hide": false, + "instant": false, + "legendFormat": "StationState", + "range": true, + "refId": "StationState" + } + ], + "title": "Station Modus", + "type": "state-timeline" + }, + { + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 3, + "x": 21, + "y": 1 + }, + "id": 171, + "options": { + "folderUID": "dem21i56idwjkd", + "includeVars": false, + "keepTime": false, + "maxItems": 10, + "query": "", + "showFolderNames": false, + "showHeadings": false, + "showRecentlyViewed": false, + "showSearch": true, + "showStarred": false, + "tags": [] + }, + "pluginVersion": "12.0.1", + "title": "Links naar panels", + "type": "dashlist" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "-1": { + "color": "dark-red", + "index": 1, + "text": "Kapot / Down" + } + }, + "type": "value" + }, + { + "options": { + "match": "null+nan", + "result": { + "color": "dark-purple", + "index": 0, + "text": "NaN" + } + }, + "type": "special" + } + ], + "min": 0, + "noValue": "???", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red" + }, + { + "color": "dark-purple", + "value": -1 + }, + { + "color": "dark-red", + "value": 190 + }, + { + "color": "#EAB839", + "value": 200 + }, + { + "color": "dark-green", + "value": 220 + }, + { + "color": "dark-orange", + "value": 248 + }, + { + "color": "dark-red", + "value": 253 + } + ] + }, + "unit": "volt" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 2, + "x": 0, + "y": 5 + }, + "id": 135, + "options": { + "colorMode": "background_solid", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, "text": { "valueSize": 20 }, "textMode": "value_and_name", "wideLayout": true }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "datasource": { @@ -384,7 +761,7 @@ "refId": "E" } ], - "title": "PCON's $station", + "title": "PCON's $station2", "type": "stat" }, { @@ -459,8 +836,8 @@ "gridPos": { "h": 4, "w": 5, - "x": 8, - "y": 1 + "x": 2, + "y": 5 }, "id": 166, "options": { @@ -481,7 +858,7 @@ "textMode": "value_and_name", "wideLayout": false }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -589,9 +966,9 @@ }, "gridPos": { "h": 2, - "w": 6, - "x": 13, - "y": 1 + "w": 5, + "x": 7, + "y": 5 }, "id": 96, "options": { @@ -612,7 +989,7 @@ "textMode": "name", "wideLayout": true }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "datasource": { @@ -735,7 +1112,7 @@ "useBackend": false } ], - "title": "Apparaat & Connectie --- H1 --- $station", + "title": "Apparaat & Connectie --- H1 --- $station2", "type": "stat" }, { @@ -810,8 +1187,8 @@ "gridPos": { "h": 8, "w": 5, - "x": 19, - "y": 1 + "x": 12, + "y": 5 }, "id": 84, "options": { @@ -834,7 +1211,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -846,10 +1223,45 @@ "refId": "A" } ], - "title": "Lijst van broken / beyond repair LBA/HBA op station $station", + "title": "Lijst van broken / beyond repair LBA/HBA op station $station2", "transparent": true, "type": "stat" }, + { + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 4, + "x": 17, + "y": 5 + }, + "id": 172, + "options": { + "alertInstanceLabelFilter": "", + "alertName": "", + "dashboardAlerts": false, + "groupBy": [], + "groupMode": "default", + "maxItems": 20, + "showInactiveAlerts": false, + "sortOrder": 5, + "stateFilter": { + "error": true, + "firing": true, + "noData": false, + "normal": false, + "pending": true, + "recovering": true + }, + "viewMode": "list" + }, + "pluginVersion": "12.0.1", + "title": "Alarmen", + "type": "alertlist" + }, { "datasource": { "type": "prometheus", @@ -929,9 +1341,9 @@ }, "gridPos": { "h": 2, - "w": 6, - "x": 13, - "y": 3 + "w": 5, + "x": 7, + "y": 7 }, "id": 95, "options": { @@ -952,7 +1364,7 @@ "textMode": "name", "wideLayout": true }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "datasource": { @@ -1075,112 +1487,7 @@ "useBackend": false } ], - "title": "Apparaat & Connectie --- H0 --- $station", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "HIBERNATE": { - "color": "orange", - "index": 1 - }, - "OFF": { - "color": "red", - "index": 0 - }, - "ON": { - "color": "dark-green", - "index": 3 - }, - "STANDBY": { - "color": "orange", - "index": 2 - } - }, - "type": "value" - } - ], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "orange" - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 2, - "x": 0, - "y": 5 - }, - "id": 183, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "center", - "orientation": "vertical", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "/^StationState$/", - "values": false - }, - "showPercentChange": false, - "textMode": "value_and_name", - "wideLayout": false - }, - "pluginVersion": "11.6.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "ds_station_state{host=\"$station\"} > 0", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "stationstate", - "range": false, - "refId": "A" - } - ], - "title": "", - "transformations": [ - { - "id": "organize", - "options": { - "excludeByName": {}, - "includeByName": {}, - "indexByName": {}, - "renameByName": { - "ds_station_state": "StationState" - } - } - } - ], - "transparent": true, + "title": "Apparaat & Connectie --- H0 --- $station2", "type": "stat" }, { @@ -1255,8 +1562,8 @@ "gridPos": { "h": 4, "w": 5, - "x": 8, - "y": 5 + "x": 2, + "y": 9 }, "id": 167, "options": { @@ -1277,7 +1584,7 @@ "textMode": "value_and_name", "wideLayout": true }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -1396,9 +1703,9 @@ }, "gridPos": { "h": 2, - "w": 6, - "x": 13, - "y": 5 + "w": 5, + "x": 7, + "y": 9 }, "id": 94, "options": { @@ -1419,7 +1726,7 @@ "textMode": "name", "wideLayout": true }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "datasource": { @@ -1542,7 +1849,7 @@ "useBackend": false } ], - "title": "Apparaat & Connectie --- L1 --- $station", + "title": "Apparaat & Connectie --- L1 --- $station2", "type": "stat" }, { @@ -1550,102 +1857,7 @@ "type": "prometheus", "uid": "prometheus" }, - "description": "Which state transition the StationManager is currently performing.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "color": "green", - "index": 0, - "text": "DONE" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "orange" - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 2, - "x": 0, - "y": 7 - }, - "id": 184, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "/^RequestedState$/", - "values": false - }, - "showPercentChange": false, - "textMode": "value_and_name", - "wideLayout": false - }, - "pluginVersion": "11.6.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "(ds_requested_station_state{host=\"$station\"} > 0) * on(host) group_right(ds_requested_station_state) (ds_station_state_transitioning{host=\"$station\"} +1 )", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "__auto", - "range": false, - "refId": "A" - } - ], - "title": "", - "transformations": [ - { - "id": "organize", - "options": { - "excludeByName": {}, - "includeByName": {}, - "indexByName": {}, - "renameByName": { - "ds_requested_station_state": "RequestedState" - } - } - } - ], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "description": "", + "description": "", "fieldConfig": { "defaults": { "color": { @@ -1747,9 +1959,9 @@ }, "gridPos": { "h": 2, - "w": 6, - "x": 13, - "y": 7 + "w": 5, + "x": 7, + "y": 11 }, "id": 93, "options": { @@ -1770,7 +1982,7 @@ "textMode": "name", "wideLayout": true }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "datasource": { @@ -1893,7 +2105,7 @@ "useBackend": false } ], - "title": "Apparaat & Connectie --- L0 --- $station", + "title": "Apparaat & Connectie --- L0 --- $station2", "type": "stat" }, { @@ -1902,7 +2114,7 @@ "h": 1, "w": 24, "x": 0, - "y": 9 + "y": 13 }, "id": 110, "panels": [ @@ -1911,98 +2123,86 @@ "type": "prometheus", "uid": "prometheus" }, + "description": "", "fieldConfig": { "defaults": {}, "overrides": [] }, "gridPos": { - "h": 4, - "w": 6, + "h": 2, + "w": 2, "x": 0, - "y": 10 + "y": 14 }, - "id": 111, + "id": 175, "options": { "buttonGroup": { - "orientation": "center", + "orientation": "left", "size": "md" }, "confirmModal": { - "body": "Are you sure you want to set this Status", + "body": "Are you sure you want to change the status", "cancel": "Cancel", "columns": { "include": [ "name", "newValue" ], - "name": "Label", - "newValue": "New Value", + "name": "Set to OK", + "newValue": "New value", "oldValue": "Old Value" }, "confirm": "Confirm", "elementDisplayMode": "modified", - "title": "Are you sure you want to set this Status" + "title": "Are you sure you want to change the status" }, "elementValueChanged": "", "elements": [ { - "allowCustomValue": false, - "background": "#ccccdc", - "fieldName": "", - "id": "statusset", - "labelBackground": "#ccccdc", - "labelColor": "#000000", + "backgroundColor": "#37872D", + "buttonLabel": "ON ", + "customCode": "", + "foregroundColor": "#ccccdc", + "id": "poweron", "labelWidth": 10, - "options": [ - { - "icon": "check", - "id": "0", - "label": "OK", - "type": "number", - "value": 0 - }, - { - "icon": "question-circle", - "id": "1", - "label": "SUSPICIOUS", - "type": "number", - "value": 1 - }, - { - "icon": "link-broken", - "id": "2", - "label": "BROKEN", - "type": "number", - "value": 2 - }, - { - "icon": "bolt", - "id": "3", - "label": "BEYOND_REPAIR", - "type": "number", - "value": 3 - } - ], - "optionsSource": "Custom", "section": "", - "showIf": "", - "title": "status", + "show": "form", + "size": "md", + "title": "Power", "tooltip": "", - "type": "select", + "type": "button", "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", "unit": "", - "value": "" + "value": "", + "variant": "custom" + }, + { + "backgroundColor": "", + "buttonLabel": "OFF", + "customCode": "", + "foregroundColor": "", + "id": "poweroff", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "14f64691-837b-4346-9804-45366a235737", + "unit": "", + "value": "", + "variant": "destructive" } ], "initial": { - "code": "", + "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", "contentType": "application/json", - "datasource": "prometheus", + "datasource": "fec5bpxn3sz5sf", "getPayload": "return {}", - "header": [], "highlight": false, "highlightColor": "red", - "method": "GET", + "method": "-", "payload": { "disableTextWrap": false, "editorMode": "code", @@ -2022,7 +2222,7 @@ "orientation": "horizontal", "padding": 10, "sectionVariant": "default", - "variant": "single" + "variant": "none" }, "reset": { "backgroundColor": "purple", @@ -2044,15 +2244,15 @@ "variant": "hidden" }, "submit": { - "backgroundColor": "purple", - "foregroundColor": "yellow", - "icon": "save", - "text": "Submit", - "variant": "primary" + "backgroundColor": "dark-green", + "foregroundColor": "text", + "icon": "power", + "text": "GOOD", + "variant": "custom" }, "sync": false, "update": { - "code": "Set\nstation = ${ station },\nantenna = ${ LBA_Antenna },\nstatusset = ${ __data.fields.status }\n\nif (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "code": "if (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", "confirm": true, "contentType": "application/json", "datasource": "fec5bpxn3sz5sf", @@ -2068,7 +2268,7 @@ "root_selector": "", "source": "url", "type": "json", - "url": "${station}/antenna/LBA/${LBA_Antenna}/status/${payload.statusset}", + "url": "${station}/antennafield/${Selection}/power/${payload.statusset}", "url_options": { "body_content_type": "text/plain", "body_type": "raw", @@ -2077,7 +2277,7 @@ } }, "payloadMode": "updated", - "url": "${station}/antenna/LBA/${LBA_Antenna}/status/${statusset}" + "url": "http://${station2}-lcu.lofar.eu:50053/v1/${station2}/antenna/LBA/${LBA_Antenna}/status/0" }, "updateEnabled": "auto" }, @@ -2088,18 +2288,13 @@ "type": "prometheus", "uid": "prometheus" }, - "disableTextWrap": false, - "editorMode": "code", - "expr": "(ds_antenna_status_int{host=\"$station\"} > 0) * on(host, member, x) ds_antenna_names_info{member=\"$LBA_Antenna\"}", - "fullMetaSearch": false, - "includeNullMetadata": true, - "legendFormat": "__auto", + "expr": "", + "instant": false, "range": true, - "refId": "A", - "useBackend": false + "refId": "A" } ], - "title": "Control - Antenna Status Set - LBA $LBA_Antenna", + "title": "", "transparent": true, "type": "volkovlabs-form-panel" }, @@ -2108,6 +2303,7 @@ "type": "prometheus", "uid": "prometheus" }, + "description": "", "fieldConfig": { "defaults": {}, "overrides": [] @@ -2115,91 +2311,78 @@ "gridPos": { "h": 2, "w": 2, - "x": 6, - "y": 10 + "x": 2, + "y": 14 }, - "id": 191, + "id": 178, "options": { "buttonGroup": { - "orientation": "left", - "size": "md" + "orientation": "center", + "size": "sm" }, "confirmModal": { - "body": "Are you sure you want to set this Status", + "body": "Are you sure you want to change the status", "cancel": "Cancel", "columns": { "include": [ "name", "newValue" ], - "name": "Label", - "newValue": "New Value", + "name": "Set to Suspicious", + "newValue": "New value", "oldValue": "Old Value" }, "confirm": "Confirm", "elementDisplayMode": "modified", - "title": "Are you sure you want to set this Status" + "title": "Are you sure you want to change the status" }, "elementValueChanged": "", "elements": [ { - "allowCustomValue": false, - "background": "#ccccdc", - "fieldName": "", - "id": "statusset", - "labelBackground": "#ccccdc", - "labelColor": "#000000", + "backgroundColor": "#37872D", + "buttonLabel": "ON ", + "customCode": "", + "foregroundColor": "#ccccdc", + "id": "poweron", "labelWidth": 10, - "options": [ - { - "icon": "check", - "id": "0", - "label": "OK", - "type": "number", - "value": 0 - }, - { - "icon": "question-circle", - "id": "1", - "label": "SUSPICIOUS", - "type": "number", - "value": 1 - }, - { - "icon": "link-broken", - "id": "2", - "label": "BROKEN", - "type": "number", - "value": 2 - }, - { - "icon": "bolt", - "id": "3", - "label": "BEYOND_REPAIR", - "type": "number", - "value": 3 - } - ], - "optionsSource": "Custom", "section": "", - "showIf": "", - "title": "status", + "show": "form", + "size": "md", + "title": "Power", "tooltip": "", - "type": "select", + "type": "button", "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", "unit": "", - "value": "" + "value": "", + "variant": "custom" + }, + { + "backgroundColor": "", + "buttonLabel": "OFF", + "customCode": "", + "foregroundColor": "", + "id": "poweroff", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "14f64691-837b-4346-9804-45366a235737", + "unit": "", + "value": "", + "variant": "destructive" } ], "initial": { - "code": "", + "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", "contentType": "application/json", - "datasource": "prometheus", + "datasource": "fec5bpxn3sz5sf", "getPayload": "return {}", - "header": [], "highlight": false, "highlightColor": "red", - "method": "GET", + "method": "-", "payload": { "disableTextWrap": false, "editorMode": "code", @@ -2230,7 +2413,7 @@ }, "resetAction": { "code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", - "confirm": true, + "confirm": false, "getPayload": "return {}", "mode": "initial", "payload": {} @@ -2241,15 +2424,15 @@ "variant": "hidden" }, "submit": { - "backgroundColor": "dark-green", - "foregroundColor": "text", - "icon": "save", - "text": "Turn On", + "backgroundColor": "yellow", + "foregroundColor": "#000007", + "icon": "eye", + "text": "Suspicious", "variant": "custom" }, "sync": false, "update": { - "code": "Set\nstation = ${ station },\nantenna = ${ LBA_Antenna },\nstatusset = ${ __data.fields.status }\n\nif (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "code": "if (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", "confirm": true, "contentType": "application/json", "datasource": "fec5bpxn3sz5sf", @@ -2265,7 +2448,7 @@ "root_selector": "", "source": "url", "type": "json", - "url": "${station}/antenna/LBA/${LBA_Antenna}/status/${payload.statusset}", + "url": "${station}/antennafield/${Selection}/power/${payload.statusset}", "url_options": { "body_content_type": "text/plain", "body_type": "raw", @@ -2274,7 +2457,7 @@ } }, "payloadMode": "updated", - "url": "${station}/antenna/LBA/${LBA_Antenna}/status/0" + "url": "http://${station2}-lcu.lofar.eu:50053/v1/${station2}/antenna/LBA/${LBA_Antenna}/status/1" }, "updateEnabled": "auto" }, @@ -2297,86 +2480,232 @@ }, { "datasource": { - "type": "innius-grpc-datasource", - "uid": "benr3nvweawaoa" + "type": "prometheus", + "uid": "prometheus" }, + "description": "\n", "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 16, - "x": 8, - "y": 10 - }, - "id": 164, - "options": { - "allData": {}, - "config": {}, - "data": [], - "imgFormat": "png", - "layout": { - "font": { - "family": "Inter, Helvetica, Arial, sans-serif" - }, - "margin": { - "b": 0, - "l": 0, - "r": 0, - "t": 0 - }, - "title": { - "automargin": true + "defaults": { + "color": { + "mode": "shades" }, - "xaxis": { - "automargin": true, - "autorange": true, - "ticksuffix": "Hz", - "type": "int" + "custom": { + "axisPlacement": "auto", + "fillOpacity": 70, + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineWidth": 0, + "spanNulls": false }, - "yaxis": { - "automargin": true, - "autorange": false, - "range": [ - 50, - 125 - ], - "ticksuffix": "dB" + "fieldMinMax": false, + "mappings": [], + "noValue": "???", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text" + } + ] } }, - "onclick": "// Event handling\n/*\n// 'data', 'variables', 'options', 'utils', and 'event' are passed as arguments\n\ntry {\n const { type: eventType, data: eventData } = event;\n const { timeZone, dayjs, locationService, getTemplateSrv } = utils;\n\n switch (eventType) {\n case 'click':\n console.log('Click event:', eventData.points);\n break;\n case 'select':\n console.log('Selection event:', eventData.range);\n break;\n case 'zoom':\n console.log('Zoom event:', eventData);\n break;\n default:\n console.log('Unhandled event type:', eventType, eventData);\n }\n\n console.log('Current time zone:', timeZone);\n console.log('From time:', dayjs(variables.__from).format());\n console.log('To time:', dayjs(variables.__to).format());\n\n // Example of using locationService\n // locationService.partial({ 'var-example': 'test' }, true);\n\n} catch (error) {\n console.error('Error in onclick handler:', error);\n}\n*/\n ", - "resScale": 2, - "script": "if (!data.series || !data.series.length) {\n return { data: [], layout: { title: { text: 'No data available' } } };\n}\n\nlet series = data.series[0];\nlet timestamp = new Date(series.fields[0].values[0]);\nlet frequency = series.fields.find(x => x.name === \"frequency\");\nlet power = series.fields.filter(x => x.name === \"power\");\n\nlet selectedAntennasOriginal = variables.LBA_Antenna?.current?.value;\nselectedAntennasOriginal = Array.isArray(selectedAntennasOriginal)\n ? selectedAntennasOriginal.map(String)\n : [String(selectedAntennasOriginal)];\n\nlet selectedAntennas = selectedAntennasOriginal.map(a =>\n String(parseInt(a.replace(/^LBA/, ''))).padStart(3, '0')\n);\n\nlet selectedPols = variables.pol?.current?.value;\nselectedPols = Array.isArray(selectedPols)\n ? selectedPols.map(String)\n : [String(selectedPols)];\n\nlet lines = [];\n\nfor (const row of power) {\n const antennaLabel = row.labels?.antenna;\n const polLabel = row.labels?.pol;\n\n if (!antennaLabel || !polLabel) {\n continue;\n }\n\n const normalizedAntenna = String(parseInt(antennaLabel.replace(/^LBA/, ''))).padStart(3, '0');\n\n if (\n selectedAntennas.includes(normalizedAntenna) &&\n selectedPols.includes(polLabel) &&\n Array.isArray(frequency?.values) &&\n Array.isArray(row?.values) &&\n row.values.length\n ) {\n lines.push({\n x: frequency.values,\n y: row.values,\n type: 'scatter',\n name: antennaLabel + \" - \" + polLabel,\n colorscale: 'Viridis',\n });\n }\n}\n\nif (!lines.length) {\n return { data: [], layout: { title: { text: 'No matching data found' } } };\n}\n\nreturn {\n data: lines,\n layout: {\n xaxis: { title: 'subband' },\n yaxis: { title: 'power' },\n title: {\n text: selectedAntennasOriginal.map(a => 'LBA' + a.replace(/^LBA/, '')).join(\", \") + ' SST Spectrum @ ' + timestamp.toISOString(),\n },\n },\n};\n", - "syncTimeRange": false, - "timeCol": "" - }, - "pluginVersion": "1.8.1", - "targets": [ - { - "datasource": { - "type": "innius-grpc-datasource", - "uid": "benr3nvweawaoa" - }, - "dimensions": [ - { - "id": "1", - "key": "station", - "value": "$station" - }, - { - "id": "2", - "key": "pol", - "value": "$pol" + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "AntennaStatusInt" }, - { - "id": "3", - "key": "antenna_field", - "value": "LBA" - } - ], - "metrics": [ - { + "properties": [ + { + "id": "displayName", + "value": "Status" + }, + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "color": "dark-green", + "index": 0, + "text": "Operational" + }, + "1": { + "color": "dark-yellow", + "index": 1, + "text": "Suspicious" + }, + "2": { + "color": "dark-red", + "index": 2, + "text": "Broken" + }, + "3": { + "color": "dark-blue", + "index": 3, + "text": "BeyondRepair" + }, + "4": { + "color": "text", + "index": 4, + "text": "NotAvailable" + } + }, + "type": "value" + }, + { + "options": { + "match": "null+nan", + "result": { + "color": "dark-purple", + "index": 5, + "text": "NaN" + } + }, + "type": "special" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 4, + "y": 14 + }, + "id": 112, + "options": { + "alignValue": "center", + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "mergeValues": true, + "rowHeight": 0.9, + "showValue": "always", + "tooltip": { + "hideZeros": false, + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.0.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "disableTextWrap": false, + "editorMode": "code", + "exemplar": false, + "expr": "ds_antenna_status_int{host=\"$station\", member=\"LBA\"}\r\n * on(host, member, x) group_left(str_value) ds_antenna_names_info{str_value=~\"$LBA_Antenna\"}", + "format": "time_series", + "fullMetaSearch": false, + "hide": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "AntennaStatusInt", + "range": true, + "refId": "AntennaStatusInt", + "useBackend": false + } + ], + "title": "History LBA $LBA_Antenna status", + "type": "state-timeline" + }, + { + "datasource": { + "type": "innius-grpc-datasource", + "uid": "grafanarpcserver" + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 16, + "y": 14 + }, + "id": 164, + "options": { + "allData": {}, + "config": {}, + "data": [], + "imgFormat": "png", + "layout": { + "font": { + "family": "Inter, Helvetica, Arial, sans-serif" + }, + "margin": { + "b": 0, + "l": 0, + "r": 0, + "t": 0 + }, + "title": { + "automargin": true + }, + "xaxis": { + "automargin": true, + "autorange": true, + "ticksuffix": "Hz", + "type": "int" + }, + "yaxis": { + "automargin": true, + "autorange": false, + "range": [ + 50, + 125 + ], + "ticksuffix": "dB" + } + }, + "onclick": "// Event handling\n/*\n// 'data', 'variables', 'options', 'utils', and 'event' are passed as arguments\n\ntry {\n const { type: eventType, data: eventData } = event;\n const { timeZone, dayjs, locationService, getTemplateSrv } = utils;\n\n switch (eventType) {\n case 'click':\n console.log('Click event:', eventData.points);\n break;\n case 'select':\n console.log('Selection event:', eventData.range);\n break;\n case 'zoom':\n console.log('Zoom event:', eventData);\n break;\n default:\n console.log('Unhandled event type:', eventType, eventData);\n }\n\n console.log('Current time zone:', timeZone);\n console.log('From time:', dayjs(variables.__from).format());\n console.log('To time:', dayjs(variables.__to).format());\n\n // Example of using locationService\n // locationService.partial({ 'var-example': 'test' }, true);\n\n} catch (error) {\n console.error('Error in onclick handler:', error);\n}\n*/\n ", + "resScale": 2, + "script": "if (!data.series || !data.series.length) {\n return { data: [], layout: { title: { text: 'No data available' } } };\n}\n\nlet series = data.series[0];\nlet timestamp = new Date(series.fields[0].values[0]);\nlet frequency = series.fields.find(x => x.name === \"frequency\");\nlet power = series.fields.filter(x => x.name === \"power\");\n\nlet selectedAntennasOriginal = variables.LBA_Antenna?.current?.value;\nselectedAntennasOriginal = Array.isArray(selectedAntennasOriginal)\n ? selectedAntennasOriginal.map(String)\n : [String(selectedAntennasOriginal)];\n\nlet selectedAntennas = selectedAntennasOriginal.map(a =>\n String(parseInt(a.replace(/^LBA/, ''))).padStart(3, '0')\n);\n\nlet selectedPols = variables.pol?.current?.value;\nselectedPols = Array.isArray(selectedPols)\n ? selectedPols.map(String)\n : [String(selectedPols)];\n\nlet lines = [];\n\nfor (const row of power) {\n const antennaLabel = row.labels?.antenna;\n const polLabel = row.labels?.pol;\n\n if (!antennaLabel || !polLabel) {\n continue;\n }\n\n const normalizedAntenna = String(parseInt(antennaLabel.replace(/^LBA/, ''))).padStart(3, '0');\n\n if (\n selectedAntennas.includes(normalizedAntenna) &&\n selectedPols.includes(polLabel) &&\n Array.isArray(frequency?.values) &&\n Array.isArray(row?.values) &&\n row.values.length\n ) {\n lines.push({\n x: frequency.values,\n y: row.values,\n type: 'scatter',\n name: antennaLabel + \" - \" + polLabel,\n colorscale: 'Viridis',\n });\n }\n}\n\nif (!lines.length) {\n return { data: [], layout: { title: { text: 'No matching data found' } } };\n}\n\nreturn {\n data: lines,\n layout: {\n xaxis: { title: 'subband' },\n yaxis: { title: 'power' },\n title: {\n text: selectedAntennasOriginal.map(a => 'LBA' + a.replace(/^LBA/, '')).join(\", \") + ' SST Spectrum @ ' + timestamp.toISOString(),\n },\n },\n};\n", + "syncTimeRange": false, + "timeCol": "" + }, + "pluginVersion": "1.8.1", + "targets": [ + { + "datasource": { + "type": "innius-grpc-datasource", + "uid": "grafanarpcserver" + }, + "dimensions": [ + { + "id": "4", + "key": "antenna_field", + "value": "LBA" + }, + { + "id": "1", + "key": "pol", + "value": "$pol" + }, + { + "id": "3", + "key": "station", + "value": "$station2" + } + ], + "displayName": "", + "metrics": [ + { "metricId": "SST" } ], @@ -2385,7 +2714,7 @@ "refId": "A" } ], - "title": "SST (power) for $LBA_Antenna", + "title": "LBA spectrum $station2", "type": "nline-plotlyjs-panel" }, { @@ -2393,6 +2722,7 @@ "type": "prometheus", "uid": "prometheus" }, + "description": "", "fieldConfig": { "defaults": {}, "overrides": [] @@ -2400,91 +2730,78 @@ "gridPos": { "h": 2, "w": 2, - "x": 6, - "y": 12 + "x": 0, + "y": 98 }, - "id": 190, + "id": 176, "options": { "buttonGroup": { "orientation": "left", "size": "md" }, "confirmModal": { - "body": "Are you sure you want to set this Status", + "body": "Are you sure you want to change the status", "cancel": "Cancel", "columns": { "include": [ "name", "newValue" ], - "name": "Label", - "newValue": "New Value", + "name": "Set to Broken", + "newValue": "New value", "oldValue": "Old Value" }, "confirm": "Confirm", "elementDisplayMode": "modified", - "title": "Are you sure you want to set this Status" + "title": "Are you sure you want to change the status" }, "elementValueChanged": "", "elements": [ { - "allowCustomValue": false, - "background": "#ccccdc", - "fieldName": "", - "id": "statusset", - "labelBackground": "#ccccdc", - "labelColor": "#000000", + "backgroundColor": "#37872D", + "buttonLabel": "ON ", + "customCode": "", + "foregroundColor": "#ccccdc", + "id": "poweron", "labelWidth": 10, - "options": [ - { - "icon": "check", - "id": "0", - "label": "OK", - "type": "number", - "value": 0 - }, - { - "icon": "question-circle", - "id": "1", - "label": "SUSPICIOUS", - "type": "number", - "value": 1 - }, - { - "icon": "link-broken", - "id": "2", - "label": "BROKEN", - "type": "number", - "value": 2 - }, - { - "icon": "bolt", - "id": "3", - "label": "BEYOND_REPAIR", - "type": "number", - "value": 3 - } - ], - "optionsSource": "Custom", "section": "", - "showIf": "", - "title": "status", + "show": "form", + "size": "md", + "title": "Power", "tooltip": "", - "type": "select", + "type": "button", "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", "unit": "", - "value": "" + "value": "", + "variant": "custom" + }, + { + "backgroundColor": "", + "buttonLabel": "OFF", + "customCode": "", + "foregroundColor": "", + "id": "poweroff", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "14f64691-837b-4346-9804-45366a235737", + "unit": "", + "value": "", + "variant": "destructive" } ], "initial": { - "code": "", + "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", "contentType": "application/json", - "datasource": "prometheus", + "datasource": "fec5bpxn3sz5sf", "getPayload": "return {}", - "header": [], "highlight": false, "highlightColor": "red", - "method": "GET", + "method": "-", "payload": { "disableTextWrap": false, "editorMode": "code", @@ -2515,7 +2832,7 @@ }, "resetAction": { "code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", - "confirm": true, + "confirm": false, "getPayload": "return {}", "mode": "initial", "payload": {} @@ -2526,15 +2843,15 @@ "variant": "hidden" }, "submit": { - "backgroundColor": "purple", - "foregroundColor": "yellow", - "icon": "save", + "backgroundColor": "dark-red", + "foregroundColor": "text", + "icon": "heart-break", "text": "Broken", - "variant": "destructive" + "variant": "custom" }, "sync": false, "update": { - "code": "Set\nstation = ${ station },\nantenna = ${ LBA_Antenna },\nstatusset = ${ __data.fields.status }\n\nif (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "code": "if (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", "confirm": true, "contentType": "application/json", "datasource": "fec5bpxn3sz5sf", @@ -2550,7 +2867,7 @@ "root_selector": "", "source": "url", "type": "json", - "url": "${station}/antenna/LBA/${LBA_Antenna}/status/${payload.statusset}", + "url": "${station}/antennafield/${Selection}/power/${payload.statusset}", "url_options": { "body_content_type": "text/plain", "body_type": "raw", @@ -2559,7 +2876,7 @@ } }, "payloadMode": "updated", - "url": "${station}/antenna/LBA/${LBA_Antenna}/status/2" + "url": "http://${station2}-lcu.lofar.eu:50053/v1/${station2}/antenna/LBA/${LBA_Antenna}/status/2" }, "updateEnabled": "auto" }, @@ -2570,15 +2887,10 @@ "type": "prometheus", "uid": "prometheus" }, - "disableTextWrap": false, - "editorMode": "code", - "expr": "(ds_antenna_status_int{host=\"$station\"} > 0) * on(host, member, x) ds_antenna_names_info{member=\"$LBA_Antenna\"}", - "fullMetaSearch": false, - "includeNullMetadata": true, - "legendFormat": "__auto", + "expr": "", + "instant": false, "range": true, - "refId": "A", - "useBackend": false + "refId": "A" } ], "title": "", @@ -2590,148 +2902,183 @@ "type": "prometheus", "uid": "prometheus" }, - "description": "\n", + "description": "", "fieldConfig": { - "defaults": { - "color": { - "mode": "shades" + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 2, + "y": 98 + }, + "id": 177, + "options": { + "buttonGroup": { + "orientation": "center", + "size": "sm" + }, + "confirmModal": { + "body": "Are you sure you want to change the status", + "cancel": "Cancel", + "columns": { + "include": [ + "name", + "newValue" + ], + "name": "Set to Broken", + "newValue": "New value", + "oldValue": "Old Value" }, - "custom": { - "axisPlacement": "auto", - "fillOpacity": 70, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineWidth": 0, - "spanNulls": false - }, - "fieldMinMax": false, - "mappings": [], - "noValue": "???", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "text" - } - ] - } + "confirm": "Confirm", + "elementDisplayMode": "modified", + "title": "Are you sure you want to change the status" }, - "overrides": [ + "elementValueChanged": "", + "elements": [ { - "matcher": { - "id": "byName", - "options": "AntennaStatusInt" - }, - "properties": [ - { - "id": "displayName", - "value": "Status" - }, - { - "id": "mappings", - "value": [ - { - "options": { - "0": { - "color": "dark-green", - "index": 0, - "text": "Operational" - }, - "1": { - "color": "dark-yellow", - "index": 1, - "text": "Suspicious" - }, - "2": { - "color": "dark-red", - "index": 2, - "text": "Broken" - }, - "3": { - "color": "dark-blue", - "index": 3, - "text": "BeyondRepair" - }, - "4": { - "color": "text", - "index": 4, - "text": "NotAvailable" - } - }, - "type": "value" - }, - { - "options": { - "match": "null+nan", - "result": { - "color": "dark-purple", - "index": 5, - "text": "NaN" - } - }, - "type": "special" - } - ] - } - ] + "backgroundColor": "#37872D", + "buttonLabel": "ON ", + "customCode": "", + "foregroundColor": "#ccccdc", + "id": "poweron", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", + "unit": "", + "value": "", + "variant": "custom" + }, + { + "backgroundColor": "", + "buttonLabel": "OFF", + "customCode": "", + "foregroundColor": "", + "id": "poweroff", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "14f64691-837b-4346-9804-45366a235737", + "unit": "", + "value": "", + "variant": "destructive" } - ] - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 0, - "y": 14 - }, - "id": 112, - "options": { - "alignValue": "center", - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": false + ], + "initial": { + "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "return {}", + "highlight": false, + "highlightColor": "red", + "method": "-", + "payload": { + "disableTextWrap": false, + "editorMode": "code", + "exemplar": false, + "expr": "(ds_antenna_status_int{host=\"$Station\", member=\"$LBA_Antenna\"} > 0) * on(host, member, x) ds_antenna_names_info", + "format": "time_series", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "{{label_name}}", + "range": false, + "useBackend": false + }, + "url": "${station}/antenna/LBA/${LBA_Antenna}" }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "always", - "tooltip": { - "hideZeros": false, - "maxHeight": 600, - "mode": "single", - "sort": "none" - } + "layout": { + "orientation": "horizontal", + "padding": 10, + "sectionVariant": "default", + "variant": "none" + }, + "reset": { + "backgroundColor": "purple", + "foregroundColor": "yellow", + "icon": "process", + "text": "Reset", + "variant": "hidden" + }, + "resetAction": { + "code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": false, + "getPayload": "return {}", + "mode": "initial", + "payload": {} + }, + "saveDefault": { + "icon": "save", + "text": "Save Default", + "variant": "hidden" + }, + "submit": { + "backgroundColor": "dark-blue", + "foregroundColor": "text", + "icon": "bug", + "text": "Beyond Rep.", + "variant": "custom" + }, + "sync": false, + "update": { + "code": "if (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": true, + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "const payload = {};\ncontext.panel.elements.forEach((element) => {\n if (!element.value) {\n return;\n }\n payload[element.id] = element.value;\n})\nreturn payload;", + "method": "POST", + "payload": { + "columns": [], + "filters": [], + "format": "table", + "global_query_id": "", + "parser": "backend", + "refId": "", + "root_selector": "", + "source": "url", + "type": "json", + "url": "${station}/antennafield/${Selection}/power/${payload.statusset}", + "url_options": { + "body_content_type": "text/plain", + "body_type": "raw", + "data": "", + "method": "POST" + } + }, + "payloadMode": "updated", + "url": "http://${station2}-lcu.lofar.eu:50053/v1/${station2}/antenna/LBA/${LBA_Antenna}/status/3" + }, + "updateEnabled": "auto" }, - "pluginVersion": "11.6.0", + "pluginVersion": "5.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, - "disableTextWrap": false, - "editorMode": "code", - "exemplar": false, - "expr": "ds_antenna_status_int{host=\"$station\", member=\"LBA\"}\r\n * on(host, member, x) group_left(str_value) ds_antenna_names_info{str_value=~\"$LBA_Antenna\"}", - "format": "time_series", - "fullMetaSearch": false, - "hide": false, - "includeNullMetadata": true, + "expr": "", "instant": false, - "legendFormat": "AntennaStatusInt", "range": true, - "refId": "AntennaStatusInt", - "useBackend": false + "refId": "A" } ], - "title": "Details selected LBA $LBA_Antenna", - "type": "state-timeline" + "title": "", + "transparent": true, + "type": "volkovlabs-form-panel" } ], - "title": "Control - LBA antenna - set status (Alle stations)", + "title": "Control - LBA antenna - $LBA_Antenna - set status (CS/RS)", "type": "row" }, { @@ -2740,106 +3087,95 @@ "h": 1, "w": 24, "x": 0, - "y": 10 + "y": 14 }, - "id": 185, + "id": 113, "panels": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, + "description": "", "fieldConfig": { "defaults": {}, "overrides": [] }, "gridPos": { - "h": 4, - "w": 8, + "h": 2, + "w": 2, "x": 0, - "y": 93 + "y": 15 }, - "id": 187, + "id": 179, "options": { "buttonGroup": { - "orientation": "center", - "size": "lg" + "orientation": "left", + "size": "md" }, "confirmModal": { - "body": "Are you sure you want to set this Status", + "body": "Are you sure you want to change the status", "cancel": "Cancel", "columns": { "include": [ "name", "newValue" ], - "name": "Label", - "newValue": "New Value", + "name": "Set to OK", + "newValue": "New value", "oldValue": "Old Value" }, "confirm": "Confirm", "elementDisplayMode": "modified", - "title": "Are you sure you want to set this Status" + "title": "Are you sure you want to change the status" }, "elementValueChanged": "", "elements": [ { - "allowCustomValue": false, - "background": "#ccccdc", - "fieldName": "", - "id": "statusset", - "labelBackground": "#ccccdc", - "labelColor": "#000000", + "backgroundColor": "#37872D", + "buttonLabel": "ON ", + "customCode": "", + "foregroundColor": "#ccccdc", + "id": "poweron", "labelWidth": 10, - "options": [ - { - "icon": "check", - "id": "0", - "label": "OK", - "type": "number", - "value": 0 - }, - { - "icon": "question-circle", - "id": "1", - "label": "SUSPICIOUS", - "type": "number", - "value": 1 - }, - { - "icon": "link-broken", - "id": "2", - "label": "BROKEN", - "type": "number", - "value": 2 - }, - { - "icon": "bolt", - "id": "3", - "label": "BEYOND_REPAIR", - "type": "number", - "value": 3 - } - ], - "optionsSource": "Custom", "section": "", - "showIf": "", - "title": "status", + "show": "form", + "size": "md", + "title": "Power", "tooltip": "", - "type": "select", + "type": "button", "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", "unit": "", - "value": "" + "value": "", + "variant": "custom" + }, + { + "backgroundColor": "", + "buttonLabel": "OFF", + "customCode": "", + "foregroundColor": "", + "id": "poweroff", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "14f64691-837b-4346-9804-45366a235737", + "unit": "", + "value": "", + "variant": "destructive" } ], "initial": { "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", "contentType": "application/json", - "datasource": "prometheus", + "datasource": "fec5bpxn3sz5sf", "getPayload": "return {}", "highlight": false, "highlightColor": "red", - "method": "GET", + "method": "-", "payload": { "disableTextWrap": false, "editorMode": "code", @@ -2853,13 +3189,13 @@ "range": false, "useBackend": false }, - "url": "${station}/antenna/HBA0/${HBA0_Tile}" + "url": "${station}/antenna/LBA/${LBA_Antenna}" }, "layout": { "orientation": "horizontal", "padding": 10, "sectionVariant": "default", - "variant": "single" + "variant": "none" }, "reset": { "backgroundColor": "purple", @@ -2881,15 +3217,15 @@ "variant": "hidden" }, "submit": { - "backgroundColor": "purple", - "foregroundColor": "yellow", - "icon": "save", - "text": "Submit", - "variant": "primary" + "backgroundColor": "dark-green", + "foregroundColor": "text", + "icon": "power", + "text": "GOOD", + "variant": "custom" }, "sync": false, "update": { - "code": "Set\nstation = ${ station },\nantenna = ${ HBA0_Tile },\nstatusset = ${ __data.fields.status }\n\nif (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "code": "if (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", "confirm": true, "contentType": "application/json", "datasource": "fec5bpxn3sz5sf", @@ -2905,7 +3241,7 @@ "root_selector": "", "source": "url", "type": "json", - "url": "${station}/antenna/HBA0/${HBA0_Tile}/status/${payload.statusset}", + "url": "${station}/antennafield/${Selection}/power/${payload.statusset}", "url_options": { "body_content_type": "text/plain", "body_type": "raw", @@ -2914,7 +3250,7 @@ } }, "payloadMode": "updated", - "url": "http://${station}.control.lofar:50053/post/${station}/antenna/LBA/${LBA_Antenna}/status/${__data.fields.statusset}" + "url": "http://${station2}-lcu.lofar.eu:50053/v1/${station2}/antenna/HBA/${HBA_Tile}/status/0" }, "updateEnabled": "auto" }, @@ -2925,105 +3261,195 @@ "type": "prometheus", "uid": "prometheus" }, + "expr": "", + "instant": false, + "range": true, "refId": "A" } ], - "title": "Control - Antenna Status Set - HBA0 $HBA0_Tile", + "title": "", "transparent": true, "type": "volkovlabs-form-panel" }, { "datasource": { - "type": "innius-grpc-datasource", - "uid": "benr3nvweawaoa" + "type": "prometheus", + "uid": "prometheus" }, + "description": "", "fieldConfig": { "defaults": {}, "overrides": [] }, "gridPos": { - "h": 8, - "w": 16, - "x": 8, - "y": 93 + "h": 2, + "w": 2, + "x": 2, + "y": 15 }, - "id": 188, + "id": 181, "options": { - "allData": {}, - "config": {}, - "data": [], - "imgFormat": "png", - "layout": { - "font": { - "family": "Inter, Helvetica, Arial, sans-serif" + "buttonGroup": { + "orientation": "center", + "size": "sm" + }, + "confirmModal": { + "body": "Are you sure you want to change the status", + "cancel": "Cancel", + "columns": { + "include": [ + "name", + "newValue" + ], + "name": "Set to Broken", + "newValue": "New value", + "oldValue": "Old Value" }, - "margin": { - "b": 0, - "l": 0, - "r": 0, - "t": 0 + "confirm": "Confirm", + "elementDisplayMode": "modified", + "title": "Are you sure you want to change the status" + }, + "elementValueChanged": "", + "elements": [ + { + "backgroundColor": "#37872D", + "buttonLabel": "ON ", + "customCode": "", + "foregroundColor": "#ccccdc", + "id": "poweron", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", + "unit": "", + "value": "", + "variant": "custom" }, - "title": { - "automargin": true + { + "backgroundColor": "", + "buttonLabel": "OFF", + "customCode": "", + "foregroundColor": "", + "id": "poweroff", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "14f64691-837b-4346-9804-45366a235737", + "unit": "", + "value": "", + "variant": "destructive" + } + ], + "initial": { + "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "return {}", + "highlight": false, + "highlightColor": "red", + "method": "-", + "payload": { + "disableTextWrap": false, + "editorMode": "code", + "exemplar": false, + "expr": "(ds_antenna_status_int{host=\"$Station\", member=\"$LBA_Antenna\"} > 0) * on(host, member, x) ds_antenna_names_info", + "format": "time_series", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "{{label_name}}", + "range": false, + "useBackend": false }, - "xaxis": { - "automargin": true, - "autorange": true, - "ticksuffix": "Hz", - "type": "int" + "url": "${station}/antenna/LBA/${LBA_Antenna}" + }, + "layout": { + "orientation": "horizontal", + "padding": 10, + "sectionVariant": "default", + "variant": "none" + }, + "reset": { + "backgroundColor": "purple", + "foregroundColor": "yellow", + "icon": "process", + "text": "Reset", + "variant": "hidden" + }, + "resetAction": { + "code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": false, + "getPayload": "return {}", + "mode": "initial", + "payload": {} + }, + "saveDefault": { + "icon": "save", + "text": "Save Default", + "variant": "hidden" + }, + "submit": { + "backgroundColor": "dark-blue", + "foregroundColor": "text", + "icon": "bug", + "text": "Beyond Rep.", + "variant": "custom" + }, + "sync": false, + "update": { + "code": "if (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": true, + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "const payload = {};\ncontext.panel.elements.forEach((element) => {\n if (!element.value) {\n return;\n }\n payload[element.id] = element.value;\n})\nreturn payload;", + "method": "POST", + "payload": { + "columns": [], + "filters": [], + "format": "table", + "global_query_id": "", + "parser": "backend", + "refId": "", + "root_selector": "", + "source": "url", + "type": "json", + "url": "${station}/antennafield/${Selection}/power/${payload.statusset}", + "url_options": { + "body_content_type": "text/plain", + "body_type": "raw", + "data": "", + "method": "POST" + } }, - "yaxis": { - "automargin": true, - "autorange": false, - "range": [ - 50, - 125 - ], - "ticksuffix": "dB" - } + "payloadMode": "updated", + "url": "http://${station2}-lcu.lofar.eu:50053/v1/${station2}/antenna/HBA/${HBA_Tile}/status/3" }, - "onclick": "// Event handling\n/*\n// 'data', 'variables', 'options', 'utils', and 'event' are passed as arguments\n\ntry {\n const { type: eventType, data: eventData } = event;\n const { timeZone, dayjs, locationService, getTemplateSrv } = utils;\n\n switch (eventType) {\n case 'click':\n console.log('Click event:', eventData.points);\n break;\n case 'select':\n console.log('Selection event:', eventData.range);\n break;\n case 'zoom':\n console.log('Zoom event:', eventData);\n break;\n default:\n console.log('Unhandled event type:', eventType, eventData);\n }\n\n console.log('Current time zone:', timeZone);\n console.log('From time:', dayjs(variables.__from).format());\n console.log('To time:', dayjs(variables.__to).format());\n\n // Example of using locationService\n // locationService.partial({ 'var-example': 'test' }, true);\n\n} catch (error) {\n console.error('Error in onclick handler:', error);\n}\n*/\n ", - "resScale": 2, - "script": "if (!data.series || !data.series.length) {\n return { data: [], layout: { title: { text: 'No data available' } } };\n}\n\nlet series = data.series[0];\nlet timestamp = new Date(series.fields[0].values[0]);\nlet frequency = series.fields.find(x => x.name === \"frequency\");\nlet power = series.fields.filter(x => x.name === \"power\");\n\nlet selectedTilesOriginal = variables.HBA_Tile.current.value;\nif (!Array.isArray(selectedTilesOriginal)) {\n selectedTilesOriginal = [selectedTilesOriginal];\n}\n\nlet selectedTiles = selectedTilesOriginal.map(t => t.replace(/^Tile/, '').padStart(3, '0'));\n\nlet selectedPols = variables?.pol?.current?.value;\nif (!Array.isArray(selectedPols)) {\n selectedPols = [selectedPols];\n}\n\nlet lines = [];\n\nfor (const row of power) {\n const tileLabel = row.labels?.antenna; \n const polLabel = row.labels?.pol;\n\n if (!tileLabel || !polLabel) {\n continue;\n }\n\n const normalizedTile = tileLabel.replace(/^Tile/, '').padStart(3, '0');\n\n if (\n selectedTiles.includes(normalizedTile) &&\n selectedPols.includes(polLabel) &&\n Array.isArray(frequency?.values) &&\n Array.isArray(row?.values) &&\n row.values.length\n ) {\n lines.push({\n x: frequency.values,\n y: row.values,\n type: 'scatter',\n name: tileLabel + \" - \" + polLabel,\n colorscale: 'Viridis',\n });\n }\n}\n\nif (!lines.length) {\n return { data: [], layout: { title: { text: 'No matching data found' } } };\n}\n\nreturn {\n data: lines,\n layout: {\n xaxis: { title: 'subband' },\n yaxis: { title: 'power' },\n title: {\n text: selectedTilesOriginal.map(t => 'Tile' + t.replace(/^Tile/, '')).join(\", \") + ' SST Spectrum @ ' + timestamp.toISOString(),\n },\n },\n};\n", - "syncTimeRange": false, - "timeCol": "" + "updateEnabled": "auto" }, - "pluginVersion": "1.8.1", + "pluginVersion": "5.1.0", "targets": [ { "datasource": { - "type": "innius-grpc-datasource", - "uid": "benr3nvweawaoa" + "type": "prometheus", + "uid": "prometheus" }, - "dimensions": [ - { - "id": "4", - "key": "pol", - "value": "$pol" - }, - { - "id": "5", - "key": "station", - "value": "$station" - }, - { - "id": "6", - "key": "antenna_field", - "value": "HBA" - } - ], - "metrics": [ - { - "metricId": "SST" - } - ], - "queryOptions": {}, - "queryType": "GetMetricAggregate", + "expr": "", + "instant": false, + "range": true, "refId": "A" } ], - "title": "SST (Power) for HBA $HBA_Tile", - "type": "nline-plotlyjs-panel" + "title": "", + "transparent": true, + "type": "volkovlabs-form-panel" }, { "datasource": { @@ -3122,12 +3548,12 @@ ] }, "gridPos": { - "h": 4, - "w": 8, - "x": 0, - "y": 97 + "h": 6, + "w": 12, + "x": 4, + "y": 15 }, - "id": 186, + "id": 115, "options": { "alignValue": "center", "legend": { @@ -3145,7 +3571,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "datasource": { @@ -3153,7 +3579,7 @@ "uid": "prometheus" }, "disableTextWrap": false, - "editorMode": "builder", + "editorMode": "code", "exemplar": false, "expr": "ds_antenna_status_int{host=\"$station\", member=\"HBA\"} * on(host, member, x) ds_antenna_names_info{str_value=~\"$HBA_Tile\"}", "format": "time_series", @@ -3169,117 +3595,186 @@ ], "title": "Details selected HBA $HBA_Tile", "type": "state-timeline" - } - ], - "title": "Control - HBA tile - set status (Remote stations)", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 11 - }, - "id": 113, - "panels": [ + }, { "datasource": { - "type": "prometheus", - "uid": "prometheus" + "type": "innius-grpc-datasource", + "uid": "grafanarpcserver" }, "fieldConfig": { "defaults": {}, "overrides": [] }, "gridPos": { - "h": 4, + "h": 6, "w": 8, - "x": 0, - "y": 131 + "x": 16, + "y": 15 }, - "id": 173, + "id": 163, "options": { - "buttonGroup": { - "orientation": "center", - "size": "lg" - }, - "confirmModal": { - "body": "Are you sure you want to set this Status", - "cancel": "Cancel", - "columns": { - "include": [ - "name", - "newValue" - ], - "name": "Label", - "newValue": "New Value", - "oldValue": "Old Value" + "allData": {}, + "config": {}, + "data": [], + "imgFormat": "png", + "layout": { + "font": { + "family": "Inter, Helvetica, Arial, sans-serif" }, - "confirm": "Confirm", - "elementDisplayMode": "modified", - "title": "Are you sure you want to set this Status" - }, - "elementValueChanged": "", - "elements": [ - { - "allowCustomValue": false, - "background": "#ccccdc", - "fieldName": "", - "id": "statusset", - "labelBackground": "#ccccdc", - "labelColor": "#000000", - "labelWidth": 10, - "options": [ - { - "icon": "check", - "id": "0", - "label": "OK", - "type": "number", - "value": 0 - }, - { - "icon": "question-circle", - "id": "1", - "label": "SUSPICIOUS", - "type": "number", - "value": 1 - }, - { - "icon": "link-broken", - "id": "2", - "label": "BROKEN", - "type": "number", - "value": 2 - }, - { - "icon": "bolt", - "id": "3", - "label": "BEYOND_REPAIR", - "type": "number", - "value": 3 - } - ], - "optionsSource": "Custom", - "section": "", - "showIf": "", - "title": "status", - "tooltip": "", - "type": "select", - "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", - "unit": "", - "value": "" - } - ], + "margin": { + "b": 0, + "l": 0, + "r": 0, + "t": 0 + }, + "title": { + "automargin": true + }, + "xaxis": { + "automargin": true, + "autorange": true, + "ticksuffix": "Hz", + "type": "int" + }, + "yaxis": { + "automargin": true, + "autorange": false, + "range": [ + 50, + 125 + ], + "ticksuffix": "dB" + } + }, + "onclick": "// Event handling\n/*\n// 'data', 'variables', 'options', 'utils', and 'event' are passed as arguments\n\ntry {\n const { type: eventType, data: eventData } = event;\n const { timeZone, dayjs, locationService, getTemplateSrv } = utils;\n\n switch (eventType) {\n case 'click':\n console.log('Click event:', eventData.points);\n break;\n case 'select':\n console.log('Selection event:', eventData.range);\n break;\n case 'zoom':\n console.log('Zoom event:', eventData);\n break;\n default:\n console.log('Unhandled event type:', eventType, eventData);\n }\n\n console.log('Current time zone:', timeZone);\n console.log('From time:', dayjs(variables.__from).format());\n console.log('To time:', dayjs(variables.__to).format());\n\n // Example of using locationService\n // locationService.partial({ 'var-example': 'test' }, true);\n\n} catch (error) {\n console.error('Error in onclick handler:', error);\n}\n*/\n ", + "resScale": 2, + "script": "if (!data.series || !data.series.length) {\n return { data: [], layout: { title: { text: 'No data available' } } };\n}\n\nlet series = data.series[0];\nlet timestamp = new Date(series.fields[0].values[0]);\nlet frequency = series.fields.find(x => x.name === \"frequency\");\nlet power = series.fields.filter(x => x.name === \"power\");\n\nlet selectedTilesOriginal = variables.HBA_Tile.current.value;\nif (!Array.isArray(selectedTilesOriginal)) {\n selectedTilesOriginal = [selectedTilesOriginal];\n}\n\nlet selectedTiles = selectedTilesOriginal.map(t => t.replace(/^Tile/, '').padStart(3, '0'));\n\nlet selectedPols = variables?.pol?.current?.value;\nif (!Array.isArray(selectedPols)) {\n selectedPols = [selectedPols];\n}\n\nlet lines = [];\n\nfor (const row of power) {\n const tileLabel = row.labels?.antenna; \n const polLabel = row.labels?.pol;\n\n if (!tileLabel || !polLabel) {\n continue;\n }\n\n const normalizedTile = tileLabel.replace(/^Tile/, '').padStart(3, '0');\n\n if (\n selectedTiles.includes(normalizedTile) &&\n selectedPols.includes(polLabel) &&\n Array.isArray(frequency?.values) &&\n Array.isArray(row?.values) &&\n row.values.length\n ) {\n lines.push({\n x: frequency.values,\n y: row.values,\n type: 'scatter',\n name: tileLabel + \" - \" + polLabel,\n colorscale: 'Viridis',\n });\n }\n}\n\nif (!lines.length) {\n return { data: [], layout: { title: { text: 'No matching data found' } } };\n}\n\nreturn {\n data: lines,\n layout: {\n xaxis: { title: 'subband' },\n yaxis: { title: 'power' },\n title: {\n text: selectedTilesOriginal.map(t => 'Tile' + t.replace(/^Tile/, '')).join(\", \") + ' SST Spectrum @ ' + timestamp.toISOString(),\n },\n },\n};\n", + "syncTimeRange": false, + "timeCol": "" + }, + "pluginVersion": "1.8.1", + "targets": [ + { + "datasource": { + "type": "innius-grpc-datasource", + "uid": "grafanarpcserver" + }, + "dimensions": [ + { + "id": "4", + "key": "antenna_field", + "value": "HBA" + }, + { + "id": "1", + "key": "pol", + "value": "$pol" + }, + { + "id": "3", + "key": "station", + "value": "$station2" + } + ], + "displayName": "", + "metrics": [ + { + "metricId": "SST" + } + ], + "queryOptions": {}, + "queryType": "GetMetricAggregate", + "refId": "A" + } + ], + "title": "HBA spectrum $station2", + "type": "nline-plotlyjs-panel" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 0, + "y": 17 + }, + "id": 182, + "options": { + "buttonGroup": { + "orientation": "left", + "size": "md" + }, + "confirmModal": { + "body": "Are you sure you want to change the status", + "cancel": "Cancel", + "columns": { + "include": [ + "name", + "newValue" + ], + "name": "Set to Broken", + "newValue": "New value", + "oldValue": "Old Value" + }, + "confirm": "Confirm", + "elementDisplayMode": "modified", + "title": "Are you sure you want to change the status" + }, + "elementValueChanged": "", + "elements": [ + { + "backgroundColor": "#37872D", + "buttonLabel": "ON ", + "customCode": "", + "foregroundColor": "#ccccdc", + "id": "poweron", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", + "unit": "", + "value": "", + "variant": "custom" + }, + { + "backgroundColor": "", + "buttonLabel": "OFF", + "customCode": "", + "foregroundColor": "", + "id": "poweroff", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "14f64691-837b-4346-9804-45366a235737", + "unit": "", + "value": "", + "variant": "destructive" + } + ], "initial": { "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", "contentType": "application/json", - "datasource": "prometheus", + "datasource": "fec5bpxn3sz5sf", "getPayload": "return {}", "highlight": false, "highlightColor": "red", - "method": "GET", + "method": "-", "payload": { "disableTextWrap": false, "editorMode": "code", @@ -3293,13 +3788,13 @@ "range": false, "useBackend": false }, - "url": "${station}/antenna/HBA0/${HBA0_Tile}" + "url": "${station}/antenna/LBA/${LBA_Antenna}" }, "layout": { "orientation": "horizontal", "padding": 10, "sectionVariant": "default", - "variant": "single" + "variant": "none" }, "reset": { "backgroundColor": "purple", @@ -3321,15 +3816,15 @@ "variant": "hidden" }, "submit": { - "backgroundColor": "purple", - "foregroundColor": "yellow", - "icon": "save", - "text": "Submit", - "variant": "primary" + "backgroundColor": "dark-red", + "foregroundColor": "text", + "icon": "heart-break", + "text": "Broken", + "variant": "custom" }, "sync": false, "update": { - "code": "Set\nstation = ${ station },\nantenna = ${ HBA0_Tile },\nstatusset = ${ __data.fields.status }\n\nif (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "code": "if (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", "confirm": true, "contentType": "application/json", "datasource": "fec5bpxn3sz5sf", @@ -3345,7 +3840,7 @@ "root_selector": "", "source": "url", "type": "json", - "url": "${station}/antenna/HBA0/${HBA0_Tile}/status/${payload.statusset}", + "url": "${station}/antennafield/${Selection}/power/${payload.statusset}", "url_options": { "body_content_type": "text/plain", "body_type": "raw", @@ -3354,7 +3849,7 @@ } }, "payloadMode": "updated", - "url": "http://${station}.control.lofar:50053/post/${station}/antenna/LBA/${LBA_Antenna}/status/${__data.fields.statusset}" + "url": "http://${station2}-lcu.lofar.eu:50053/v1/${station2}/antenna/HBA/${HBA_Tile}/status/2" }, "updateEnabled": "auto" }, @@ -3365,253 +3860,198 @@ "type": "prometheus", "uid": "prometheus" }, + "expr": "", + "instant": false, + "range": true, "refId": "A" } ], - "title": "Control - Antenna Status Set - HBA0 $HBA0_Tile", + "title": "", "transparent": true, "type": "volkovlabs-form-panel" }, { "datasource": { - "type": "innius-grpc-datasource", - "uid": "benr3nvweawaoa" + "type": "prometheus", + "uid": "prometheus" }, + "description": "", "fieldConfig": { "defaults": {}, "overrides": [] }, "gridPos": { - "h": 8, - "w": 16, - "x": 8, - "y": 131 + "h": 2, + "w": 2, + "x": 2, + "y": 17 }, - "id": 163, + "id": 180, "options": { - "allData": {}, - "config": {}, - "data": [], - "imgFormat": "png", - "layout": { - "font": { - "family": "Inter, Helvetica, Arial, sans-serif" - }, - "margin": { - "b": 0, - "l": 0, - "r": 0, - "t": 0 - }, - "title": { - "automargin": true + "buttonGroup": { + "orientation": "center", + "size": "sm" + }, + "confirmModal": { + "body": "Are you sure you want to change the status", + "cancel": "Cancel", + "columns": { + "include": [ + "name", + "newValue" + ], + "name": "Set to Suspicious", + "newValue": "New value", + "oldValue": "Old Value" }, - "xaxis": { - "automargin": true, - "autorange": true, - "ticksuffix": "Hz", - "type": "int" + "confirm": "Confirm", + "elementDisplayMode": "modified", + "title": "Are you sure you want to change the status" + }, + "elementValueChanged": "", + "elements": [ + { + "backgroundColor": "#37872D", + "buttonLabel": "ON ", + "customCode": "", + "foregroundColor": "#ccccdc", + "id": "poweron", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", + "unit": "", + "value": "", + "variant": "custom" }, - "yaxis": { - "automargin": true, - "autorange": false, - "range": [ - 50, - 125 - ], - "ticksuffix": "dB" + { + "backgroundColor": "", + "buttonLabel": "OFF", + "customCode": "", + "foregroundColor": "", + "id": "poweroff", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "14f64691-837b-4346-9804-45366a235737", + "unit": "", + "value": "", + "variant": "destructive" } - }, - "onclick": "// Event handling\n/*\n// 'data', 'variables', 'options', 'utils', and 'event' are passed as arguments\n\ntry {\n const { type: eventType, data: eventData } = event;\n const { timeZone, dayjs, locationService, getTemplateSrv } = utils;\n\n switch (eventType) {\n case 'click':\n console.log('Click event:', eventData.points);\n break;\n case 'select':\n console.log('Selection event:', eventData.range);\n break;\n case 'zoom':\n console.log('Zoom event:', eventData);\n break;\n default:\n console.log('Unhandled event type:', eventType, eventData);\n }\n\n console.log('Current time zone:', timeZone);\n console.log('From time:', dayjs(variables.__from).format());\n console.log('To time:', dayjs(variables.__to).format());\n\n // Example of using locationService\n // locationService.partial({ 'var-example': 'test' }, true);\n\n} catch (error) {\n console.error('Error in onclick handler:', error);\n}\n*/\n ", - "resScale": 2, - "script": "if (!data.series || !data.series.length) {\n return { data: [], layout: { title: { text: 'No data available' } } };\n}\n\nlet series = data.series[0];\nlet timestamp = new Date(series.fields[0].values[0]);\nlet frequency = series.fields.find(x => x.name === \"frequency\");\nlet power = series.fields.filter(x => x.name === \"power\");\n\nlet selectedTilesOriginal = variables.HBA0_Tile.current.value;\nif (!Array.isArray(selectedTilesOriginal)) {\n selectedTilesOriginal = [selectedTilesOriginal];\n}\n\nlet selectedTiles = selectedTilesOriginal.map(t => t.replace(/^Tile/, '').padStart(3, '0'));\n\nlet selectedPols = variables?.pol?.current?.value;\nif (!Array.isArray(selectedPols)) {\n selectedPols = [selectedPols];\n}\n\nlet lines = [];\n\nfor (const row of power) {\n const tileLabel = row.labels?.antenna; \n const polLabel = row.labels?.pol;\n\n if (!tileLabel || !polLabel) {\n continue;\n }\n\n const normalizedTile = tileLabel.replace(/^Tile/, '').padStart(3, '0');\n\n if (\n selectedTiles.includes(normalizedTile) &&\n selectedPols.includes(polLabel) &&\n Array.isArray(frequency?.values) &&\n Array.isArray(row?.values) &&\n row.values.length\n ) {\n lines.push({\n x: frequency.values,\n y: row.values,\n type: 'scatter',\n name: tileLabel + \" - \" + polLabel,\n colorscale: 'Viridis',\n });\n }\n}\n\nif (!lines.length) {\n return { data: [], layout: { title: { text: 'No matching data found' } } };\n}\n\nreturn {\n data: lines,\n layout: {\n xaxis: { title: 'subband' },\n yaxis: { title: 'power' },\n title: {\n text: selectedTilesOriginal.map(t => 'Tile' + t.replace(/^Tile/, '')).join(\", \") + ' SST Spectrum @ ' + timestamp.toISOString(),\n },\n },\n};\n", - "syncTimeRange": false, - "timeCol": "" - }, - "pluginVersion": "1.8.1", - "targets": [ - { - "datasource": { - "type": "innius-grpc-datasource", - "uid": "benr3nvweawaoa" + ], + "initial": { + "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "return {}", + "highlight": false, + "highlightColor": "red", + "method": "-", + "payload": { + "disableTextWrap": false, + "editorMode": "code", + "exemplar": false, + "expr": "(ds_antenna_status_int{host=\"$Station\", member=\"$LBA_Antenna\"} > 0) * on(host, member, x) ds_antenna_names_info", + "format": "time_series", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "{{label_name}}", + "range": false, + "useBackend": false }, - "dimensions": [ - { - "id": "7", - "key": "pol", - "value": "$pol" - }, - { - "id": "9", - "key": "antenna_field", - "value": "HBA0" - }, - { - "id": "8", - "key": "station", - "value": "$station" - } - ], - "metrics": [ - { - "metricId": "SST" - } - ], - "queryOptions": {}, - "queryType": "GetMetricAggregate", - "refId": "A" - } - ], - "title": "SST (Power) for HBA0 $HBA0_Tile", - "type": "nline-plotlyjs-panel" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "description": "\n", - "fieldConfig": { - "defaults": { - "color": { - "mode": "shades" - }, - "custom": { - "axisPlacement": "auto", - "fillOpacity": 70, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineWidth": 0, - "spanNulls": false - }, - "fieldMinMax": false, - "mappings": [], - "noValue": "???", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "text" - } - ] - } + "url": "${station}/antenna/LBA/${LBA_Antenna}" }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AntennaStatusInt" - }, - "properties": [ - { - "id": "displayName", - "value": "Status" - }, - { - "id": "mappings", - "value": [ - { - "options": { - "0": { - "color": "dark-green", - "index": 0, - "text": "Operational" - }, - "1": { - "color": "dark-yellow", - "index": 1, - "text": "Suspicious" - }, - "2": { - "color": "dark-red", - "index": 2, - "text": "Broken" - }, - "3": { - "color": "dark-blue", - "index": 3, - "text": "BeyondRepair" - }, - "4": { - "color": "text", - "index": 4, - "text": "NotAvailable" - } - }, - "type": "value" - }, - { - "options": { - "match": "null+nan", - "result": { - "color": "dark-purple", - "index": 5, - "text": "NaN" - } - }, - "type": "special" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 0, - "y": 135 - }, - "id": 174, - "options": { - "alignValue": "center", - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": false + "layout": { + "orientation": "horizontal", + "padding": 10, + "sectionVariant": "default", + "variant": "none" }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "always", - "tooltip": { - "hideZeros": false, - "maxHeight": 600, - "mode": "single", - "sort": "none" - } + "reset": { + "backgroundColor": "purple", + "foregroundColor": "yellow", + "icon": "process", + "text": "Reset", + "variant": "hidden" + }, + "resetAction": { + "code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": false, + "getPayload": "return {}", + "mode": "initial", + "payload": {} + }, + "saveDefault": { + "icon": "save", + "text": "Save Default", + "variant": "hidden" + }, + "submit": { + "backgroundColor": "yellow", + "foregroundColor": "#000007", + "icon": "eye", + "text": "Suspicious", + "variant": "custom" + }, + "sync": false, + "update": { + "code": "if (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": true, + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "const payload = {};\ncontext.panel.elements.forEach((element) => {\n if (!element.value) {\n return;\n }\n payload[element.id] = element.value;\n})\nreturn payload;", + "method": "POST", + "payload": { + "columns": [], + "filters": [], + "format": "table", + "global_query_id": "", + "parser": "backend", + "refId": "", + "root_selector": "", + "source": "url", + "type": "json", + "url": "${station}/antennafield/${Selection}/power/${payload.statusset}", + "url_options": { + "body_content_type": "text/plain", + "body_type": "raw", + "data": "", + "method": "POST" + } + }, + "payloadMode": "updated", + "url": "http://${station2}-lcu.lofar.eu:50053/v1/${station2}/antenna/HBA/${HBA_Tile}/status/1" + }, + "updateEnabled": "auto" }, - "pluginVersion": "11.6.0", + "pluginVersion": "5.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, - "disableTextWrap": false, - "editorMode": "builder", - "exemplar": false, - "expr": "ds_antenna_status_int{host=\"$station\", member=\"HBA0\"} * on(host, member, x) ds_antenna_names_info{str_value=~\"$HBA0_Tile\"}", - "format": "time_series", - "fullMetaSearch": false, - "hide": false, - "includeNullMetadata": true, + "expr": "", "instant": false, - "legendFormat": "AntennaStatusInt", "range": true, - "refId": "AntennaStatusInt", - "useBackend": false + "refId": "A" } ], - "title": "Details selected HBA0 $HBA0_Tile", - "type": "state-timeline" + "title": "", + "transparent": true, + "type": "volkovlabs-form-panel" } ], - "title": "Control - HBA0 tile - set status (Core stations)", + "title": "Control - HBA tile - $HBA_Tile - set status (RS)", "type": "row" }, { @@ -3620,106 +4060,95 @@ "h": 1, "w": 24, "x": 0, - "y": 12 + "y": 15 }, - "id": 175, + "id": 195, "panels": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, + "description": "", "fieldConfig": { "defaults": {}, "overrides": [] }, "gridPos": { - "h": 4, - "w": 8, + "h": 2, + "w": 2, "x": 0, - "y": 140 + "y": 22 }, - "id": 176, + "id": 201, "options": { "buttonGroup": { - "orientation": "center", - "size": "lg" + "orientation": "left", + "size": "md" }, "confirmModal": { - "body": "Are you sure you want to set this Status", + "body": "Are you sure you want to change the status", "cancel": "Cancel", "columns": { "include": [ "name", "newValue" ], - "name": "Label", - "newValue": "New Value", + "name": "Set to OK", + "newValue": "New value", "oldValue": "Old Value" }, "confirm": "Confirm", "elementDisplayMode": "modified", - "title": "Are you sure you want to set this Status" + "title": "Are you sure you want to change the status" }, "elementValueChanged": "", "elements": [ { - "allowCustomValue": false, - "background": "#ccccdc", - "fieldName": "", - "id": "statusset", - "labelBackground": "#ccccdc", - "labelColor": "#000000", + "backgroundColor": "#37872D", + "buttonLabel": "ON ", + "customCode": "", + "foregroundColor": "#ccccdc", + "id": "poweron", "labelWidth": 10, - "options": [ - { - "icon": "check", - "id": "0", - "label": "OK", - "type": "number", - "value": 0 - }, - { - "icon": "question-circle", - "id": "1", - "label": "SUSPICIOUS", - "type": "number", - "value": 1 - }, - { - "icon": "link-broken", - "id": "2", - "label": "BROKEN", - "type": "number", - "value": 2 - }, - { - "icon": "bolt", - "id": "3", - "label": "BEYOND_REPAIR", - "type": "number", - "value": 3 - } - ], - "optionsSource": "Custom", "section": "", - "showIf": "", - "title": "status", + "show": "form", + "size": "md", + "title": "Power", "tooltip": "", - "type": "select", + "type": "button", "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", "unit": "", - "value": "" + "value": "", + "variant": "custom" + }, + { + "backgroundColor": "", + "buttonLabel": "OFF", + "customCode": "", + "foregroundColor": "", + "id": "poweroff", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "14f64691-837b-4346-9804-45366a235737", + "unit": "", + "value": "", + "variant": "destructive" } ], "initial": { "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", "contentType": "application/json", - "datasource": "prometheus", + "datasource": "fec5bpxn3sz5sf", "getPayload": "return {}", "highlight": false, "highlightColor": "red", - "method": "GET", + "method": "-", "payload": { "disableTextWrap": false, "editorMode": "code", @@ -3733,13 +4162,13 @@ "range": false, "useBackend": false }, - "url": "${station}/antenna/HBA1/${HBA1_Tile}" + "url": "${station}/antenna/LBA/${LBA_Antenna}" }, "layout": { "orientation": "horizontal", "padding": 10, "sectionVariant": "default", - "variant": "single" + "variant": "none" }, "reset": { "backgroundColor": "purple", @@ -3761,15 +4190,15 @@ "variant": "hidden" }, "submit": { - "backgroundColor": "purple", - "foregroundColor": "yellow", - "icon": "save", - "text": "Submit", - "variant": "primary" + "backgroundColor": "dark-green", + "foregroundColor": "text", + "icon": "power", + "text": "GOOD", + "variant": "custom" }, "sync": false, "update": { - "code": "Set\nstation = ${ Station2 },\nantenna = ${ LBA_Antenna },\nstatusset = ${ __data.fields.status }\n\nif (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "code": "if (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", "confirm": true, "contentType": "application/json", "datasource": "fec5bpxn3sz5sf", @@ -3785,7 +4214,7 @@ "root_selector": "", "source": "url", "type": "json", - "url": "${station}/antenna/HBA1/${HBA1_Tile}/status/${payload.statusset}", + "url": "${station}/antennafield/${Selection}/power/${payload.statusset}", "url_options": { "body_content_type": "text/plain", "body_type": "raw", @@ -3794,7 +4223,7 @@ } }, "payloadMode": "updated", - "url": "http://${station}.control.lofar:50053/post/${station}/antenna/LBA/${LBA_Antenna}/status/${__data.fields.statusset}" + "url": "http://${station2}-lcu.lofar.eu:50053/v1/${station2}/antenna/HBA0/${HBA0_Tile}/status/0" }, "updateEnabled": "auto" }, @@ -3805,105 +4234,195 @@ "type": "prometheus", "uid": "prometheus" }, + "expr": "", + "instant": false, + "range": true, "refId": "A" } ], - "title": "Control - Antenna Status Set - HBA1 $HBA1_Tile", + "title": "", "transparent": true, "type": "volkovlabs-form-panel" }, { "datasource": { - "type": "innius-grpc-datasource", - "uid": "benr3nvweawaoa" + "type": "prometheus", + "uid": "prometheus" }, + "description": "", "fieldConfig": { "defaults": {}, "overrides": [] }, "gridPos": { - "h": 8, - "w": 16, - "x": 8, - "y": 140 + "h": 2, + "w": 2, + "x": 2, + "y": 22 }, - "id": 178, + "id": 205, "options": { - "allData": {}, - "config": {}, - "data": [], - "imgFormat": "png", - "layout": { - "font": { - "family": "Inter, Helvetica, Arial, sans-serif" - }, - "margin": { - "b": 0, - "l": 0, - "r": 0, - "t": 0 - }, - "title": { - "automargin": true + "buttonGroup": { + "orientation": "center", + "size": "sm" + }, + "confirmModal": { + "body": "Are you sure you want to change the status", + "cancel": "Cancel", + "columns": { + "include": [ + "name", + "newValue" + ], + "name": "Set to Broken", + "newValue": "New value", + "oldValue": "Old Value" }, - "xaxis": { - "automargin": true, - "autorange": true, - "ticksuffix": "Hz", - "type": "int" + "confirm": "Confirm", + "elementDisplayMode": "modified", + "title": "Are you sure you want to change the status" + }, + "elementValueChanged": "", + "elements": [ + { + "backgroundColor": "#37872D", + "buttonLabel": "ON ", + "customCode": "", + "foregroundColor": "#ccccdc", + "id": "poweron", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", + "unit": "", + "value": "", + "variant": "custom" }, - "yaxis": { - "automargin": true, - "autorange": false, - "range": [ - 50, - 125 - ], - "ticksuffix": "dB" + { + "backgroundColor": "", + "buttonLabel": "OFF", + "customCode": "", + "foregroundColor": "", + "id": "poweroff", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "14f64691-837b-4346-9804-45366a235737", + "unit": "", + "value": "", + "variant": "destructive" } + ], + "initial": { + "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "return {}", + "highlight": false, + "highlightColor": "red", + "method": "-", + "payload": { + "disableTextWrap": false, + "editorMode": "code", + "exemplar": false, + "expr": "(ds_antenna_status_int{host=\"$Station\", member=\"$LBA_Antenna\"} > 0) * on(host, member, x) ds_antenna_names_info", + "format": "time_series", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "{{label_name}}", + "range": false, + "useBackend": false + }, + "url": "${station}/antenna/LBA/${LBA_Antenna}" }, - "onclick": "// Event handling\n/*\n// 'data', 'variables', 'options', 'utils', and 'event' are passed as arguments\n\ntry {\n const { type: eventType, data: eventData } = event;\n const { timeZone, dayjs, locationService, getTemplateSrv } = utils;\n\n switch (eventType) {\n case 'click':\n console.log('Click event:', eventData.points);\n break;\n case 'select':\n console.log('Selection event:', eventData.range);\n break;\n case 'zoom':\n console.log('Zoom event:', eventData);\n break;\n default:\n console.log('Unhandled event type:', eventType, eventData);\n }\n\n console.log('Current time zone:', timeZone);\n console.log('From time:', dayjs(variables.__from).format());\n console.log('To time:', dayjs(variables.__to).format());\n\n // Example of using locationService\n // locationService.partial({ 'var-example': 'test' }, true);\n\n} catch (error) {\n console.error('Error in onclick handler:', error);\n}\n*/\n ", - "resScale": 2, - "script": "if (!data.series || !data.series.length) {\n return { data: [], layout: { title: { text: 'No data available' } } };\n}\n\nlet series = data.series[0];\nlet timestamp = new Date(series.fields[0].values[0]);\nlet frequency = series.fields.find(x => x.name === \"frequency\");\nlet power = series.fields.filter(x => x.name === \"power\");\nlet selectedTilesOriginal = variables.HBA1_Tile.current.value;\nif (!Array.isArray(selectedTilesOriginal)) {\n selectedTilesOriginal = [selectedTilesOriginal];\n}\nlet selectedTiles = selectedTilesOriginal.map(t => String(parseInt(t.replace(/^Tile/, '')) - 24).padStart(3, '0'));\n\nlet selectedPols = variables?.pol?.current?.value;\nif (!Array.isArray(selectedPols)) {\n selectedPols = [selectedPols];\n}\n\nlet lines = [];\n\nfor (const row of power) {\n const tileLabel = row.labels?.antenna; \n const polLabel = row.labels?.pol;\n\n if (!tileLabel || !polLabel) {\n continue;\n }\n\n const normalizedTile = tileLabel.replace(/^Tile/, '').padStart(3, '0');\n\n if (\n selectedTiles.includes(normalizedTile) &&\n selectedPols.includes(polLabel) &&\n Array.isArray(frequency?.values) &&\n Array.isArray(row?.values) &&\n row.values.length\n ) {\n lines.push({\n x: frequency.values,\n y: row.values,\n type: 'scatter',\n name: tileLabel + \" - \" + polLabel,\n colorscale: 'Viridis',\n });\n }\n}\n\nif (!lines.length) {\n return { data: [], layout: { title: { text: 'No matching data found' } } };\n}\n\nreturn {\n data: lines,\n layout: {\n xaxis: { title: 'subband' },\n yaxis: { title: 'power' },\n title: {\n text: selectedTilesOriginal.join(\", \") + ' SST Spectrum @ ' + timestamp.toISOString(),\n },\n },\n};\n", - "syncTimeRange": false, - "timeCol": "" + "layout": { + "orientation": "horizontal", + "padding": 10, + "sectionVariant": "default", + "variant": "none" + }, + "reset": { + "backgroundColor": "purple", + "foregroundColor": "yellow", + "icon": "process", + "text": "Reset", + "variant": "hidden" + }, + "resetAction": { + "code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": false, + "getPayload": "return {}", + "mode": "initial", + "payload": {} + }, + "saveDefault": { + "icon": "save", + "text": "Save Default", + "variant": "hidden" + }, + "submit": { + "backgroundColor": "dark-blue", + "foregroundColor": "text", + "icon": "bug", + "text": "Beyond Rep.", + "variant": "custom" + }, + "sync": false, + "update": { + "code": "if (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": true, + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "const payload = {};\ncontext.panel.elements.forEach((element) => {\n if (!element.value) {\n return;\n }\n payload[element.id] = element.value;\n})\nreturn payload;", + "method": "POST", + "payload": { + "columns": [], + "filters": [], + "format": "table", + "global_query_id": "", + "parser": "backend", + "refId": "", + "root_selector": "", + "source": "url", + "type": "json", + "url": "${station}/antennafield/${Selection}/power/${payload.statusset}", + "url_options": { + "body_content_type": "text/plain", + "body_type": "raw", + "data": "", + "method": "POST" + } + }, + "payloadMode": "updated", + "url": "http://${station2}-lcu.lofar.eu:50053/v1/${station2}/antenna/HBA0/${HBA0_Tile}/status/3" + }, + "updateEnabled": "auto" }, - "pluginVersion": "1.8.1", + "pluginVersion": "5.1.0", "targets": [ { "datasource": { - "type": "innius-grpc-datasource", - "uid": "benr3nvweawaoa" + "type": "prometheus", + "uid": "prometheus" }, - "dimensions": [ - { - "id": "10", - "key": "station", - "value": "$station" - }, - { - "id": "11", - "key": "pol", - "value": "$pol" - }, - { - "id": "12", - "key": "antenna_field", - "value": "HBA1" - } - ], - "metrics": [ - { - "metricId": "SST" - } - ], - "queryOptions": {}, - "queryType": "GetMetricAggregate", + "expr": "", + "instant": false, + "range": true, "refId": "A" } ], - "title": "SST (Power) for HBA1 $HBA1_Tile", - "type": "nline-plotlyjs-panel" + "title": "", + "transparent": true, + "type": "volkovlabs-form-panel" }, { "datasource": { @@ -4002,12 +4521,12 @@ ] }, "gridPos": { - "h": 4, - "w": 8, - "x": 0, - "y": 144 + "h": 6, + "w": 12, + "x": 4, + "y": 22 }, - "id": 177, + "id": 197, "options": { "alignValue": "center", "legend": { @@ -4025,7 +4544,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "datasource": { @@ -4033,9 +4552,9 @@ "uid": "prometheus" }, "disableTextWrap": false, - "editorMode": "builder", + "editorMode": "code", "exemplar": false, - "expr": "ds_antenna_status_int{host=\"$station\", member=\"HBA1\"} * on(host, member, x) ds_antenna_names_info{str_value=~\"$HBA1_Tile\"}", + "expr": "ds_antenna_status_int{host=\"$station\", member=\"HBA0\"} * on(host, member, x) ds_antenna_names_info{str_value=~\"$HBA0_Tile\"}", "format": "time_series", "fullMetaSearch": false, "hide": false, @@ -4047,109 +4566,191 @@ "useBackend": false } ], - "title": "Details selected HBA1 $HBA1_Tile", + "title": "Details selected HBA0 $HBA_Tile", "type": "state-timeline" - } - ], - "title": "Control - HBA1 tile - set status (Core stations)", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 122, - "panels": [ + }, { "datasource": { - "type": "prometheus", - "uid": "prometheus" + "type": "innius-grpc-datasource", + "uid": "grafanarpcserver" }, - "description": "Control - power down $Selection", "fieldConfig": { "defaults": {}, "overrides": [] }, "gridPos": { - "h": 4, + "h": 6, "w": 8, - "x": 0, - "y": 149 + "x": 16, + "y": 22 }, - "id": 123, + "id": 200, "options": { - "buttonGroup": { - "orientation": "center", - "size": "lg" - }, - "confirmModal": { - "body": "Are you sure you want to set this Status", - "cancel": "Cancel", - "columns": { - "include": [ - "name", - "newValue" - ], - "name": "Power down", - "newValue": "New value", - "oldValue": "Old Value" + "allData": {}, + "config": {}, + "data": [], + "imgFormat": "png", + "layout": { + "font": { + "family": "Inter, Helvetica, Arial, sans-serif" }, - "confirm": "Confirm", - "elementDisplayMode": "modified", - "title": "Are you sure you want to set this Status" - }, - "elementValueChanged": "", - "elements": [ - { - "allowCustomValue": false, - "background": "#C4162A", - "fieldName": "", - "id": "statusset", - "labelBackground": "#C4162A", - "labelColor": "#FADE2A", - "labelWidth": 10, - "options": [ - { - "icon": "bolt", - "id": "0", - "label": "ON", - "type": "number", - "value": 0 - }, - { - "icon": "toggle-off", - "id": "1", - "label": "OFF", - "type": "number", - "value": 1 - } + "margin": { + "b": 0, + "l": 0, + "r": 0, + "t": 0 + }, + "title": { + "automargin": true + }, + "xaxis": { + "automargin": true, + "autorange": true, + "ticksuffix": "Hz", + "type": "int" + }, + "yaxis": { + "automargin": true, + "autorange": false, + "range": [ + 50, + 125 ], - "optionsSource": "Custom", - "section": "", - "showIf": "", - "title": "STATUS", - "tooltip": "", - "type": "select", - "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", - "unit": "", - "value": "" + "ticksuffix": "dB" } - ], - "initial": { - "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", - "contentType": "application/json", - "datasource": "fec5bpxn3sz5sf", - "getPayload": "return {}", - "highlight": false, - "highlightColor": "red", - "method": "GET", - "payload": { - "disableTextWrap": false, - "editorMode": "code", + }, + "onclick": "// Event handling\n/*\n// 'data', 'variables', 'options', 'utils', and 'event' are passed as arguments\n\ntry {\n const { type: eventType, data: eventData } = event;\n const { timeZone, dayjs, locationService, getTemplateSrv } = utils;\n\n switch (eventType) {\n case 'click':\n console.log('Click event:', eventData.points);\n break;\n case 'select':\n console.log('Selection event:', eventData.range);\n break;\n case 'zoom':\n console.log('Zoom event:', eventData);\n break;\n default:\n console.log('Unhandled event type:', eventType, eventData);\n }\n\n console.log('Current time zone:', timeZone);\n console.log('From time:', dayjs(variables.__from).format());\n console.log('To time:', dayjs(variables.__to).format());\n\n // Example of using locationService\n // locationService.partial({ 'var-example': 'test' }, true);\n\n} catch (error) {\n console.error('Error in onclick handler:', error);\n}\n*/\n ", + "resScale": 2, + "script": "if (!data.series || !data.series.length) {\n return { data: [], layout: { title: { text: 'No data available' } } };\n}\n\nlet series = data.series[0];\nlet timestamp = new Date(series.fields[0].values[0]);\nlet frequency = series.fields.find(x => x.name === \"frequency\");\nlet power = series.fields.filter(x => x.name === \"power\");\n\nlet selectedTilesOriginal = variables.HBA0_Tile.current.value;\nif (!Array.isArray(selectedTilesOriginal)) {\n selectedTilesOriginal = [selectedTilesOriginal];\n}\n\nlet selectedTiles = selectedTilesOriginal.map(t => t.replace(/^Tile/, '').padStart(3, '0'));\n\nlet selectedPols = variables?.pol?.current?.value;\nif (!Array.isArray(selectedPols)) {\n selectedPols = [selectedPols];\n}\n\nlet lines = [];\n\nfor (const row of power) {\n const tileLabel = row.labels?.antenna; \n const polLabel = row.labels?.pol;\n\n if (!tileLabel || !polLabel) {\n continue;\n }\n\n const normalizedTile = tileLabel.replace(/^Tile/, '').padStart(3, '0');\n\n if (\n selectedTiles.includes(normalizedTile) &&\n selectedPols.includes(polLabel) &&\n Array.isArray(frequency?.values) &&\n Array.isArray(row?.values) &&\n row.values.length\n ) {\n lines.push({\n x: frequency.values,\n y: row.values,\n type: 'scatter',\n name: tileLabel + \" - \" + polLabel,\n colorscale: 'Viridis',\n });\n }\n}\n\nif (!lines.length) {\n return { data: [], layout: { title: { text: 'No matching data found' } } };\n}\n\nreturn {\n data: lines,\n layout: {\n xaxis: { title: 'subband' },\n yaxis: { title: 'power' },\n title: {\n text: selectedTilesOriginal.map(t => 'Tile' + t.replace(/^Tile/, '')).join(\", \") + ' SST Spectrum @ ' + timestamp.toISOString(),\n },\n },\n};\n", + "syncTimeRange": false, + "timeCol": "" + }, + "pluginVersion": "1.8.1", + "targets": [ + { + "datasource": { + "type": "innius-grpc-datasource", + "uid": "grafanarpcserver" + }, + "dimensions": [ + { + "id": "1", + "key": "pol", + "value": "$pol" + }, + { + "id": "3", + "key": "station", + "value": "$station2" + }, + { + "id": "4", + "key": "antenna_field", + "value": "HBA0" + } + ], + "displayName": "", + "metrics": [ + { + "metricId": "SST" + } + ], + "queryOptions": {}, + "queryType": "GetMetricAggregate", + "refId": "A" + } + ], + "title": "HBA0 spectrum $station2", + "type": "nline-plotlyjs-panel" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 0, + "y": 24 + }, + "id": 203, + "options": { + "buttonGroup": { + "orientation": "left", + "size": "md" + }, + "confirmModal": { + "body": "Are you sure you want to change the status", + "cancel": "Cancel", + "columns": { + "include": [ + "name", + "newValue" + ], + "name": "Set to Broken", + "newValue": "New value", + "oldValue": "Old Value" + }, + "confirm": "Confirm", + "elementDisplayMode": "modified", + "title": "Are you sure you want to change the status" + }, + "elementValueChanged": "", + "elements": [ + { + "backgroundColor": "#37872D", + "buttonLabel": "ON ", + "customCode": "", + "foregroundColor": "#ccccdc", + "id": "poweron", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", + "unit": "", + "value": "", + "variant": "custom" + }, + { + "backgroundColor": "", + "buttonLabel": "OFF", + "customCode": "", + "foregroundColor": "", + "id": "poweroff", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "14f64691-837b-4346-9804-45366a235737", + "unit": "", + "value": "", + "variant": "destructive" + } + ], + "initial": { + "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "return {}", + "highlight": false, + "highlightColor": "red", + "method": "-", + "payload": { + "disableTextWrap": false, + "editorMode": "code", "exemplar": false, "expr": "(ds_antenna_status_int{host=\"$Station\", member=\"$LBA_Antenna\"} > 0) * on(host, member, x) ds_antenna_names_info", "format": "time_series", @@ -4160,13 +4761,13 @@ "range": false, "useBackend": false }, - "url": "${station}/RCU/${Selection}/${payload.statusset}" + "url": "${station}/antenna/LBA/${LBA_Antenna}" }, "layout": { "orientation": "horizontal", "padding": 10, "sectionVariant": "default", - "variant": "single" + "variant": "none" }, "reset": { "backgroundColor": "purple", @@ -4189,9 +4790,9 @@ }, "submit": { "backgroundColor": "dark-red", - "foregroundColor": "yellow", - "icon": "save", - "text": "Submit", + "foregroundColor": "text", + "icon": "heart-break", + "text": "Broken", "variant": "custom" }, "sync": false, @@ -4221,7 +4822,7 @@ } }, "payloadMode": "updated", - "url": "http://${station}.control.lofar:50053/post/${station}/antennafield/${Selection}/power/${payload.statusset}" + "url": "http://${station2}-lcu.lofar.eu:50053/v1/${station2}/antenna/HBA0/${HBA0_Tile}/status/2" }, "updateEnabled": "auto" }, @@ -4232,10 +4833,13 @@ "type": "prometheus", "uid": "prometheus" }, + "expr": "", + "instant": false, + "range": true, "refId": "A" } ], - "title": "Control - power down $Selection", + "title": "", "transparent": true, "type": "volkovlabs-form-panel" }, @@ -4244,615 +4848,3516 @@ "type": "prometheus", "uid": "prometheus" }, - "description": "This is the total DC current to the LBA subrack", + "description": "", "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [], - "max": 35, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "green", - "value": 5 - }, - { - "color": "dark-red", - "value": 10 - }, - { - "color": "dark-red", - "value": 24 - }, - { - "color": "dark-green", - "value": 25 - }, - { - "color": "dark-green", - "value": 32 - }, - { - "color": "dark-red", - "value": 33 - }, - { - "color": "dark-red", - "value": 60 - } - ] - }, - "unit": "amp" - }, + "defaults": {}, "overrides": [] }, "gridPos": { - "h": 5, + "h": 2, "w": 2, - "x": 8, - "y": 149 + "x": 2, + "y": 24 }, - "id": 124, + "id": 207, "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "buttonGroup": { + "orientation": "center", + "size": "sm" }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "pluginVersion": "11.6.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" + "confirmModal": { + "body": "Are you sure you want to change the status", + "cancel": "Cancel", + "columns": { + "include": [ + "name", + "newValue" + ], + "name": "Set to Suspicious", + "newValue": "New value", + "oldValue": "Old Value" }, - "disableTextWrap": false, - "editorMode": "builder", - "exemplar": false, - "expr": "loadCurrent{instance=~\"pcon0-snmp\", host=\"$station\"}", - "fullMetaSearch": false, - "hide": false, - "includeNullMetadata": true, - "instant": false, - "legendFormat": "loadCurrent {{instance}}", - "range": true, - "refId": "D", - "useBackend": false - } - ], - "title": "Amp LBA", - "transformations": [ - { - "id": "concatenate", - "options": { - "frameNameLabel": "frame", - "frameNameMode": "drop" - } - } - ], - "type": "gauge" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "description": "This is the total DC current to the LBA subrack", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" + "confirm": "Confirm", + "elementDisplayMode": "modified", + "title": "Are you sure you want to change the status" + }, + "elementValueChanged": "", + "elements": [ + { + "backgroundColor": "#37872D", + "buttonLabel": "ON ", + "customCode": "", + "foregroundColor": "#ccccdc", + "id": "poweron", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", + "unit": "", + "value": "", + "variant": "custom" }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", + { + "backgroundColor": "", + "buttonLabel": "OFF", + "customCode": "", + "foregroundColor": "", + "id": "poweroff", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "14f64691-837b-4346-9804-45366a235737", + "unit": "", + "value": "", + "variant": "destructive" + } + ], + "initial": { + "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "return {}", + "highlight": false, + "highlightColor": "red", + "method": "-", + "payload": { + "disableTextWrap": false, + "editorMode": "code", + "exemplar": false, + "expr": "(ds_antenna_status_int{host=\"$Station\", member=\"$LBA_Antenna\"} > 0) * on(host, member, x) ds_antenna_names_info", + "format": "time_series", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "{{label_name}}", + "range": false, + "useBackend": false + }, + "url": "${station}/antenna/LBA/${LBA_Antenna}" + }, + "layout": { + "orientation": "horizontal", + "padding": 10, + "sectionVariant": "default", + "variant": "none" + }, + "reset": { + "backgroundColor": "purple", + "foregroundColor": "yellow", + "icon": "process", + "text": "Reset", + "variant": "hidden" + }, + "resetAction": { + "code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": false, + "getPayload": "return {}", + "mode": "initial", + "payload": {} + }, + "saveDefault": { + "icon": "save", + "text": "Save Default", + "variant": "hidden" + }, + "submit": { + "backgroundColor": "yellow", + "foregroundColor": "#000007", + "icon": "eye", + "text": "Suspicious", + "variant": "custom" + }, + "sync": false, + "update": { + "code": "if (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": true, + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "const payload = {};\ncontext.panel.elements.forEach((element) => {\n if (!element.value) {\n return;\n }\n payload[element.id] = element.value;\n})\nreturn payload;", + "method": "POST", + "payload": { + "columns": [], + "filters": [], + "format": "table", + "global_query_id": "", + "parser": "backend", + "refId": "", + "root_selector": "", + "source": "url", + "type": "json", + "url": "${station}/antennafield/${Selection}/power/${payload.statusset}", + "url_options": { + "body_content_type": "text/plain", + "body_type": "raw", + "data": "", + "method": "POST" + } + }, + "payloadMode": "updated", + "url": "http://${station2}-lcu.lofar.eu:50053/v1/${station2}/antenna/HBA0/${HBA0_Tile}/status/1" + }, + "updateEnabled": "auto" + }, + "pluginVersion": "5.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "", + "instant": false, + "range": true, + "refId": "A" + } + ], + "title": "", + "transparent": true, + "type": "volkovlabs-form-panel" + } + ], + "title": "Control - HBA0 tile - $HBA0_Tile - set status (CS)", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 16 + }, + "id": 196, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 0, + "y": 23 + }, + "id": 202, + "options": { + "buttonGroup": { + "orientation": "left", + "size": "md" + }, + "confirmModal": { + "body": "Are you sure you want to change the status", + "cancel": "Cancel", + "columns": { + "include": [ + "name", + "newValue" + ], + "name": "Set to OK", + "newValue": "New value", + "oldValue": "Old Value" + }, + "confirm": "Confirm", + "elementDisplayMode": "modified", + "title": "Are you sure you want to change the status" + }, + "elementValueChanged": "", + "elements": [ + { + "backgroundColor": "#37872D", + "buttonLabel": "ON ", + "customCode": "", + "foregroundColor": "#ccccdc", + "id": "poweron", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", + "unit": "", + "value": "", + "variant": "custom" + }, + { + "backgroundColor": "", + "buttonLabel": "OFF", + "customCode": "", + "foregroundColor": "", + "id": "poweroff", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "14f64691-837b-4346-9804-45366a235737", + "unit": "", + "value": "", + "variant": "destructive" + } + ], + "initial": { + "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "return {}", + "highlight": false, + "highlightColor": "red", + "method": "-", + "payload": { + "disableTextWrap": false, + "editorMode": "code", + "exemplar": false, + "expr": "(ds_antenna_status_int{host=\"$Station\", member=\"$LBA_Antenna\"} > 0) * on(host, member, x) ds_antenna_names_info", + "format": "time_series", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "{{label_name}}", + "range": false, + "useBackend": false + }, + "url": "${station}/antenna/LBA/${LBA_Antenna}" + }, + "layout": { + "orientation": "horizontal", + "padding": 10, + "sectionVariant": "default", + "variant": "none" + }, + "reset": { + "backgroundColor": "purple", + "foregroundColor": "yellow", + "icon": "process", + "text": "Reset", + "variant": "hidden" + }, + "resetAction": { + "code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": false, + "getPayload": "return {}", + "mode": "initial", + "payload": {} + }, + "saveDefault": { + "icon": "save", + "text": "Save Default", + "variant": "hidden" + }, + "submit": { + "backgroundColor": "dark-green", + "foregroundColor": "text", + "icon": "power", + "text": "GOOD", + "variant": "custom" + }, + "sync": false, + "update": { + "code": "if (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": true, + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "const payload = {};\ncontext.panel.elements.forEach((element) => {\n if (!element.value) {\n return;\n }\n payload[element.id] = element.value;\n})\nreturn payload;", + "method": "POST", + "payload": { + "columns": [], + "filters": [], + "format": "table", + "global_query_id": "", + "parser": "backend", + "refId": "", + "root_selector": "", + "source": "url", + "type": "json", + "url": "${station}/antennafield/${Selection}/power/${payload.statusset}", + "url_options": { + "body_content_type": "text/plain", + "body_type": "raw", + "data": "", + "method": "POST" + } + }, + "payloadMode": "updated", + "url": "http://${station2}-lcu.lofar.eu:50053/v1/${station2}/antenna/HBA1/${HBA1_Tile}/status/0" + }, + "updateEnabled": "auto" + }, + "pluginVersion": "5.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "", + "instant": false, + "range": true, + "refId": "A" + } + ], + "title": "", + "transparent": true, + "type": "volkovlabs-form-panel" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 2, + "y": 23 + }, + "id": 206, + "options": { + "buttonGroup": { + "orientation": "center", + "size": "sm" + }, + "confirmModal": { + "body": "Are you sure you want to change the status", + "cancel": "Cancel", + "columns": { + "include": [ + "name", + "newValue" + ], + "name": "Set to Broken", + "newValue": "New value", + "oldValue": "Old Value" + }, + "confirm": "Confirm", + "elementDisplayMode": "modified", + "title": "Are you sure you want to change the status" + }, + "elementValueChanged": "", + "elements": [ + { + "backgroundColor": "#37872D", + "buttonLabel": "ON ", + "customCode": "", + "foregroundColor": "#ccccdc", + "id": "poweron", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", + "unit": "", + "value": "", + "variant": "custom" + }, + { + "backgroundColor": "", + "buttonLabel": "OFF", + "customCode": "", + "foregroundColor": "", + "id": "poweroff", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "14f64691-837b-4346-9804-45366a235737", + "unit": "", + "value": "", + "variant": "destructive" + } + ], + "initial": { + "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "return {}", + "highlight": false, + "highlightColor": "red", + "method": "-", + "payload": { + "disableTextWrap": false, + "editorMode": "code", + "exemplar": false, + "expr": "(ds_antenna_status_int{host=\"$Station\", member=\"$LBA_Antenna\"} > 0) * on(host, member, x) ds_antenna_names_info", + "format": "time_series", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "{{label_name}}", + "range": false, + "useBackend": false + }, + "url": "${station}/antenna/LBA/${LBA_Antenna}" + }, + "layout": { + "orientation": "horizontal", + "padding": 10, + "sectionVariant": "default", + "variant": "none" + }, + "reset": { + "backgroundColor": "purple", + "foregroundColor": "yellow", + "icon": "process", + "text": "Reset", + "variant": "hidden" + }, + "resetAction": { + "code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": false, + "getPayload": "return {}", + "mode": "initial", + "payload": {} + }, + "saveDefault": { + "icon": "save", + "text": "Save Default", + "variant": "hidden" + }, + "submit": { + "backgroundColor": "dark-blue", + "foregroundColor": "text", + "icon": "bug", + "text": "Beyond Rep.", + "variant": "custom" + }, + "sync": false, + "update": { + "code": "if (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": true, + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "const payload = {};\ncontext.panel.elements.forEach((element) => {\n if (!element.value) {\n return;\n }\n payload[element.id] = element.value;\n})\nreturn payload;", + "method": "POST", + "payload": { + "columns": [], + "filters": [], + "format": "table", + "global_query_id": "", + "parser": "backend", + "refId": "", + "root_selector": "", + "source": "url", + "type": "json", + "url": "${station}/antennafield/${Selection}/power/${payload.statusset}", + "url_options": { + "body_content_type": "text/plain", + "body_type": "raw", + "data": "", + "method": "POST" + } + }, + "payloadMode": "updated", + "url": "http://${station2}-lcu.lofar.eu:50053/v1/${station2}/antenna/HBA1/${HBA1_Tile}/status/3" + }, + "updateEnabled": "auto" + }, + "pluginVersion": "5.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "", + "instant": false, + "range": true, + "refId": "A" + } + ], + "title": "", + "transparent": true, + "type": "volkovlabs-form-panel" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "\n", + "fieldConfig": { + "defaults": { + "color": { + "mode": "shades" + }, + "custom": { + "axisPlacement": "auto", + "fillOpacity": 70, + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineWidth": 0, + "spanNulls": false + }, + "fieldMinMax": false, + "mappings": [], + "noValue": "???", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text" + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "AntennaStatusInt" + }, + "properties": [ + { + "id": "displayName", + "value": "Status" + }, + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "color": "dark-green", + "index": 0, + "text": "Operational" + }, + "1": { + "color": "dark-yellow", + "index": 1, + "text": "Suspicious" + }, + "2": { + "color": "dark-red", + "index": 2, + "text": "Broken" + }, + "3": { + "color": "dark-blue", + "index": 3, + "text": "BeyondRepair" + }, + "4": { + "color": "text", + "index": 4, + "text": "NotAvailable" + } + }, + "type": "value" + }, + { + "options": { + "match": "null+nan", + "result": { + "color": "dark-purple", + "index": 5, + "text": "NaN" + } + }, + "type": "special" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 4, + "y": 23 + }, + "id": 198, + "options": { + "alignValue": "center", + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "mergeValues": true, + "rowHeight": 0.9, + "showValue": "always", + "tooltip": { + "hideZeros": false, + "maxHeight": 600, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.0.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "disableTextWrap": false, + "editorMode": "code", + "exemplar": false, + "expr": "ds_antenna_status_int{host=\"$station\", member=\"HBA1\"} * on(host, member, x) ds_antenna_names_info{str_value=~\"$HBA1_Tile\"}", + "format": "time_series", + "fullMetaSearch": false, + "hide": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "AntennaStatusInt", + "range": true, + "refId": "AntennaStatusInt", + "useBackend": false + } + ], + "title": "Details selected HBA1 $HBA_Tile", + "type": "state-timeline" + }, + { + "datasource": { + "type": "innius-grpc-datasource", + "uid": "grafanarpcserver" + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 16, + "y": 23 + }, + "id": 199, + "options": { + "allData": {}, + "config": {}, + "data": [], + "imgFormat": "png", + "layout": { + "font": { + "family": "Inter, Helvetica, Arial, sans-serif" + }, + "margin": { + "b": 0, + "l": 0, + "r": 0, + "t": 0 + }, + "title": { + "automargin": true + }, + "xaxis": { + "automargin": true, + "autorange": true, + "ticksuffix": "Hz", + "type": "int" + }, + "yaxis": { + "automargin": true, + "autorange": false, + "range": [ + 50, + 125 + ], + "ticksuffix": "dB" + } + }, + "onclick": "// Event handling\n/*\n// 'data', 'variables', 'options', 'utils', and 'event' are passed as arguments\n\ntry {\n const { type: eventType, data: eventData } = event;\n const { timeZone, dayjs, locationService, getTemplateSrv } = utils;\n\n switch (eventType) {\n case 'click':\n console.log('Click event:', eventData.points);\n break;\n case 'select':\n console.log('Selection event:', eventData.range);\n break;\n case 'zoom':\n console.log('Zoom event:', eventData);\n break;\n default:\n console.log('Unhandled event type:', eventType, eventData);\n }\n\n console.log('Current time zone:', timeZone);\n console.log('From time:', dayjs(variables.__from).format());\n console.log('To time:', dayjs(variables.__to).format());\n\n // Example of using locationService\n // locationService.partial({ 'var-example': 'test' }, true);\n\n} catch (error) {\n console.error('Error in onclick handler:', error);\n}\n*/\n ", + "resScale": 2, + "script": "if (!data.series || !data.series.length) {\n return { data: [], layout: { title: { text: 'No data available' } } };\n}\n\nlet series = data.series[0];\nlet timestamp = new Date(series.fields[0].values[0]);\nlet frequency = series.fields.find(x => x.name === \"frequency\");\nlet power = series.fields.filter(x => x.name === \"power\");\n\nlet selectedTilesOriginal = variables.HBA1_Tile.current.value;\nif (!Array.isArray(selectedTilesOriginal)) {\n selectedTilesOriginal = [selectedTilesOriginal];\n}\n\nlet selectedTiles = selectedTilesOriginal.map(t => t.replace(/^Tile/, '').padStart(3, '0'));\n\nlet selectedPols = variables?.pol?.current?.value;\nif (!Array.isArray(selectedPols)) {\n selectedPols = [selectedPols];\n}\n\nlet lines = [];\n\nfor (const row of power) {\n const tileLabel = row.labels?.antenna; \n const polLabel = row.labels?.pol;\n\n if (!tileLabel || !polLabel) {\n continue;\n }\n\n const normalizedTile = tileLabel.replace(/^Tile/, '').padStart(3, '0');\n\n if (\n selectedTiles.includes(normalizedTile) &&\n selectedPols.includes(polLabel) &&\n Array.isArray(frequency?.values) &&\n Array.isArray(row?.values) &&\n row.values.length\n ) {\n lines.push({\n x: frequency.values,\n y: row.values,\n type: 'scatter',\n name: tileLabel + \" - \" + polLabel,\n colorscale: 'Viridis',\n });\n }\n}\n\nif (!lines.length) {\n return { data: [], layout: { title: { text: 'No matching data found' } } };\n}\n\nreturn {\n data: lines,\n layout: {\n xaxis: { title: 'subband' },\n yaxis: { title: 'power' },\n title: {\n text: selectedTilesOriginal.map(t => 'Tile' + t.replace(/^Tile/, '')).join(\", \") + ' SST Spectrum @ ' + timestamp.toISOString(),\n },\n },\n};\n", + "syncTimeRange": false, + "timeCol": "" + }, + "pluginVersion": "1.8.1", + "targets": [ + { + "datasource": { + "type": "innius-grpc-datasource", + "uid": "grafanarpcserver" + }, + "dimensions": [ + { + "id": "1", + "key": "pol", + "value": "$pol" + }, + { + "id": "3", + "key": "station", + "value": "$station2" + }, + { + "id": "4", + "key": "antenna_field", + "value": "HBA1" + } + ], + "displayName": "", + "metrics": [ + { + "metricId": "SST" + } + ], + "queryOptions": {}, + "queryType": "GetMetricAggregate", + "refId": "A" + } + ], + "title": "HBA1 spectrum $station2", + "type": "nline-plotlyjs-panel" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 0, + "y": 25 + }, + "id": 204, + "options": { + "buttonGroup": { + "orientation": "left", + "size": "md" + }, + "confirmModal": { + "body": "Are you sure you want to change the status", + "cancel": "Cancel", + "columns": { + "include": [ + "name", + "newValue" + ], + "name": "Set to Broken", + "newValue": "New value", + "oldValue": "Old Value" + }, + "confirm": "Confirm", + "elementDisplayMode": "modified", + "title": "Are you sure you want to change the status" + }, + "elementValueChanged": "", + "elements": [ + { + "backgroundColor": "#37872D", + "buttonLabel": "ON ", + "customCode": "", + "foregroundColor": "#ccccdc", + "id": "poweron", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", + "unit": "", + "value": "", + "variant": "custom" + }, + { + "backgroundColor": "", + "buttonLabel": "OFF", + "customCode": "", + "foregroundColor": "", + "id": "poweroff", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "14f64691-837b-4346-9804-45366a235737", + "unit": "", + "value": "", + "variant": "destructive" + } + ], + "initial": { + "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "return {}", + "highlight": false, + "highlightColor": "red", + "method": "-", + "payload": { + "disableTextWrap": false, + "editorMode": "code", + "exemplar": false, + "expr": "(ds_antenna_status_int{host=\"$Station\", member=\"$LBA_Antenna\"} > 0) * on(host, member, x) ds_antenna_names_info", + "format": "time_series", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "{{label_name}}", + "range": false, + "useBackend": false + }, + "url": "${station}/antenna/LBA/${LBA_Antenna}" + }, + "layout": { + "orientation": "horizontal", + "padding": 10, + "sectionVariant": "default", + "variant": "none" + }, + "reset": { + "backgroundColor": "purple", + "foregroundColor": "yellow", + "icon": "process", + "text": "Reset", + "variant": "hidden" + }, + "resetAction": { + "code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": false, + "getPayload": "return {}", + "mode": "initial", + "payload": {} + }, + "saveDefault": { + "icon": "save", + "text": "Save Default", + "variant": "hidden" + }, + "submit": { + "backgroundColor": "dark-red", + "foregroundColor": "text", + "icon": "heart-break", + "text": "Broken", + "variant": "custom" + }, + "sync": false, + "update": { + "code": "if (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": true, + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "const payload = {};\ncontext.panel.elements.forEach((element) => {\n if (!element.value) {\n return;\n }\n payload[element.id] = element.value;\n})\nreturn payload;", + "method": "POST", + "payload": { + "columns": [], + "filters": [], + "format": "table", + "global_query_id": "", + "parser": "backend", + "refId": "", + "root_selector": "", + "source": "url", + "type": "json", + "url": "${station}/antennafield/${Selection}/power/${payload.statusset}", + "url_options": { + "body_content_type": "text/plain", + "body_type": "raw", + "data": "", + "method": "POST" + } + }, + "payloadMode": "updated", + "url": "http://${station2}-lcu.lofar.eu:50053/v1/${station2}/antenna/HBA1/${HBA1_Tile}/status/2" + }, + "updateEnabled": "auto" + }, + "pluginVersion": "5.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "", + "instant": false, + "range": true, + "refId": "A" + } + ], + "title": "", + "transparent": true, + "type": "volkovlabs-form-panel" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 2, + "y": 25 + }, + "id": 208, + "options": { + "buttonGroup": { + "orientation": "center", + "size": "sm" + }, + "confirmModal": { + "body": "Are you sure you want to change the status", + "cancel": "Cancel", + "columns": { + "include": [ + "name", + "newValue" + ], + "name": "Set to Suspicious", + "newValue": "New value", + "oldValue": "Old Value" + }, + "confirm": "Confirm", + "elementDisplayMode": "modified", + "title": "Are you sure you want to change the status" + }, + "elementValueChanged": "", + "elements": [ + { + "backgroundColor": "#37872D", + "buttonLabel": "ON ", + "customCode": "", + "foregroundColor": "#ccccdc", + "id": "poweron", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", + "unit": "", + "value": "", + "variant": "custom" + }, + { + "backgroundColor": "", + "buttonLabel": "OFF", + "customCode": "", + "foregroundColor": "", + "id": "poweroff", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "14f64691-837b-4346-9804-45366a235737", + "unit": "", + "value": "", + "variant": "destructive" + } + ], + "initial": { + "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "return {}", + "highlight": false, + "highlightColor": "red", + "method": "-", + "payload": { + "disableTextWrap": false, + "editorMode": "code", + "exemplar": false, + "expr": "(ds_antenna_status_int{host=\"$Station\", member=\"$LBA_Antenna\"} > 0) * on(host, member, x) ds_antenna_names_info", + "format": "time_series", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "{{label_name}}", + "range": false, + "useBackend": false + }, + "url": "${station}/antenna/LBA/${LBA_Antenna}" + }, + "layout": { + "orientation": "horizontal", + "padding": 10, + "sectionVariant": "default", + "variant": "none" + }, + "reset": { + "backgroundColor": "purple", + "foregroundColor": "yellow", + "icon": "process", + "text": "Reset", + "variant": "hidden" + }, + "resetAction": { + "code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": false, + "getPayload": "return {}", + "mode": "initial", + "payload": {} + }, + "saveDefault": { + "icon": "save", + "text": "Save Default", + "variant": "hidden" + }, + "submit": { + "backgroundColor": "yellow", + "foregroundColor": "#000007", + "icon": "eye", + "text": "Suspicious", + "variant": "custom" + }, + "sync": false, + "update": { + "code": "if (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": true, + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "const payload = {};\ncontext.panel.elements.forEach((element) => {\n if (!element.value) {\n return;\n }\n payload[element.id] = element.value;\n})\nreturn payload;", + "method": "POST", + "payload": { + "columns": [], + "filters": [], + "format": "table", + "global_query_id": "", + "parser": "backend", + "refId": "", + "root_selector": "", + "source": "url", + "type": "json", + "url": "${station}/antennafield/${Selection}/power/${payload.statusset}", + "url_options": { + "body_content_type": "text/plain", + "body_type": "raw", + "data": "", + "method": "POST" + } + }, + "payloadMode": "updated", + "url": "http://${station2}-lcu.lofar.eu:50053/v1/${station2}/antenna/HBA1/${HBA1_Tile}/status/1" + }, + "updateEnabled": "auto" + }, + "pluginVersion": "5.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "", + "instant": false, + "range": true, + "refId": "A" + } + ], + "title": "", + "transparent": true, + "type": "volkovlabs-form-panel" + } + ], + "title": "Control - HBA1 tile - $HBA1_Tile - set status (CS)", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 17 + }, + "id": 122, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 0, + "y": 38 + }, + "id": 173, + "options": { + "buttonGroup": { + "orientation": "left", + "size": "md" + }, + "confirmModal": { + "body": "Are you sure you want to Power ON", + "cancel": "Cancel", + "columns": { + "include": [ + "name", + "newValue" + ], + "name": "Power ON", + "newValue": "New value", + "oldValue": "Old Value" + }, + "confirm": "Confirm", + "elementDisplayMode": "modified", + "title": "Are you sure you want to Power ON" + }, + "elementValueChanged": "", + "elements": [ + { + "backgroundColor": "#37872D", + "buttonLabel": "ON ", + "customCode": "", + "foregroundColor": "#ccccdc", + "id": "poweron", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", + "unit": "", + "value": "", + "variant": "custom" + }, + { + "backgroundColor": "", + "buttonLabel": "OFF", + "customCode": "", + "foregroundColor": "", + "id": "poweroff", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "14f64691-837b-4346-9804-45366a235737", + "unit": "", + "value": "", + "variant": "destructive" + } + ], + "initial": { + "code": "loadCurrent{ instance = ~\"pcon0-snmp\", host = \"$station\" }\nloadCurrent[0] < 25 ? 'red' : 'transparent'", + "contentType": "application/json", + "datasource": "prometheus", + "getPayload": "return {}", + "highlight": false, + "highlightColor": "red", + "method": "query", + "payload": { + "disableTextWrap": false, + "editorMode": "code", + "exemplar": false, + "expr": "(ds_antenna_status_int{host=\"$Station\", member=\"$LBA_Antenna\"} > 0) * on(host, member, x) ds_antenna_names_info", + "format": "time_series", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "{{label_name}}", + "range": false, + "useBackend": false + }, + "url": "${station}/antenna/LBA/${LBA_Antenna}" + }, + "layout": { + "orientation": "horizontal", + "padding": 10, + "sectionVariant": "default", + "variant": "none" + }, + "reset": { + "backgroundColor": "purple", + "foregroundColor": "yellow", + "icon": "process", + "text": "Reset", + "variant": "hidden" + }, + "resetAction": { + "code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": false, + "getPayload": "return {}", + "mode": "initial", + "payload": {} + }, + "saveDefault": { + "icon": "save", + "text": "Save Default", + "variant": "hidden" + }, + "submit": { + "backgroundColor": "dark-green", + "foregroundColor": "text", + "icon": "power", + "text": "ON", + "variant": "custom" + }, + "sync": true, + "update": { + "code": "if (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": true, + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "const payload = {};\ncontext.panel.elements.forEach((element) => {\n if (!element.value) {\n return;\n }\n payload[element.id] = element.value;\n})\nreturn payload;", + "method": "POST", + "payload": { + "columns": [], + "filters": [], + "format": "table", + "global_query_id": "", + "parser": "backend", + "refId": "", + "root_selector": "", + "source": "url", + "type": "json", + "url": "${station}/antennafield/${Selection}/power/${payload.statusset}", + "url_options": { + "body_content_type": "text/plain", + "body_type": "raw", + "data": "", + "method": "POST" + } + }, + "payloadMode": "updated", + "url": "http://${station2}-lcu.lofar.eu:50053/v1/${station2}/antennafield/${Selection}/power/1" + }, + "updateEnabled": "auto" + }, + "pluginVersion": "5.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "builder", + "expr": "loadCurrent{instance=~\"pcon0-snmp\", host=\"$station\"}", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "", + "transparent": true, + "type": "volkovlabs-form-panel" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "This is the total DC current to the LBA subrack", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [], + "max": 35, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "#EAB839", + "value": 5 + }, + { + "color": "semi-dark-red", + "value": 15 + }, + { + "color": "dark-red", + "value": 25 + }, + { + "color": "dark-red", + "value": 60 + } + ] + }, + "unit": "amp" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 2, + "x": 2, + "y": 38 + }, + "id": 124, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "sizing": "auto" + }, + "pluginVersion": "12.0.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "disableTextWrap": false, + "editorMode": "builder", + "exemplar": false, + "expr": "loadCurrent{instance=~\"pcon0-snmp\", host=\"$station\"}", + "fullMetaSearch": false, + "hide": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "loadCurrent {{instance}}", + "range": true, + "refId": "D", + "useBackend": false + } + ], + "title": "Amp LBA", + "transformations": [ + { + "id": "concatenate", + "options": { + "frameNameLabel": "frame", + "frameNameMode": "drop" + } + } + ], + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "This is the total DC current to the LBA subrack", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, - "thresholdsStyle": { - "mode": "off" + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "max": 35, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "#EAB839", + "value": 10 + }, + { + "color": "semi-dark-red", + "value": 20 + }, + { + "color": "dark-red", + "value": 30 + }, + { + "color": "dark-red", + "value": 60 + } + ] + }, + "unit": "amp" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 9, + "x": 4, + "y": 38 + }, + "id": 97, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.0.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "disableTextWrap": false, + "editorMode": "builder", + "exemplar": false, + "expr": "loadCurrent{instance=~\"pcon0-snmp\", host=\"$station\"}", + "fullMetaSearch": false, + "hide": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "loadCurrent {{instance}}", + "range": true, + "refId": "D", + "useBackend": false + } + ], + "title": "Stroom naar LBA", + "transformations": [ + { + "id": "concatenate", + "options": { + "frameNameLabel": "frame", + "frameNameMode": "drop" + } + } + ], + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "This is the total DC current to the HBA subrack", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [], + "max": 53, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "#EAB839", + "value": 5 + }, + { + "color": "semi-dark-red", + "value": 10 + }, + { + "color": "dark-red", + "value": 20 + }, + { + "color": "dark-red", + "value": 60 + } + ] + }, + "unit": "amp" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 2, + "x": 13, + "y": 38 + }, + "id": 125, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "sizing": "auto" + }, + "pluginVersion": "12.0.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "disableTextWrap": false, + "editorMode": "builder", + "exemplar": false, + "expr": "loadCurrent{instance=~\"pcon1-snmp\", host=\"$station\"}", + "fullMetaSearch": false, + "hide": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "loadCurrent {{instance}}", + "range": true, + "refId": "D", + "useBackend": false + } + ], + "title": "Amp HBA", + "transformations": [ + { + "id": "concatenate", + "options": { + "frameNameLabel": "frame", + "frameNameMode": "drop" + } + } + ], + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "This is the total DC current to the HBA subrack", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "max": 53, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "#EAB839", + "value": 10 + }, + { + "color": "semi-dark-red", + "value": 20 + }, + { + "color": "dark-red", + "value": 30 + }, + { + "color": "dark-red", + "value": 60 + } + ] + }, + "unit": "amp" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 9, + "x": 15, + "y": 38 + }, + "id": 98, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.0.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "disableTextWrap": false, + "editorMode": "builder", + "exemplar": false, + "expr": "loadCurrent{instance=~\"pcon1-snmp\", host=\"$station\"}", + "fullMetaSearch": false, + "hide": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "loadCurrent {{instance}}", + "range": true, + "refId": "D", + "useBackend": false + } + ], + "title": "Stroom naar HBA", + "transformations": [ + { + "id": "concatenate", + "options": { + "frameNameLabel": "frame", + "frameNameMode": "drop" + } + } + ], + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 0, + "y": 95 + }, + "id": 174, + "options": { + "buttonGroup": { + "orientation": "left", + "size": "md" + }, + "confirmModal": { + "body": "Are you sure you want to Power OFF", + "cancel": "Cancel", + "columns": { + "include": [ + "name", + "newValue" + ], + "name": "Power down", + "newValue": "New value", + "oldValue": "Old Value" + }, + "confirm": "Confirm", + "elementDisplayMode": "modified", + "title": "Are you sure you want to Power OFF" + }, + "elementValueChanged": "", + "elements": [ + { + "backgroundColor": "#37872D", + "buttonLabel": "ON ", + "customCode": "", + "foregroundColor": "#ccccdc", + "id": "poweron", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", + "unit": "", + "value": "", + "variant": "custom" + }, + { + "backgroundColor": "", + "buttonLabel": "OFF", + "customCode": "", + "foregroundColor": "", + "id": "poweroff", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "14f64691-837b-4346-9804-45366a235737", + "unit": "", + "value": "", + "variant": "destructive" + } + ], + "initial": { + "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "return {}", + "highlight": false, + "highlightColor": "red", + "method": "-", + "payload": { + "disableTextWrap": false, + "editorMode": "code", + "exemplar": false, + "expr": "(ds_antenna_status_int{host=\"$Station\", member=\"$LBA_Antenna\"} > 0) * on(host, member, x) ds_antenna_names_info", + "format": "time_series", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "{{label_name}}", + "range": false, + "useBackend": false + }, + "url": "${station}/antenna/LBA/${LBA_Antenna}" + }, + "layout": { + "orientation": "horizontal", + "padding": 10, + "sectionVariant": "default", + "variant": "none" + }, + "reset": { + "backgroundColor": "purple", + "foregroundColor": "yellow", + "icon": "process", + "text": "Reset", + "variant": "hidden" + }, + "resetAction": { + "code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": false, + "getPayload": "return {}", + "mode": "initial", + "payload": {} + }, + "saveDefault": { + "icon": "save", + "text": "Save Default", + "variant": "hidden" + }, + "submit": { + "backgroundColor": "dark-red", + "foregroundColor": "text", + "icon": "toggle-off", + "text": "OFF", + "variant": "custom" + }, + "sync": false, + "update": { + "code": "if (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": true, + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "const payload = {};\ncontext.panel.elements.forEach((element) => {\n if (!element.value) {\n return;\n }\n payload[element.id] = element.value;\n})\nreturn payload;", + "method": "POST", + "payload": { + "columns": [], + "filters": [], + "format": "table", + "global_query_id": "", + "parser": "backend", + "refId": "", + "root_selector": "", + "source": "url", + "type": "json", + "url": "${station}/antennafield/${Selection}/power/${payload.statusset}", + "url_options": { + "body_content_type": "text/plain", + "body_type": "raw", + "data": "", + "method": "POST" + } + }, + "payloadMode": "updated", + "url": "http://${station2}-lcu.lofar.eu:50053/v1/${station2}/antennafield/${Selection}/power/0" + }, + "updateEnabled": "auto" + }, + "pluginVersion": "5.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "", + "instant": false, + "range": true, + "refId": "A" + } + ], + "title": "", + "transparent": true, + "type": "volkovlabs-form-panel" + } + ], + "title": "Control - $Selection veld - stroom aan/uit ", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 18 + }, + "id": 126, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 0, + "y": 39 + }, + "id": 187, + "options": { + "buttonGroup": { + "orientation": "left", + "size": "md" + }, + "confirmModal": { + "body": "Are you sure you want to change the status", + "cancel": "Cancel", + "columns": { + "include": [ + "name", + "newValue" + ], + "name": "Soft reset", + "newValue": "New value", + "oldValue": "Old Value" + }, + "confirm": "Confirm", + "elementDisplayMode": "modified", + "title": "Are you sure you want to change the status" + }, + "elementValueChanged": "", + "elements": [ + { + "backgroundColor": "#37872D", + "buttonLabel": "ON ", + "customCode": "", + "foregroundColor": "#ccccdc", + "id": "poweron", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", + "unit": "", + "value": "", + "variant": "custom" + }, + { + "backgroundColor": "", + "buttonLabel": "OFF", + "customCode": "", + "foregroundColor": "", + "id": "poweroff", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "14f64691-837b-4346-9804-45366a235737", + "unit": "", + "value": "", + "variant": "destructive" + } + ], + "initial": { + "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "return {}", + "highlight": false, + "highlightColor": "red", + "method": "-", + "payload": { + "disableTextWrap": false, + "editorMode": "code", + "exemplar": false, + "expr": "(ds_antenna_status_int{host=\"$Station\", member=\"$LBA_Antenna\"} > 0) * on(host, member, x) ds_antenna_names_info", + "format": "time_series", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "{{label_name}}", + "range": false, + "useBackend": false + }, + "url": "${station}/antenna/LBA/${LBA_Antenna}" + }, + "layout": { + "orientation": "horizontal", + "padding": 10, + "sectionVariant": "default", + "variant": "none" + }, + "reset": { + "backgroundColor": "purple", + "foregroundColor": "yellow", + "icon": "process", + "text": "Reset", + "variant": "hidden" + }, + "resetAction": { + "code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": false, + "getPayload": "return {}", + "mode": "initial", + "payload": {} + }, + "saveDefault": { + "icon": "save", + "text": "Save Default", + "variant": "hidden" + }, + "submit": { + "backgroundColor": "dark-green", + "foregroundColor": "text", + "icon": "power", + "text": "ON", + "variant": "custom" + }, + "sync": false, + "update": { + "code": "if (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": true, + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "const payload = {};\ncontext.panel.elements.forEach((element) => {\n if (!element.value) {\n return;\n }\n payload[element.id] = element.value;\n})\nreturn payload;", + "method": "POST", + "payload": { + "columns": [], + "filters": [], + "format": "table", + "global_query_id": "", + "parser": "backend", + "refId": "", + "root_selector": "", + "source": "url", + "type": "json", + "url": "${station}/antennafield/${Selection}/power/${payload.statusset}", + "url_options": { + "body_content_type": "text/plain", + "body_type": "raw", + "data": "", + "method": "POST" + } + }, + "payloadMode": "updated", + "url": "http://${station2}-lcu.lofar.eu:50053/v1/${station2}/station/stationstate/3" + }, + "updateEnabled": "auto" + }, + "pluginVersion": "5.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "", + "instant": false, + "range": true, + "refId": "A" + } + ], + "title": "", + "transparent": true, + "type": "volkovlabs-form-panel" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 3, + "y": 39 + }, + "id": 186, + "options": { + "buttonGroup": { + "orientation": "center", + "size": "sm" + }, + "confirmModal": { + "body": "Are you sure you want to change the status", + "cancel": "Cancel", + "columns": { + "include": [ + "name", + "newValue" + ], + "name": "Soft reset", + "newValue": "New value", + "oldValue": "Old Value" + }, + "confirm": "Confirm", + "elementDisplayMode": "modified", + "title": "Are you sure you want to change the status" + }, + "elementValueChanged": "", + "elements": [ + { + "backgroundColor": "#37872D", + "buttonLabel": "ON ", + "customCode": "", + "foregroundColor": "#ccccdc", + "id": "poweron", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", + "unit": "", + "value": "", + "variant": "custom" + }, + { + "backgroundColor": "", + "buttonLabel": "OFF", + "customCode": "", + "foregroundColor": "", + "id": "poweroff", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "14f64691-837b-4346-9804-45366a235737", + "unit": "", + "value": "", + "variant": "destructive" + } + ], + "initial": { + "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "return {}", + "highlight": false, + "highlightColor": "red", + "method": "-", + "payload": { + "disableTextWrap": false, + "editorMode": "code", + "exemplar": false, + "expr": "(ds_antenna_status_int{host=\"$Station\", member=\"$LBA_Antenna\"} > 0) * on(host, member, x) ds_antenna_names_info", + "format": "time_series", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "{{label_name}}", + "range": false, + "useBackend": false + }, + "url": "${station}/antenna/LBA/${LBA_Antenna}" + }, + "layout": { + "orientation": "horizontal", + "padding": 10, + "sectionVariant": "default", + "variant": "none" + }, + "reset": { + "backgroundColor": "purple", + "foregroundColor": "yellow", + "icon": "process", + "text": "Reset", + "variant": "hidden" + }, + "resetAction": { + "code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": false, + "getPayload": "return {}", + "mode": "initial", + "payload": {} + }, + "saveDefault": { + "icon": "save", + "text": "Save Default", + "variant": "hidden" + }, + "submit": { + "backgroundColor": "dark-yellow", + "foregroundColor": "#000005", + "icon": "toggle-off", + "text": "Standby", + "variant": "custom" + }, + "sync": false, + "update": { + "code": "if (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": true, + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "const payload = {};\ncontext.panel.elements.forEach((element) => {\n if (!element.value) {\n return;\n }\n payload[element.id] = element.value;\n})\nreturn payload;", + "method": "POST", + "payload": { + "columns": [], + "filters": [], + "format": "table", + "global_query_id": "", + "parser": "backend", + "refId": "", + "root_selector": "", + "source": "url", + "type": "json", + "url": "${station}/antennafield/${Selection}/power/${payload.statusset}", + "url_options": { + "body_content_type": "text/plain", + "body_type": "raw", + "data": "", + "method": "POST" + } + }, + "payloadMode": "updated", + "url": "http://${station2}-lcu.lofar.eu:50053/v1/${station2}/station/stationstate/2" + }, + "updateEnabled": "auto" + }, + "pluginVersion": "5.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "", + "instant": false, + "range": true, + "refId": "A" + } + ], + "title": "", + "transparent": true, + "type": "volkovlabs-form-panel" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "HIBERNATE": { + "color": "orange", + "index": 1 + }, + "OFF": { + "color": "red", + "index": 0 + }, + "ON": { + "color": "dark-green", + "index": 3 + }, + "STANDBY": { + "color": "orange", + "index": 2 + } + }, + "type": "value" + } + ], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "orange" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 1, + "x": 5, + "y": 39 + }, + "id": 169, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "vertical", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^StationState$/", + "values": false + }, + "showPercentChange": false, + "textMode": "value_and_name", + "wideLayout": false + }, + "pluginVersion": "12.0.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "ds_station_state{host=\"$station\"} > 0", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "stationstate", + "range": false, + "refId": "A" + } + ], + "title": "", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": {}, + "includeByName": {}, + "indexByName": {}, + "renameByName": { + "ds_station_state": "StationState" + } + } + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "transparent", + "mode": "fixed" + }, + "custom": { + "axisPlacement": "auto", + "fillOpacity": 100, + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineWidth": 1, + "spanNulls": false + }, + "fieldMinMax": false, + "mappings": [ + { + "options": { + "0": { + "color": "transparent", + "index": 0, + "text": "." + }, + "1": { + "color": "dark-red", + "index": 1, + "text": "OFF" + }, + "2": { + "color": "dark-green", + "index": 2, + "text": "ON" + }, + "3": { + "color": "dark-yellow", + "index": 3, + "text": "STANDBY" + } + }, + "type": "value" + }, + { + "options": { + "match": "null+nan", + "result": { + "color": "dark-purple", + "index": 4, + "text": "---" + } + }, + "type": "special" } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent" + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "count(ds_rcu_band_select{host=\"localhost\",family=\"RECVL\"} == 1) or on() vector(-1)" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "color": "dark-blue", + "index": 1, + "text": "not selected" + }, + "-1": { + "color": "transparent", + "index": 0, + "text": "not selected" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "color": "dark-green", + "index": 2 + }, + "to": 999 + }, + "type": "range" + } + ] + }, + { + "id": "displayName", + "value": "#RCU's 10 - 90 MHz" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "count(ds_rcu_band_select{host=\"localhost\",family=\"RECVL\"} == 2) or on() vector(-1)" + }, + "properties": [ + { + "id": "displayName", + "value": "#RCU's 30 - 90 MHz" + }, + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "color": "dark-blue", + "index": 1, + "text": "not selected" + }, + "-1": { + "color": "transparent", + "index": 0, + "text": "not selected" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "color": "dark-green", + "index": 2 + }, + "to": 999 + }, + "type": "range" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "count(ds_rcu_band_select{host=\"localhost\",family=\"RECVH\"} == 2) or on() vector(-1)" + }, + "properties": [ + { + "id": "displayName", + "value": "#RCU's 110 - 190 MHz" + }, + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "color": "dark-blue", + "index": 1, + "text": "not selected" + }, + "-1": { + "color": "transparent", + "index": 0, + "text": "not selected" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "color": "dark-green", + "index": 2 + }, + "to": 999 + }, + "type": "range" + } + ] + } + ] }, - "decimals": 2, - "mappings": [], - "max": 35, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ + { + "matcher": { + "id": "byName", + "options": "count(ds_rcu_band_select{host=\"localhost\",family=\"RECVH\"} == 4) or on() vector(-1)" + }, + "properties": [ { - "color": "green" + "id": "displayName", + "value": "#RCU's 210 - 240 MHz" }, { - "color": "#EAB839", - "value": 10 - }, + "id": "mappings", + "value": [ + { + "options": { + "0": { + "color": "dark-blue", + "index": 1, + "text": "not selected" + }, + "-1": { + "color": "transparent", + "index": 0, + "text": "not selected" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "color": "dark-green", + "index": 2 + }, + "to": 999 + }, + "type": "range" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "StationState" + }, + "properties": [ { - "color": "semi-dark-red", - "value": 20 + "id": "mappings", + "value": [ + { + "options": { + "0": { + "color": "transparent", + "index": 0, + "text": "." + }, + "1": { + "color": "dark-red", + "index": 1, + "text": "OFF" + }, + "2": { + "color": "dark-green", + "index": 2, + "text": "ON" + }, + "3": { + "color": "dark-yellow", + "index": 3, + "text": "STANDBY" + }, + "4": { + "color": "dark-blue", + "index": 4, + "text": "HIBERNATE" + } + }, + "type": "value" + }, + { + "options": { + "match": "null+nan", + "result": { + "color": "dark-purple", + "index": 5, + "text": "---" + } + }, + "type": "special" + } + ] }, { - "color": "dark-red", - "value": 30 + "id": "custom.lineWidth", + "value": 3 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "count(ds_running_observations{host=\"localhost\", family=\"ObservationControl\"}) or vector(0)" + }, + "properties": [ + { + "id": "displayName", + "value": "# Running Obs" }, { - "color": "dark-red", - "value": 60 + "id": "mappings", + "value": [ + { + "options": { + "0": { + "color": "transparent", + "index": 0, + "text": "No Obs" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "color": "dark-green", + "index": 1 + }, + "to": 999999 + }, + "type": "range" + } + ] } ] + } + ] + }, + "gridPos": { + "h": 4, + "w": 9, + "x": 6, + "y": 39 + }, + "id": 128, + "options": { + "alignValue": "center", + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": false + }, + "mergeValues": true, + "rowHeight": 0.98, + "showValue": "always", + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "12.0.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "(ds_station_state{host=\"$station\",ds_station_state=\"OFF\"} * 1 )\r\n+ on(host, member) ( ds_station_state{host=\"$station\",ds_station_state=\"ON\"} * 2 )\r\n+ on(host, member) ( ds_station_state{host=\"$station\",ds_station_state=\"STANDBY\"} * 3 ) \r\n+ on(host, member) ( ds_station_state{host=\"$station\",ds_station_state=\"HIBERNATE\"} * 4 ) ", + "format": "time_series", + "hide": false, + "instant": false, + "legendFormat": "StationState", + "range": true, + "refId": "StationState" + } + ], + "title": "", + "type": "state-timeline" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "mappings": [ + { + "options": { + "0": { + "color": "dark-red", + "index": 1, + "text": "off" + }, + "1": { + "color": "dark-green", + "index": 0, + "text": "on" + } + }, + "type": "value" + } + ] + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 7, + "x": 15, + "y": 39 + }, + "id": 194, + "options": { + "autoSizeColumns": true, + "autoSizePolygons": true, + "autoSizeRows": true, + "compositeConfig": { + "animationSpeed": "1500", + "composites": [], + "enabled": true + }, + "compositeGlobalAliasingEnabled": false, + "ellipseCharacters": 18, + "ellipseEnabled": false, + "globalAutoScaleFonts": true, + "globalClickthrough": "", + "globalClickthroughCustomTarget": "", + "globalClickthroughCustomTargetEnabled": false, + "globalClickthroughNewTabEnabled": true, + "globalClickthroughSanitizedEnabled": true, + "globalDecimals": 2, + "globalDisplayMode": "all", + "globalDisplayTextTriggeredEmpty": "OK", + "globalFillColor": "rgba(10, 85, 161, 1)", + "globalFontSize": 12, + "globalGradientsEnabled": true, + "globalOperator": "mean", + "globalPolygonBorderColor": "rgba(0, 0, 0, 0)", + "globalPolygonBorderSize": 2, + "globalPolygonSize": 25, + "globalRegexPattern": "", + "globalShape": "square", + "globalShowTimestampEnabled": false, + "globalShowTimestampFontSize": 12, + "globalShowTimestampFormat": "YYYY-MM-DD HH:mm:ss", + "globalShowTimestampPosition": "below_value", + "globalShowTimestampYOffset": 0, + "globalShowTooltipColumnHeadersEnabled": true, + "globalShowValueEnabled": true, + "globalTextFontAutoColorEnabled": true, + "globalTextFontColor": "#000000", + "globalTextFontFamily": "Roboto", + "globalThresholdsConfig": [], + "globalTooltipsEnabled": true, + "globalTooltipsFontFamily": "Roboto", + "globalTooltipsShowTimestampEnabled": true, + "globalTooltipsShowValueEnabled": true, + "globalUnitFormat": "short", + "layoutDisplayLimit": 100, + "layoutNumColumns": 8, + "layoutNumRows": 8, + "overrideConfig": { + "overrides": [] + }, + "sortByDirection": 1, + "sortByField": "name", + "tooltipDisplayMode": "all", + "tooltipDisplayTextTriggeredEmpty": "OK", + "tooltipPrimarySortByField": "thresholdLevel", + "tooltipPrimarySortDirection": 1, + "tooltipSecondarySortByField": "value", + "tooltipSecondarySortDirection": 1 + }, + "pluginVersion": "2.1.14", + "targets": [ + { + "editorMode": "code", + "expr": "ds_tracking_enabled{host=\"$station\", access=\"r\"}", + "legendFormat": "{{member}}, {{device_class}}", + "range": true, + "refId": "A" + } + ], + "title": "Tracking", + "transparent": true, + "type": "grafana-polystat-panel" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 22, + "y": 39 + }, + "id": 183, + "options": { + "buttonGroup": { + "orientation": "center", + "size": "sm" + }, + "confirmModal": { + "body": "Are you sure you want to change the status", + "cancel": "Cancel", + "columns": { + "include": [ + "name", + "newValue" + ], + "name": "Soft reset", + "newValue": "New value", + "oldValue": "Old Value" + }, + "confirm": "Confirm", + "elementDisplayMode": "modified", + "title": "Are you sure you want to change the status" + }, + "elementValueChanged": "", + "elements": [ + { + "backgroundColor": "#37872D", + "buttonLabel": "ON ", + "customCode": "", + "foregroundColor": "#ccccdc", + "id": "poweron", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", + "unit": "", + "value": "", + "variant": "custom" + }, + { + "backgroundColor": "", + "buttonLabel": "OFF", + "customCode": "", + "foregroundColor": "", + "id": "poweroff", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "14f64691-837b-4346-9804-45366a235737", + "unit": "", + "value": "", + "variant": "destructive" + } + ], + "initial": { + "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "return {}", + "highlight": false, + "highlightColor": "red", + "method": "-", + "payload": { + "disableTextWrap": false, + "editorMode": "code", + "exemplar": false, + "expr": "(ds_antenna_status_int{host=\"$Station\", member=\"$LBA_Antenna\"} > 0) * on(host, member, x) ds_antenna_names_info", + "format": "time_series", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "{{label_name}}", + "range": false, + "useBackend": false }, - "unit": "amp" + "url": "${station}/antenna/LBA/${LBA_Antenna}" }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 6, - "x": 10, - "y": 149 - }, - "id": 97, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "layout": { + "orientation": "horizontal", + "padding": 10, + "sectionVariant": "default", + "variant": "none" }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } + "reset": { + "backgroundColor": "purple", + "foregroundColor": "yellow", + "icon": "process", + "text": "Reset", + "variant": "hidden" + }, + "resetAction": { + "code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": false, + "getPayload": "return {}", + "mode": "initial", + "payload": {} + }, + "saveDefault": { + "icon": "save", + "text": "Save Default", + "variant": "hidden" + }, + "submit": { + "backgroundColor": "dark-red", + "foregroundColor": "text", + "icon": "power", + "text": "Soft reset", + "variant": "custom" + }, + "sync": false, + "update": { + "code": "if (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": true, + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "const payload = {};\ncontext.panel.elements.forEach((element) => {\n if (!element.value) {\n return;\n }\n payload[element.id] = element.value;\n})\nreturn payload;", + "method": "POST", + "payload": { + "columns": [], + "filters": [], + "format": "table", + "global_query_id": "", + "parser": "backend", + "refId": "", + "root_selector": "", + "source": "url", + "type": "json", + "url": "${station}/antennafield/${Selection}/power/${payload.statusset}", + "url_options": { + "body_content_type": "text/plain", + "body_type": "raw", + "data": "", + "method": "POST" + } + }, + "payloadMode": "updated", + "url": "http://${station2}-lcu.lofar.eu:50053/v1/${station2}/station/reset/soft" + }, + "updateEnabled": "auto" }, - "pluginVersion": "11.6.0", + "pluginVersion": "5.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, - "disableTextWrap": false, - "editorMode": "builder", - "exemplar": false, - "expr": "loadCurrent{instance=~\"pcon0-snmp\", host=\"$station\"}", - "fullMetaSearch": false, - "hide": false, - "includeNullMetadata": true, + "expr": "", "instant": false, - "legendFormat": "loadCurrent {{instance}}", "range": true, - "refId": "D", - "useBackend": false - } - ], - "title": "Stroom naar LBA", - "transformations": [ - { - "id": "concatenate", - "options": { - "frameNameLabel": "frame", - "frameNameMode": "drop" - } + "refId": "A" } ], - "type": "timeseries" + "title": "", + "transparent": true, + "type": "volkovlabs-form-panel" }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, - "description": "This is the total DC current to the HBA subrack", + "description": "", "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 0, + "y": 45 + }, + "id": 185, + "options": { + "buttonGroup": { + "orientation": "left", + "size": "md" + }, + "confirmModal": { + "body": "Are you sure you want to change the status", + "cancel": "Cancel", + "columns": { + "include": [ + "name", + "newValue" + ], + "name": "Soft reset", + "newValue": "New value", + "oldValue": "Old Value" }, - "decimals": 2, - "mappings": [], - "max": 53, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "green", - "value": 5 - }, - { - "color": "dark-red", - "value": 10 - }, - { - "color": "dark-red", - "value": 37 - }, - { - "color": "dark-green", - "value": 38 - }, - { - "color": "dark-green", - "value": 42 - }, - { - "color": "dark-red", - "value": 43 - }, - { - "color": "dark-red", - "value": 53 - } - ] + "confirm": "Confirm", + "elementDisplayMode": "modified", + "title": "Are you sure you want to change the status" + }, + "elementValueChanged": "", + "elements": [ + { + "backgroundColor": "#37872D", + "buttonLabel": "ON ", + "customCode": "", + "foregroundColor": "#ccccdc", + "id": "poweron", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", + "unit": "", + "value": "", + "variant": "custom" + }, + { + "backgroundColor": "", + "buttonLabel": "OFF", + "customCode": "", + "foregroundColor": "", + "id": "poweroff", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "14f64691-837b-4346-9804-45366a235737", + "unit": "", + "value": "", + "variant": "destructive" + } + ], + "initial": { + "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "return {}", + "highlight": false, + "highlightColor": "red", + "method": "-", + "payload": { + "disableTextWrap": false, + "editorMode": "code", + "exemplar": false, + "expr": "(ds_antenna_status_int{host=\"$Station\", member=\"$LBA_Antenna\"} > 0) * on(host, member, x) ds_antenna_names_info", + "format": "time_series", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "{{label_name}}", + "range": false, + "useBackend": false + }, + "url": "${station}/antenna/LBA/${LBA_Antenna}" + }, + "layout": { + "orientation": "horizontal", + "padding": 10, + "sectionVariant": "default", + "variant": "none" + }, + "reset": { + "backgroundColor": "purple", + "foregroundColor": "yellow", + "icon": "process", + "text": "Reset", + "variant": "hidden" + }, + "resetAction": { + "code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": false, + "getPayload": "return {}", + "mode": "initial", + "payload": {} + }, + "saveDefault": { + "icon": "save", + "text": "Save Default", + "variant": "hidden" + }, + "submit": { + "backgroundColor": "dark-blue", + "foregroundColor": "text", + "icon": "toggle-off", + "text": "Hibernate", + "variant": "custom" + }, + "sync": false, + "update": { + "code": "if (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": true, + "contentType": "application/json", + "datasource": "fec5bpxn3sz5sf", + "getPayload": "const payload = {};\ncontext.panel.elements.forEach((element) => {\n if (!element.value) {\n return;\n }\n payload[element.id] = element.value;\n})\nreturn payload;", + "method": "POST", + "payload": { + "columns": [], + "filters": [], + "format": "table", + "global_query_id": "", + "parser": "backend", + "refId": "", + "root_selector": "", + "source": "url", + "type": "json", + "url": "${station}/antennafield/${Selection}/power/${payload.statusset}", + "url_options": { + "body_content_type": "text/plain", + "body_type": "raw", + "data": "", + "method": "POST" + } }, - "unit": "amp" - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 2, - "x": 16, - "y": 149 - }, - "id": 125, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "payloadMode": "updated", + "url": "http://${station2}-lcu.lofar.eu:50053/v1/${station2}/station/stationstate/1" }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" + "updateEnabled": "auto" }, - "pluginVersion": "11.6.0", + "pluginVersion": "5.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, - "disableTextWrap": false, - "editorMode": "builder", - "exemplar": false, - "expr": "loadCurrent{instance=~\"pcon1-snmp\", host=\"$station\"}", - "fullMetaSearch": false, - "hide": false, - "includeNullMetadata": true, + "expr": "", "instant": false, - "legendFormat": "loadCurrent {{instance}}", "range": true, - "refId": "D", - "useBackend": false - } - ], - "title": "Amp HBA", - "transformations": [ - { - "id": "concatenate", - "options": { - "frameNameLabel": "frame", - "frameNameMode": "drop" - } + "refId": "A" } ], - "type": "gauge" + "title": "", + "transparent": true, + "type": "volkovlabs-form-panel" }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, - "description": "This is the total DC current to the HBA subrack", + "description": "Which state transition the StationManager is currently performing.", "fieldConfig": { "defaults": { "color": { - "mode": "palette-classic" + "mode": "thresholds" }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + "mappings": [ + { + "options": { + "match": "null", + "result": { + "color": "green", + "index": 0, + "text": "DONE" + } + }, + "type": "special" } - }, - "decimals": 2, - "mappings": [], - "max": 53, - "min": 0, + ], "thresholds": { "mode": "absolute", "steps": [ { - "color": "green" - }, - { - "color": "#EAB839", - "value": 10 - }, - { - "color": "semi-dark-red", - "value": 20 - }, - { - "color": "dark-red", - "value": 30 - }, - { - "color": "dark-red", - "value": 60 + "color": "orange" } ] }, - "unit": "amp" + "unit": "none" }, "overrides": [] }, "gridPos": { - "h": 5, - "w": 6, - "x": 18, - "y": 149 + "h": 2, + "w": 1, + "x": 5, + "y": 45 }, - "id": 98, + "id": 168, "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^RequestedState$/", + "values": false }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } + "showPercentChange": false, + "textMode": "value_and_name", + "wideLayout": false }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, - "disableTextWrap": false, - "editorMode": "builder", + "editorMode": "code", "exemplar": false, - "expr": "loadCurrent{instance=~\"pcon1-snmp\", host=\"$station\"}", - "fullMetaSearch": false, - "hide": false, - "includeNullMetadata": true, - "instant": false, - "legendFormat": "loadCurrent {{instance}}", - "range": true, - "refId": "D", - "useBackend": false + "expr": "(ds_requested_station_state{host=\"$station\"} > 0) * on(host) group_right(ds_requested_station_state) (ds_station_state_transitioning{host=\"$station\"} +1 )", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "__auto", + "range": false, + "refId": "A" } ], - "title": "Stroom naar HBA", + "title": "", "transformations": [ { - "id": "concatenate", + "id": "organize", "options": { - "frameNameLabel": "frame", - "frameNameMode": "drop" + "excludeByName": {}, + "includeByName": {}, + "indexByName": {}, + "renameByName": { + "ds_requested_station_state": "RequestedState" + } } } ], - "type": "timeseries" - } - ], - "title": "Control - $Selection veld - Stroom aan/uit ", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 14 - }, - "id": 126, - "panels": [ + "type": "stat" + }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, - "description": "Control - set $station naar gekozen modus ", + "description": "", "fieldConfig": { "defaults": {}, "overrides": [] }, "gridPos": { - "h": 4, - "w": 5, - "x": 0, - "y": 171 + "h": 2, + "w": 2, + "x": 22, + "y": 45 }, - "id": 130, + "id": 184, "options": { "buttonGroup": { "orientation": "center", - "size": "lg" + "size": "sm" }, "confirmModal": { - "body": "Are you sure you want to set the station?", + "body": "Are you sure you want to change the status", "cancel": "Cancel", "columns": { "include": [ "name", "newValue" ], - "name": "Set station", + "name": "Soft reset", "newValue": "New value", "oldValue": "Old Value" }, "confirm": "Confirm", "elementDisplayMode": "modified", - "title": "Are you sure you want to set the station?" + "title": "Are you sure you want to change the status" }, "elementValueChanged": "", "elements": [ { - "allowCustomValue": false, - "background": "#C4162A", - "fieldName": "", - "id": "modusset", - "labelBackground": "#C4162A", - "labelColor": "#FADE2A", + "backgroundColor": "#37872D", + "buttonLabel": "ON ", + "customCode": "", + "foregroundColor": "#ccccdc", + "id": "poweron", "labelWidth": 10, - "options": [ - { - "icon": "arrow", - "id": "1", - "label": "HIBERNATE", - "type": "number", - "value": 1 - }, - { - "icon": "arrow", - "id": "2", - "label": "STANDBY", - "type": "number", - "value": 2 - }, - { - "icon": "power", - "id": "3", - "label": "ON", - "type": "number", - "value": 3 - } - ], - "optionsSource": "Custom", "section": "", - "showIf": "", - "title": "MODUS", + "show": "form", + "size": "md", + "title": "Power", "tooltip": "", - "type": "select", + "type": "button", "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", "unit": "", - "value": "" + "value": "", + "variant": "custom" + }, + { + "backgroundColor": "", + "buttonLabel": "OFF", + "customCode": "", + "foregroundColor": "", + "id": "poweroff", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "Power", + "tooltip": "", + "type": "button", + "uid": "14f64691-837b-4346-9804-45366a235737", + "unit": "", + "value": "", + "variant": "destructive" } ], "initial": { - "code": "", + "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", "contentType": "application/json", - "datasource": "prometheus", + "datasource": "fec5bpxn3sz5sf", "getPayload": "return {}", "highlight": false, "highlightColor": "red", - "method": "GET", + "method": "-", "payload": { - "columns": [], "disableTextWrap": false, "editorMode": "code", "exemplar": false, "expr": "(ds_antenna_status_int{host=\"$Station\", member=\"$LBA_Antenna\"} > 0) * on(host, member, x) ds_antenna_names_info", - "filters": [], "format": "time_series", "fullMetaSearch": false, - "global_query_id": "", "includeNullMetadata": true, "instant": true, - "legendFormat": "{{label_name}}", - "range": false, - "refId": "", - "root_selector": "", - "source": "url", - "type": "json", - "url": "", - "url_options": { - "data": "", - "method": "GET" - }, + "legendFormat": "{{label_name}}", + "range": false, "useBackend": false }, - "url": "${station}/station/stationstate" + "url": "${station}/antenna/LBA/${LBA_Antenna}" }, "layout": { "orientation": "horizontal", "padding": 10, "sectionVariant": "default", - "variant": "single" + "variant": "none" }, "reset": { "backgroundColor": "purple", @@ -4875,9 +8380,9 @@ }, "submit": { "backgroundColor": "dark-red", - "foregroundColor": "yellow", - "icon": "save", - "text": "Submit", + "foregroundColor": "text", + "icon": "power", + "text": "Hard reset", "variant": "custom" }, "sync": false, @@ -4898,7 +8403,7 @@ "root_selector": "", "source": "url", "type": "json", - "url": "${station}/station/stationstate/${payload.modusset}", + "url": "${station}/antennafield/${Selection}/power/${payload.statusset}", "url_options": { "body_content_type": "text/plain", "body_type": "raw", @@ -4907,7 +8412,7 @@ } }, "payloadMode": "updated", - "url": "http://${station}.control.lofar:50053/post/${station}/station/stationstate/${payload.modusset}" + "url": "http://${station2}.control.lofar:50053/v1/${station2}/station/reset/hard" }, "updateEnabled": "auto" }, @@ -4918,53 +8423,50 @@ "type": "prometheus", "uid": "prometheus" }, + "expr": "", + "instant": false, + "range": true, "refId": "A" } ], - "title": "Control - set $station naar gekozen modus ", + "title": "", "transparent": true, "type": "volkovlabs-form-panel" - }, + } + ], + "title": "Control - Station $station2 - set modus and reset station", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 19 + }, + "id": 188, + "panels": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, - "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "mappings": [ - { - "options": { - "HIBERNATE": { - "color": "orange", - "index": 1 - }, - "OFF": { - "color": "red", - "index": 0 - }, - "ON": { - "color": "dark-green", - "index": 3 - }, - "STANDBY": { - "color": "orange", - "index": 2 - } - }, - "type": "value" - } - ], - "min": 0, + "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { - "color": "orange" + "color": "transparent" + }, + { + "color": "red", + "value": 80 } ] } @@ -4972,156 +8474,492 @@ "overrides": [] }, "gridPos": { - "h": 4, - "w": 2, - "x": 5, - "y": 171 + "h": 2, + "w": 5, + "x": 0, + "y": 40 }, - "id": 169, + "id": 193, "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "center", - "orientation": "vertical", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" + "infinitePan": false, + "inlineEditing": true, + "panZoom": false, + "root": { + "background": { + "color": { + "fixed": "transparent" + }, + "image": { + "fixed": "", + "mode": "field" + } + }, + "border": { + "color": { + "fixed": "text" + }, + "radius": 15, + "width": 0 + }, + "constraint": { + "horizontal": "left", + "vertical": "top" + }, + "elements": [ + { + "background": { + "color": { + "fixed": "dark-yellow" + } + }, + "border": { + "color": { + "fixed": "dark-green" + }, + "radius": 21 + }, + "config": { + "align": "center", + "color": { + "fixed": "dark-blue" + }, + "size": 16, + "text": { + "fixed": "OPEN STATIONTEST info page" + }, + "valign": "middle" + }, + "constraint": { + "horizontal": "left", + "vertical": "top" + }, + "links": [ + { + "oneClick": true, + "targetBlank": true, + "title": "Stationtest", + "url": "https://monitoring.lofar.net/d/stationtest/stationtest?orgId=1&from=now-6h&to=now&timezone=UTC&var-Station=cs001&var-Fault=$__all&refresh=30s" + } + ], + "name": "Element 1", + "placement": { + "height": 55, + "left": 14, + "rotation": 0, + "top": 11, + "width": 181 + }, + "type": "text" + } ], - "fields": "/^StationState$/", - "values": false + "name": "Element 1748433892849", + "placement": { + "height": 100, + "left": 0, + "rotation": 0, + "top": 0, + "width": 100 + }, + "type": "frame" }, - "showPercentChange": false, - "textMode": "value_and_name", - "wideLayout": false + "showAdvancedTypes": true }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, - "editorMode": "code", - "exemplar": false, - "expr": "ds_station_state{host=\"$station\"} > 0", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "stationstate", - "range": false, + "expr": "", + "instant": false, + "range": true, "refId": "A" } ], "title": "", - "transformations": [ - { - "id": "organize", - "options": { - "excludeByName": {}, - "includeByName": {}, - "indexByName": {}, - "renameByName": { - "ds_station_state": "StationState" - } + "transparent": true, + "type": "canvas" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 4, + "x": 6, + "y": 40 + }, + "id": 189, + "options": { + "buttonGroup": { + "orientation": "left", + "size": "md" + }, + "confirmModal": { + "body": "Please confirm you want to start the Stationtest NOW", + "cancel": "No please don't", + "columns": { + "include": [ + "name", + "newValue" + ], + "name": "Label", + "newValue": "New Value", + "oldValue": "Old Value" + }, + "confirm": "Yes please start it", + "elementDisplayMode": "modified", + "title": "Are you sure! This will impact observations. The station has been reserved right?" + }, + "elementValueChanged": "", + "elements": [ + { + "background": "#00000000", + "backgroundColor": "", + "buttonLabel": "Start NOW", + "customCode": "", + "foregroundColor": "", + "id": "startfull", + "labelBackground": "#00000000", + "labelColor": "", + "labelWidth": 20, + "section": "", + "show": "form", + "size": "lg", + "title": "Complete test (FULL)", + "tooltip": "", + "type": "button", + "uid": "10a9d497-68cc-4bf4-a382-fd02c13455e1", + "unit": "", + "value": "", + "variant": "primary", + "width": 20 + }, + { + "backgroundColor": "", + "buttonLabel": " Start NOW", + "customCode": "", + "foregroundColor": "", + "id": "startlba", + "labelBackground": "#00000000", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "LBA test", + "tooltip": "", + "type": "button", + "uid": "ad2bc9ab-5db7-4a47-b733-93fc47cb9d61", + "unit": "", + "value": "", + "variant": "primary", + "width": 10 + }, + { + "background": "#00000000", + "backgroundColor": "", + "buttonLabel": "Start NOW", + "customCode": "", + "foregroundColor": "", + "id": "starthba", + "labelBackground": "#00000000", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "HBA test", + "tooltip": "", + "type": "button", + "uid": "4ba1abd3-8256-452d-8a26-6262e4807fb2", + "unit": "", + "value": "", + "variant": "primary", + "width": 10 + }, + { + "background": "", + "backgroundColor": "", + "buttonLabel": "Stop NOW", + "customCode": "", + "foregroundColor": "", + "id": "stop", + "labelBackground": "#00000000", + "labelColor": "#ccccdc", + "labelWidth": 20, + "section": "", + "show": "form", + "size": "md", + "title": "Stop ALL running ST", + "tooltip": "", + "type": "button", + "uid": "831d3665-efec-46c0-a596-3d817dbc321a", + "unit": "", + "value": "", + "variant": "destructive", + "width": 20 } + ], + "initial": { + "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", + "contentType": "application/json", + "getPayload": "return {}", + "highlight": false, + "highlightColor": "red", + "method": "-", + "payload": {} + }, + "layout": { + "orientation": "horizontal", + "padding": 0, + "sectionVariant": "default", + "sections": [], + "variant": "none" + }, + "reset": { + "backgroundColor": "purple", + "foregroundColor": "yellow", + "icon": "process", + "text": "Reset", + "variant": "hidden" + }, + "resetAction": { + "code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": false, + "getPayload": "return {}", + "mode": "initial", + "payload": {} + }, + "saveDefault": { + "icon": "save", + "text": "Save Default", + "variant": "hidden" + }, + "submit": { + "backgroundColor": "purple", + "foregroundColor": "yellow", + "icon": "clock-nine", + "text": "Run FULL stationtest", + "variant": "primary" + }, + "sync": false, + "update": { + "code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": true, + "contentType": "application/json", + "getPayload": "const payload = {};\ncontext.panel.elements.forEach((element) => {\n if (!element.value) {\n return;\n }\n payload[element.id] = element.value;\n})\nreturn payload;", + "method": "POST", + "payload": {}, + "payloadMode": "all", + "url": "http://${station2}-lcu.lofar.eu:50055/v1/stationtest/HBALBA" + }, + "updateEnabled": "auto" + }, + "pluginVersion": "5.1.0", + "targets": [ + { + "refId": "A" } ], - "type": "stat" + "title": "", + "transparent": true, + "type": "volkovlabs-form-panel" }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, - "description": "Which state transition the StationManager is currently performing.", "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "color": "green", - "index": 0, - "text": "DONE" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "orange" - } - ] - }, - "unit": "none" - }, + "defaults": {}, "overrides": [] }, "gridPos": { - "h": 4, - "w": 2, - "x": 7, - "y": 171 + "h": 2, + "w": 4, + "x": 10, + "y": 40 }, - "id": 168, + "id": 191, "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "/^RequestedState$/", - "values": false + "buttonGroup": { + "orientation": "left", + "size": "md" }, - "showPercentChange": false, - "textMode": "value_and_name", - "wideLayout": false + "confirmModal": { + "body": "Please confirm you want to start the Stationtest NOW", + "cancel": "No please don't", + "columns": { + "include": [ + "name", + "newValue" + ], + "name": "Label", + "newValue": "New Value", + "oldValue": "Old Value" + }, + "confirm": "Yes please start it", + "elementDisplayMode": "modified", + "title": "Are you sure! This will impact observations. The station has been reserved right?" + }, + "elementValueChanged": "", + "elements": [ + { + "background": "#00000000", + "backgroundColor": "", + "buttonLabel": "Start NOW", + "customCode": "", + "foregroundColor": "", + "id": "startfull", + "labelBackground": "#00000000", + "labelColor": "", + "labelWidth": 20, + "section": "", + "show": "form", + "size": "lg", + "title": "Complete test (FULL)", + "tooltip": "", + "type": "button", + "uid": "10a9d497-68cc-4bf4-a382-fd02c13455e1", + "unit": "", + "value": "", + "variant": "primary", + "width": 20 + }, + { + "backgroundColor": "", + "buttonLabel": " Start NOW", + "customCode": "", + "foregroundColor": "", + "id": "startlba", + "labelBackground": "#00000000", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "LBA test", + "tooltip": "", + "type": "button", + "uid": "ad2bc9ab-5db7-4a47-b733-93fc47cb9d61", + "unit": "", + "value": "", + "variant": "primary", + "width": 10 + }, + { + "background": "#00000000", + "backgroundColor": "", + "buttonLabel": "Start NOW", + "customCode": "", + "foregroundColor": "", + "id": "starthba", + "labelBackground": "#00000000", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "HBA test", + "tooltip": "", + "type": "button", + "uid": "4ba1abd3-8256-452d-8a26-6262e4807fb2", + "unit": "", + "value": "", + "variant": "primary", + "width": 10 + }, + { + "background": "", + "backgroundColor": "", + "buttonLabel": "Stop NOW", + "customCode": "", + "foregroundColor": "", + "id": "stop", + "labelBackground": "#00000000", + "labelColor": "#ccccdc", + "labelWidth": 20, + "section": "", + "show": "form", + "size": "md", + "title": "Stop ALL running ST", + "tooltip": "", + "type": "button", + "uid": "831d3665-efec-46c0-a596-3d817dbc321a", + "unit": "", + "value": "", + "variant": "destructive", + "width": 20 + } + ], + "initial": { + "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", + "contentType": "application/json", + "getPayload": "return {}", + "highlight": false, + "highlightColor": "red", + "method": "-", + "payload": {} + }, + "layout": { + "orientation": "horizontal", + "padding": 0, + "sectionVariant": "default", + "sections": [], + "variant": "none" + }, + "reset": { + "backgroundColor": "purple", + "foregroundColor": "yellow", + "icon": "process", + "text": "Reset", + "variant": "hidden" + }, + "resetAction": { + "code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": false, + "getPayload": "return {}", + "mode": "initial", + "payload": {} + }, + "saveDefault": { + "icon": "save", + "text": "Save Default", + "variant": "hidden" + }, + "submit": { + "backgroundColor": "purple", + "foregroundColor": "yellow", + "icon": "clock-nine", + "text": "Run LBA stationtest", + "variant": "primary" + }, + "sync": false, + "update": { + "code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": true, + "contentType": "application/json", + "getPayload": "const payload = {};\ncontext.panel.elements.forEach((element) => {\n if (!element.value) {\n return;\n }\n payload[element.id] = element.value;\n})\nreturn payload;", + "method": "POST", + "payload": {}, + "payloadMode": "all", + "url": "http://${station2}-lcu.lofar.eu:50055/v1/stationtest/LBA" + }, + "updateEnabled": "auto" }, - "pluginVersion": "11.6.0", + "pluginVersion": "5.1.0", "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "(ds_requested_station_state{host=\"$station\"} > 0) * on(host) group_right(ds_requested_station_state) (ds_station_state_transitioning{host=\"$station\"} +1 )", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "__auto", - "range": false, "refId": "A" } ], "title": "", - "transformations": [ - { - "id": "organize", - "options": { - "excludeByName": {}, - "includeByName": {}, - "indexByName": {}, - "renameByName": { - "ds_requested_station_state": "RequestedState" - } - } - } - ], - "type": "stat" + "transparent": true, + "type": "volkovlabs-form-panel" }, { "datasource": { @@ -5129,237 +8967,330 @@ "uid": "prometheus" }, "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "transparent", - "mode": "fixed" - }, - "custom": { - "axisPlacement": "auto", - "fillOpacity": 100, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineWidth": 1, - "spanNulls": false - }, - "fieldMinMax": false, - "mappings": [ - { - "options": { - "0": { - "color": "transparent", - "index": 0, - "text": "." - }, - "1": { - "color": "dark-red", - "index": 1, - "text": "OFF" - }, - "2": { - "color": "dark-green", - "index": 2, - "text": "ON" - }, - "3": { - "color": "dark-yellow", - "index": 3, - "text": "STANDBY" - }, - "4": { - "color": "transparent", - "index": 5, - "text": "no grafana data on central" - } - }, - "type": "value" - }, - { - "options": { - "match": "null+nan", - "result": { - "color": "dark-purple", - "index": 4, - "text": "---" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "transparent" - } - ] + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 4, + "x": 14, + "y": 40 + }, + "id": 190, + "options": { + "buttonGroup": { + "orientation": "left", + "size": "md" + }, + "confirmModal": { + "body": "Please confirm you want to start the Stationtest NOW", + "cancel": "No please don't", + "columns": { + "include": [ + "name", + "newValue" + ], + "name": "Label", + "newValue": "New Value", + "oldValue": "Old Value" + }, + "confirm": "Yes please start it", + "elementDisplayMode": "modified", + "title": "Are you sure! This will impact observations. The station has been reserved right?" + }, + "elementValueChanged": "", + "elements": [ + { + "background": "#00000000", + "backgroundColor": "", + "buttonLabel": "Start NOW", + "customCode": "", + "foregroundColor": "", + "id": "startfull", + "labelBackground": "#00000000", + "labelColor": "", + "labelWidth": 20, + "section": "", + "show": "form", + "size": "lg", + "title": "Complete test (FULL)", + "tooltip": "", + "type": "button", + "uid": "10a9d497-68cc-4bf4-a382-fd02c13455e1", + "unit": "", + "value": "", + "variant": "primary", + "width": 20 + }, + { + "backgroundColor": "", + "buttonLabel": " Start NOW", + "customCode": "", + "foregroundColor": "", + "id": "startlba", + "labelBackground": "#00000000", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "LBA test", + "tooltip": "", + "type": "button", + "uid": "ad2bc9ab-5db7-4a47-b733-93fc47cb9d61", + "unit": "", + "value": "", + "variant": "primary", + "width": 10 + }, + { + "background": "#00000000", + "backgroundColor": "", + "buttonLabel": "Start NOW", + "customCode": "", + "foregroundColor": "", + "id": "starthba", + "labelBackground": "#00000000", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "HBA test", + "tooltip": "", + "type": "button", + "uid": "4ba1abd3-8256-452d-8a26-6262e4807fb2", + "unit": "", + "value": "", + "variant": "primary", + "width": 10 + }, + { + "background": "", + "backgroundColor": "", + "buttonLabel": "Stop NOW", + "customCode": "", + "foregroundColor": "", + "id": "stop", + "labelBackground": "#00000000", + "labelColor": "#ccccdc", + "labelWidth": 20, + "section": "", + "show": "form", + "size": "md", + "title": "Stop ALL running ST", + "tooltip": "", + "type": "button", + "uid": "831d3665-efec-46c0-a596-3d817dbc321a", + "unit": "", + "value": "", + "variant": "destructive", + "width": 20 } + ], + "initial": { + "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", + "contentType": "application/json", + "getPayload": "return {}", + "highlight": false, + "highlightColor": "red", + "method": "-", + "payload": {} }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 10, - "x": 9, - "y": 171 - }, - "id": 128, - "options": { - "alignValue": "center", - "legend": { - "displayMode": "table", - "placement": "right", - "showLegend": false + "layout": { + "orientation": "horizontal", + "padding": 0, + "sectionVariant": "default", + "sections": [], + "variant": "none" }, - "mergeValues": true, - "rowHeight": 0.98, - "showValue": "always", - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } + "reset": { + "backgroundColor": "purple", + "foregroundColor": "yellow", + "icon": "process", + "text": "Reset", + "variant": "hidden" + }, + "resetAction": { + "code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": false, + "getPayload": "return {}", + "mode": "initial", + "payload": {} + }, + "saveDefault": { + "icon": "save", + "text": "Save Default", + "variant": "hidden" + }, + "submit": { + "backgroundColor": "purple", + "foregroundColor": "yellow", + "icon": "clock-nine", + "text": "Run HBA stationtest", + "variant": "primary" + }, + "sync": false, + "update": { + "code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "confirm": true, + "contentType": "application/json", + "getPayload": "const payload = {};\ncontext.panel.elements.forEach((element) => {\n if (!element.value) {\n return;\n }\n payload[element.id] = element.value;\n})\nreturn payload;", + "method": "POST", + "payload": {}, + "payloadMode": "all", + "url": "http://${station2}-lcu.lofar.eu:50055/v1/stationtest/HBA" + }, + "updateEnabled": "auto" }, - "pluginVersion": "11.6.0", + "pluginVersion": "5.1.0", "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "(ds_station_state{host=\"$station\",ds_station_state=\"OFF\"} * 1 )\r\n+ on(host, member) ( ds_station_state{host=\"$station\",ds_station_state=\"ON\"} * 2 )\r\n+ on(host, member) ( ds_station_state{host=\"$station\",ds_station_state=\"STANDBY\"} * 3 ) \r\n+ on(host, member) ( ds_station_state{host=\"$station\",ds_station_state=\"HIBERNATE\"} * 4 ) ", - "format": "time_series", - "hide": false, - "instant": false, - "legendFormat": "StationState", - "range": true, - "refId": "StationState" + "refId": "A" } ], - "title": "Station State History", - "type": "state-timeline" + "title": "", + "transparent": true, + "type": "volkovlabs-form-panel" }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, - "description": "Control - HARD/SOFT RESET CS001", "fieldConfig": { "defaults": {}, "overrides": [] }, "gridPos": { - "h": 4, - "w": 5, - "x": 19, - "y": 171 + "h": 2, + "w": 3, + "x": 21, + "y": 40 }, - "id": 133, + "id": 192, "options": { "buttonGroup": { - "orientation": "center", - "size": "lg" + "orientation": "left", + "size": "md" }, "confirmModal": { - "body": "Are you sure you want to reset the station?", - "cancel": "Cancel", + "body": "Please confirm you want to start the Stationtest NOW", + "cancel": "No please don't", "columns": { "include": [ "name", "newValue" ], - "name": "Set station", - "newValue": "New value", + "name": "Label", + "newValue": "New Value", "oldValue": "Old Value" }, - "confirm": "Confirm", + "confirm": "Yes please start it", "elementDisplayMode": "modified", - "title": "Are you sure you want to reset the station?" + "title": "Are you sure! This will impact observations. The station has been reserved right?" }, "elementValueChanged": "", "elements": [ { - "allowCustomValue": false, - "background": "#C4162A", - "fieldName": "", - "id": "powerset", - "labelBackground": "#C4162A", - "labelColor": "#FADE2A", + "background": "#00000000", + "backgroundColor": "", + "buttonLabel": "Start NOW", + "customCode": "", + "foregroundColor": "", + "id": "startfull", + "labelBackground": "#00000000", + "labelColor": "", + "labelWidth": 20, + "section": "", + "show": "form", + "size": "lg", + "title": "Complete test (FULL)", + "tooltip": "", + "type": "button", + "uid": "10a9d497-68cc-4bf4-a382-fd02c13455e1", + "unit": "", + "value": "", + "variant": "primary", + "width": 20 + }, + { + "backgroundColor": "", + "buttonLabel": " Start NOW", + "customCode": "", + "foregroundColor": "", + "id": "startlba", + "labelBackground": "#00000000", "labelWidth": 10, - "options": [ - { - "icon": "toggle-off", - "id": "soft", - "label": "soft reset", - "type": "string", - "value": "soft" - }, - { - "icon": "toggle-off", - "id": "hard", - "label": "hard reset", - "type": "string", - "value": "hard" - } - ], - "optionsSource": "Custom", "section": "", - "showIf": "", - "title": "RESET", + "show": "form", + "size": "md", + "title": "LBA test", "tooltip": "", - "type": "select", - "uid": "080e6553-3865-4679-9c1e-6b03a15fb250", + "type": "button", + "uid": "ad2bc9ab-5db7-4a47-b733-93fc47cb9d61", + "unit": "", + "value": "", + "variant": "primary", + "width": 10 + }, + { + "background": "#00000000", + "backgroundColor": "", + "buttonLabel": "Start NOW", + "customCode": "", + "foregroundColor": "", + "id": "starthba", + "labelBackground": "#00000000", + "labelWidth": 10, + "section": "", + "show": "form", + "size": "md", + "title": "HBA test", + "tooltip": "", + "type": "button", + "uid": "4ba1abd3-8256-452d-8a26-6262e4807fb2", + "unit": "", + "value": "", + "variant": "primary", + "width": 10 + }, + { + "background": "", + "backgroundColor": "", + "buttonLabel": "Stop NOW", + "customCode": "", + "foregroundColor": "", + "id": "stop", + "labelBackground": "#00000000", + "labelColor": "#ccccdc", + "labelWidth": 20, + "section": "", + "show": "form", + "size": "md", + "title": "Stop ALL running ST", + "tooltip": "", + "type": "button", + "uid": "831d3665-efec-46c0-a596-3d817dbc321a", "unit": "", - "value": "" + "value": "", + "variant": "destructive", + "width": 20 } ], "initial": { - "code": "", + "code": "console.log(context.panel.data, context.panel.response, context.panel.initial, context.panel.elements);\n\nreturn;\n\n/**\n * Data Source\n * Requires form elements to be defined\n */\nconst dataQuery = context.utils.toDataQueryResponse(context.panel.response);\nconsole.log(dataQuery);", "contentType": "application/json", - "datasource": "prometheus", "getPayload": "return {}", "highlight": false, "highlightColor": "red", - "method": "GET", - "payload": { - "columns": [], - "disableTextWrap": false, - "editorMode": "code", - "exemplar": false, - "expr": "(ds_antenna_status_int{host=\"$Station\", member=\"$LBA_Antenna\"} > 0) * on(host, member, x) ds_antenna_names_info", - "filters": [], - "format": "time_series", - "fullMetaSearch": false, - "global_query_id": "", - "includeNullMetadata": true, - "instant": true, - "legendFormat": "{{label_name}}", - "range": false, - "refId": "", - "root_selector": "", - "source": "url", - "type": "json", - "url": "", - "url_options": { - "data": "", - "method": "GET" - }, - "useBackend": false - }, - "url": "cs001/station/reset/soft" + "method": "-", + "payload": {} }, "layout": { "orientation": "horizontal", - "padding": 10, + "padding": 0, "sectionVariant": "default", - "variant": "single" + "sections": [], + "variant": "none" }, "reset": { "backgroundColor": "purple", @@ -5381,59 +9312,36 @@ "variant": "hidden" }, "submit": { - "backgroundColor": "dark-red", + "backgroundColor": "purple", "foregroundColor": "yellow", - "icon": "save", - "text": "Submit", - "variant": "custom" + "icon": "crosshair", + "text": "Kill running Stationtest", + "variant": "destructive" }, "sync": false, "update": { - "code": "if (context.panel && context.panel.response) {\n console.log(\"hello\", context.panel.formValue);\n console.log(context.panel.formValue?.status);\n console.log(context.panel.response);\n\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", + "code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}", "confirm": true, "contentType": "application/json", - "datasource": "fec5bpxn3sz5sf", "getPayload": "const payload = {};\ncontext.panel.elements.forEach((element) => {\n if (!element.value) {\n return;\n }\n payload[element.id] = element.value;\n})\nreturn payload;", "method": "POST", - "payload": { - "columns": [], - "filters": [], - "format": "table", - "global_query_id": "", - "parser": "backend", - "refId": "", - "root_selector": "", - "source": "url", - "type": "json", - "url": "${station}/station/reset/${payload.powerset}", - "url_options": { - "body_content_type": "text/plain", - "body_type": "raw", - "data": "", - "method": "POST" - } - }, - "payloadMode": "updated", - "url": "http://${station}.control.lofar:50053/post/${station}/station/reset/${payload.powerset}" + "payload": {}, + "payloadMode": "all" }, "updateEnabled": "auto" }, "pluginVersion": "5.1.0", "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, "refId": "A" } ], - "title": "Control - HARD/SOFT RESET CS001", + "title": "", "transparent": true, "type": "volkovlabs-form-panel" } ], - "title": "Control - Station $station - SOFT/HARD RESET & modus (Alle stations)", + "title": "Control - Stationtest", "type": "row" }, { @@ -5442,7 +9350,7 @@ "h": 1, "w": 24, "x": 0, - "y": 15 + "y": 20 }, "id": 99, "panels": [ @@ -5514,7 +9422,7 @@ "h": 21, "w": 12, "x": 0, - "y": 398 + "y": 47 }, "id": 101, "interval": "1min", @@ -5535,7 +9443,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -5668,7 +9576,7 @@ "h": 21, "w": 12, "x": 12, - "y": 398 + "y": 47 }, "id": 102, "interval": "1min", @@ -5689,7 +9597,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -5822,7 +9730,7 @@ "h": 24, "w": 12, "x": 0, - "y": 476 + "y": 68 }, "id": 100, "interval": "1min", @@ -5843,7 +9751,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -5977,7 +9885,7 @@ "h": 3, "w": 12, "x": 12, - "y": 476 + "y": 68 }, "id": 105, "interval": "1min", @@ -5998,7 +9906,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -6133,7 +10041,7 @@ "h": 4, "w": 12, "x": 12, - "y": 479 + "y": 71 }, "id": 108, "interval": "1min", @@ -6154,7 +10062,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "disableTextWrap": false, @@ -6293,7 +10201,7 @@ "h": 4, "w": 12, "x": 12, - "y": 483 + "y": 75 }, "id": 107, "interval": "1min", @@ -6314,7 +10222,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -6449,7 +10357,7 @@ "h": 3, "w": 12, "x": 12, - "y": 487 + "y": 79 }, "id": 104, "interval": "1min", @@ -6470,7 +10378,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -6606,7 +10514,7 @@ "h": 3, "w": 12, "x": 12, - "y": 490 + "y": 82 }, "id": 106, "interval": "1min", @@ -6627,7 +10535,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "disableTextWrap": false, @@ -6766,7 +10674,7 @@ "h": 4, "w": 12, "x": 12, - "y": 493 + "y": 85 }, "id": 109, "interval": "1min", @@ -6787,7 +10695,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "disableTextWrap": false, @@ -6926,7 +10834,7 @@ "h": 3, "w": 12, "x": 12, - "y": 497 + "y": 89 }, "id": 103, "interval": "1min", @@ -6947,7 +10855,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -7015,7 +10923,7 @@ "type": "state-timeline" } ], - "title": "Info - Station $station - Serienummers / onderdelen geinstalleerd", + "title": "Info - Station $station2 - Serienummers / onderdelen geinstalleerd", "type": "row" }, { @@ -7024,7 +10932,7 @@ "h": 1, "w": 24, "x": 0, - "y": 16 + "y": 21 }, "id": 136, "panels": [ @@ -7101,7 +11009,7 @@ "h": 4, "w": 11, "x": 0, - "y": 395 + "y": 1586 }, "id": 156, "options": { @@ -7124,7 +11032,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -7214,7 +11122,7 @@ "h": 4, "w": 13, "x": 11, - "y": 395 + "y": 1586 }, "id": 151, "options": { @@ -7286,7 +11194,7 @@ }, "showAdvancedTypes": true }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -7351,7 +11259,7 @@ "h": 4, "w": 11, "x": 0, - "y": 399 + "y": 1590 }, "id": 137, "options": { @@ -7370,7 +11278,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -7461,7 +11369,7 @@ "h": 4, "w": 13, "x": 11, - "y": 399 + "y": 1590 }, "id": 142, "options": { @@ -7480,7 +11388,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -7584,7 +11492,7 @@ "h": 4, "w": 11, "x": 0, - "y": 403 + "y": 1594 }, "id": 138, "options": { @@ -7603,7 +11511,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -7687,7 +11595,7 @@ "h": 4, "w": 13, "x": 11, - "y": 403 + "y": 1594 }, "id": 145, "options": { @@ -7706,7 +11614,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -7810,7 +11718,7 @@ "h": 4, "w": 11, "x": 0, - "y": 407 + "y": 1598 }, "id": 139, "options": { @@ -7829,7 +11737,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -7913,7 +11821,7 @@ "h": 4, "w": 13, "x": 11, - "y": 407 + "y": 1598 }, "id": 148, "options": { @@ -7932,7 +11840,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -8061,7 +11969,7 @@ "h": 4, "w": 11, "x": 0, - "y": 411 + "y": 1602 }, "id": 154, "options": { @@ -8133,7 +12041,7 @@ }, "showAdvancedTypes": true }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -8223,7 +12131,7 @@ "h": 4, "w": 13, "x": 11, - "y": 411 + "y": 1602 }, "id": 152, "options": { @@ -8295,7 +12203,7 @@ }, "showAdvancedTypes": true }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -8360,7 +12268,7 @@ "h": 4, "w": 11, "x": 0, - "y": 415 + "y": 1606 }, "id": 144, "options": { @@ -8379,7 +12287,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -8483,7 +12391,7 @@ "h": 4, "w": 13, "x": 11, - "y": 415 + "y": 1606 }, "id": 143, "options": { @@ -8502,7 +12410,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -8606,7 +12514,7 @@ "h": 4, "w": 11, "x": 0, - "y": 419 + "y": 1610 }, "id": 147, "options": { @@ -8625,7 +12533,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -8729,7 +12637,7 @@ "h": 4, "w": 13, "x": 11, - "y": 419 + "y": 1610 }, "id": 146, "options": { @@ -8748,7 +12656,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -8852,7 +12760,7 @@ "h": 4, "w": 11, "x": 0, - "y": 423 + "y": 1614 }, "id": 150, "options": { @@ -8871,7 +12779,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -8975,7 +12883,7 @@ "h": 4, "w": 13, "x": 11, - "y": 423 + "y": 1614 }, "id": 149, "options": { @@ -8994,7 +12902,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -9123,7 +13031,7 @@ "h": 4, "w": 11, "x": 0, - "y": 427 + "y": 1618 }, "id": 155, "options": { @@ -9195,7 +13103,7 @@ }, "showAdvancedTypes": true }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -9285,7 +13193,7 @@ "h": 4, "w": 13, "x": 11, - "y": 427 + "y": 1618 }, "id": 153, "options": { @@ -9357,7 +13265,7 @@ }, "showAdvancedTypes": true }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -9433,7 +13341,7 @@ "h": 7, "w": 11, "x": 0, - "y": 431 + "y": 1622 }, "id": 141, "options": { @@ -9452,7 +13360,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -9566,7 +13474,7 @@ "h": 21, "w": 13, "x": 11, - "y": 431 + "y": 1622 }, "id": 140, "options": { @@ -9585,7 +13493,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -9689,7 +13597,7 @@ "h": 7, "w": 11, "x": 0, - "y": 438 + "y": 1629 }, "id": 158, "options": { @@ -9708,7 +13616,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -9812,7 +13720,7 @@ "h": 7, "w": 11, "x": 0, - "y": 445 + "y": 1636 }, "id": 159, "options": { @@ -9831,7 +13739,7 @@ "sort": "none" } }, - "pluginVersion": "11.6.0", + "pluginVersion": "12.0.1", "targets": [ { "editorMode": "code", @@ -9888,7 +13796,7 @@ "type": "state-timeline" } ], - "title": "Info - Station $station - Firmware versies actief", + "title": "Info - Station $station2 - Firmware versies actief", "type": "row" } ], @@ -9900,8 +13808,8 @@ "list": [ { "current": { - "text": "cs001", - "value": "cs001" + "text": "localhost", + "value": "localhost" }, "definition": "query_result(scrape_series_added)", "label": "Station", @@ -9919,8 +13827,8 @@ }, { "current": { - "text": "LBA03", - "value": "LBA03" + "text": "LBA00", + "value": "LBA00" }, "definition": "label_values(ds_antenna_names_info{member=\"LBA\"},str_value)", "label": "LBA Antenna", @@ -9940,14 +13848,14 @@ "text": "Tile00", "value": "Tile00" }, - "definition": "label_values(ds_antenna_names_info{member=\"HBA0\"},str_value)", + "definition": "label_values(ds_antenna_names_info{member=\"HBA\"},str_value)", "description": "", - "label": "HBA0 Tile", - "name": "HBA0_Tile", + "label": "HBA Tile", + "name": "HBA_Tile", "options": [], "query": { "qryType": 1, - "query": "label_values(ds_antenna_names_info{member=\"HBA0\"},str_value)", + "query": "label_values(ds_antenna_names_info{member=\"HBA\"},str_value)", "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, @@ -9956,17 +13864,17 @@ }, { "current": { - "text": "Tile24", - "value": "Tile24" + "text": "", + "value": "" }, - "definition": "label_values(ds_antenna_names_info{member=\"HBA1\"},str_value)", + "definition": "label_values(ds_antenna_names_info{member=\"HBA0\"},str_value)", "description": "", - "label": "HBA1 Tile", - "name": "HBA1_Tile", + "label": "HBA0 Tile", + "name": "HBA0_Tile", "options": [], "query": { "qryType": 1, - "query": "label_values(ds_antenna_names_info{member=\"HBA1\"},str_value)", + "query": "label_values(ds_antenna_names_info{member=\"HBA0\"},str_value)", "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, @@ -9975,17 +13883,17 @@ }, { "current": { - "text": "Tile00", - "value": "Tile00" + "text": "", + "value": "" }, - "definition": "label_values(ds_antenna_names_info{member=\"HBA\"},str_value)", + "definition": "label_values(ds_antenna_names_info{member=\"HBA1\"},str_value)", "description": "", - "label": "HBA Tile", - "name": "HBA_Tile", + "label": "HBA1 Tile", + "name": "HBA1_Tile", "options": [], "query": { "qryType": 1, - "query": "label_values(ds_antenna_names_info{member=\"HBA\"},str_value)", + "query": "label_values(ds_antenna_names_info{member=\"HBA1\"},str_value)", "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, @@ -9994,14 +13902,14 @@ }, { "current": { - "text": "ALL", - "value": "ALL" + "text": "LBA", + "value": "LBA" }, "label": "Powerdown selection", "name": "Selection", "options": [ { - "selected": false, + "selected": true, "text": "LBA", "value": "LBA" }, @@ -10011,22 +13919,27 @@ "value": "HBA" }, { - "selected": true, - "text": "ALL", - "value": "ALL" + "selected": false, + "text": "HBA0", + "value": "HBA0" + }, + { + "selected": false, + "text": "HBA1", + "value": "HBA1" } ], - "query": "LBA, HBA, ALL", + "query": "LBA, HBA, HBA0, HBA1", "type": "custom" }, { "allowCustomValue": false, "current": { "text": [ - "yy" + "xx" ], "value": [ - "yy" + "xx" ] }, "label": "pol", @@ -10034,18 +13947,38 @@ "name": "pol", "options": [ { - "selected": false, + "selected": true, "text": "xx", "value": "xx" }, { - "selected": true, + "selected": false, "text": "yy", "value": "yy" } ], "query": "xx, yy", "type": "custom" + }, + { + "allowCustomValue": false, + "current": { + "text": "RS307", + "value": "RS307" + }, + "definition": "query_result(ds_station_name_info)", + "hide": 2, + "label": "station2", + "name": "station2", + "options": [], + "query": { + "qryType": 3, + "query": "query_result(ds_station_name_info)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": ".*str_value=\"(.*)\"} .*", + "type": "query" } ] }, @@ -10057,5 +13990,5 @@ "timezone": "browser", "title": "Maintenance screen", "uid": "control", - "version": 60 + "version": 17 } \ No newline at end of file