From bc5be9e1ec1d4e1ec366b0960de8244e90e1b394 Mon Sep 17 00:00:00 2001 From: Emanuele Laface <emanuele.laface@esss.se> Date: Fri, 14 Apr 2023 02:33:59 +0200 Subject: [PATCH] Prepare the page for beam --- WebSites/pos/dashboard-old.json | 658 ++++++++++++++++++++++++++++++++ WebSites/pos/dashboard.json | 269 +++---------- 2 files changed, 717 insertions(+), 210 deletions(-) create mode 100644 WebSites/pos/dashboard-old.json diff --git a/WebSites/pos/dashboard-old.json b/WebSites/pos/dashboard-old.json new file mode 100644 index 0000000..217718f --- /dev/null +++ b/WebSites/pos/dashboard-old.json @@ -0,0 +1,658 @@ +{ + "version": 1, + "header_image": "", + "allow_edit": false, + "plugins": [], + "panes": [ + { + "width": 1, + "row": { + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 1, + "6": 1 + }, + "col": { + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 1, + "6": 1 + }, + "col_width": 6, + "widgets": [ + { + "type": "html", + "settings": { + "html": "let clock = datasources[\"Clock\"][\"numeric_value\"]; // trick to trigger the update\nlet cols = document.getElementsByClassName('gs_w')[0].getAttribute('data-sizex');\ndocument.getElementsByClassName('gs_w')[0].firstElementChild.firstElementChild.innerHTML = \"\";\n\nlet title = \"Public Operations Screen\"; // Change this title. Try not to exceed the 30 chars\n\nlet fontsize = Math.round((-0.66486486*title.length+66.67567568)*cols/4);\nlet lmargin = Math.round((0.43918919*title.length-4.05405405)+3.75*cols*cols-34.75*cols+79.75);\nlet width = 100-lmargin;\n\nvar text = `<div style=\\\"position: relative; margin-top: -15px; text-align: left;\\\">\n\t\t\t<div style=\\\"position: relative;\\\">\n\t\t\t\t<img src=\\\"../img/ess-logo.svg\\\" title=\\\"Designed by Emanuele Laface with PyEpics and Freeboard. Graphics by Dirk Nordt.\\\"></img>\n\t\t\t</div>\n<div class=\\\"tw-value\\\" style=\\\"font-size: `+String(fontsize)+`px; color:#ffffff !important; position: absolute; left: `+String(lmargin)+`%; width: `+String(width)+`%; height: 100%; justify-content: center; display: flex; align-items: center;\\\" title=\\\"Designed by Emanuele Laface with PyEpics and Freeboard. Graphics by Dirk Nordt.\\\">\n\t\t\t\t`+title+`\n\t\t\t</div>\n\t\t</div>`;\n\nif (cols == 1){\n text = \"<div style=\\\"position: static; margin-top: -15px;\\\"><img src=\\\"../img/ess-logo.svg\\\" title=\\\"Designed by Emanuele Laface with PyEpics and Freeboard. Graphics by Dirk Nordt.\\\"><div class=\\\"tw-value\\\" style=\\\"font-size: 30px; color:#ffffff !important; position: relative; bottom: 55px; left: 30px;\\\" title=\\\"Designed by Emanuele Laface with PyEpics and Freeboard. Graphics by Dirk Nordt.\\\"></div></img></div>\";\n document.getElementsByClassName('gs_w')[0].firstElementChild.firstElementChild.innerHTML = title;\n}\n\nreturn text;", + "height": 2 + } + } + ] + }, + { + "title": "Permit table", + "width": 1, + "row": { + "1": 7, + "2": 7, + "3": 7, + "4": 7, + "5": 7, + "6": 7, + "7": 11, + "8": 11, + "9": 11, + "10": 11, + "11": 11, + "13": 11, + "14": 11 + }, + "col": { + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 1, + "6": 1, + "7": 2, + "8": 2, + "9": 2, + "10": 2, + "11": 2, + "13": 2, + "14": 2 + }, + "col_width": 1, + "widgets": [ + { + "type": "indicator", + "settings": { + "title": "", + "value": "datasources[\"general\"][\"FBIS::beam_permit_ok\"][\"value\"][\"index\"]", + "on_text": "FBIS Global Permit", + "off_text": "FBIS Global Permit" + } + }, + { + "type": "indicator", + "settings": { + "value": "datasources[\"general\"][\"BPROD:Ops:BState\"][\"value\"][\"index\"]", + "on_text": "OP Beam Requested", + "off_text": "OP Beam Requested" + } + }, + { + "type": "text_widget", + "settings": { + "title": "PSS1 Mode of Operation", + "size": "regular", + "value": "return datasources[\"general\"][\"AccPSS:PSS-Area-1:PSSMode\"][\"value\"][\"choices\"][datasources[\"general\"][\"AccPSS:PSS-Area-1:PSSMode\"][\"value\"][\"index\"]];", + "animate": true + } + } + ] + }, + { + "title": "Ion Source", + "width": 1, + "row": { + "1": 25, + "2": 17, + "3": 15, + "4": 7, + "5": 7, + "6": 7, + "7": 7, + "8": 7, + "9": 7, + "10": 7, + "11": 7, + "12": 7, + "14": 7, + "15": 7 + }, + "col": { + "1": 1, + "2": 2, + "3": 1, + "4": 3, + "5": 3, + "6": 6, + "7": 1, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 1, + "14": 1, + "15": 1 + }, + "col_width": 1, + "widgets": [ + { + "type": "indicator", + "settings": { + "value": "datasources[\"source\"][\"ISrc-CS:ISS-Magtr-01:MwRdy\"][\"value\"][\"index\"]", + "on_text": "Magnetron On", + "off_text": "Magnetron Off" + } + }, + { + "type": "text_widget", + "settings": { + "title": "Power", + "size": "regular", + "value": "datasources[\"source\"][\"ISrc-CS:ISS-Magtr-01:PulsHLvl-S\"][\"value\"]", + "animate": true, + "units": "W" + } + }, + { + "type": "indicator", + "settings": { + "title": "High Voltage Platform", + "value": "datasources[\"source\"][\"ISrc-CS:ISS-HVPS-01:Pwr-R\"][\"value\"][\"index\"]\n", + "on_text": "String(datasources[\"source\"][\"ISrc-CS:ISS-HVPS-01:Vol-R\"][\"value\"].toFixed(0))+\" \"+datasources[\"source\"][\"ISrc-CS:ISS-HVPS-01:Vol-R\"][\"display\"][\"units\"]", + "off_text": "String(datasources[\"source\"][\"ISrc-CS:ISS-HVPS-01:Vol-R\"][\"value\"].toFixed(0))+\" \"+datasources[\"source\"][\"ISrc-CS:ISS-HVPS-01:Vol-R\"][\"display\"][\"units\"]" + } + } + ] + }, + { + "title": "Control Room", + "width": 1, + "row": { + "1": 15, + "2": 7, + "3": 7, + "4": 7, + "5": 7, + "6": 7, + "7": 7, + "8": 7, + "9": 7, + "10": 7, + "11": 7, + "12": 7, + "13": 7, + "14": 7, + "15": 7 + }, + "col": { + "1": 1, + "2": 2, + "3": 2, + "4": 2, + "5": 2, + "6": 2, + "7": 1, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 1, + "13": 1, + "14": 1, + "15": 1 + }, + "col_width": 1, + "widgets": [ + { + "type": "text_widget", + "settings": { + "title": "Shift ID", + "size": "regular", + "value": "datasources[\"general\"][\"NSO:Ops:SID\"][\"value\"]", + "animate": false + } + }, + { + "type": "text_widget", + "settings": { + "size": "regular", + "value": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar elements = document.getElementsByClassName('tw-value');\n\nfor (var i = 0; i < elements.length; i++) {\n var element = elements[i];\n if (element.innerHTML == datasources[\"general\"][\"NSO:Ops:Msg\"][\"value\"]) {\n element.style.fontSize = \"18px\";\n }\n}\n\nreturn datasources[\"general\"][\"NSO:Ops:Msg\"][\"value\"];", + "animate": true + } + }, + { + "type": "indicator", + "settings": { + "value": "if (datasources[\"general\"][\"NSO:Ops:ESSSystemPermit\"][\"value\"][\"index\"] == 1) {\n return 1;\n}\nelse {\n return 0;\n}", + "on_text": "Beam Authorization", + "off_text": "Beam Authorization" + } + }, + { + "type": "indicator", + "settings": { + "value": "datasources[\"general\"][\"NSO:Ops:ESSSystemPermit\"][\"value\"][\"index\"]", + "on_text": "System Permit", + "off_text": "System Permit" + } + } + ] + }, + { + "title": "ISrc Beam Current", + "width": 1, + "row": { + "1": 53, + "2": 19, + "3": 21, + "4": 7, + "5": 17, + "6": 11, + "9": 17, + "10": 17, + "11": 17, + "12": 17, + "15": 17, + "16": 17 + }, + "col": { + "1": 1, + "2": 1, + "3": 3, + "4": 4, + "5": 5, + "6": 4, + "9": 2, + "10": 2, + "11": 2, + "12": 2, + "15": 2, + "16": 2 + }, + "col_width": 1, + "widgets": [ + { + "type": "text_widget", + "settings": { + "size": "regular", + "value": "datasources[\"source\"][\"ISrc-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"].toFixed(3)", + "animate": true, + "units": "mA" + } + } + ] + }, + { + "title": "Beam Production Table", + "width": 1, + "row": { + "1": 33, + "2": 23, + "3": 7, + "4": 11, + "5": 7, + "6": 7, + "7": 13, + "8": 13, + "9": 13, + "10": 13, + "11": 13, + "12": 13, + "14": 13, + "16": 13 + }, + "col": { + "1": 1, + "2": 1, + "3": 3, + "4": 4, + "5": 4, + "6": 3, + "7": 1, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 1, + "14": 1, + "16": 1 + }, + "col_width": 1, + "widgets": [ + { + "type": "text_widget", + "settings": { + "title": "Frequency", + "size": "regular", + "value": "datasources[\"general\"][\"TD-M:Ctrl-SCE-1:ScTable-RB\"][\"value\"].split(\"__\")[1];", + "animate": true + } + }, + { + "type": "text_widget", + "settings": { + "title": "ISrc Pulse Length", + "size": "regular", + "value": "valueArray = [];\nrawArray = datasources[\"general\"][\"TD-M:Ctrl-SCE-1:ScTable-RB\"][\"value\"].split(\"_\")\nrawArray.forEach(function (item, index) {\n if (item != \"\") {\n valueArray.push(item);\n }\n});\n\nreturn valueArray[2];", + "animate": true, + "units": "µs" + } + }, + { + "type": "text_widget", + "settings": { + "title": "LEBT Pulse Length", + "size": "regular", + "value": "valueArray = [];\nrawArray = datasources[\"general\"][\"TD-M:Ctrl-SCE-1:ScTable-RB\"][\"value\"].split(\"_\")\nrawArray.forEach(function (item, index) {\n if (item != \"\") {\n valueArray.push(item);\n }\n});\n\nreturn valueArray[3];", + "animate": true, + "units": "µs" + } + }, + { + "type": "text_widget", + "settings": { + "title": "MEBT Pulse Length", + "size": "regular", + "value": "valueArray = [];\nrawArray = datasources[\"general\"][\"TD-M:Ctrl-SCE-1:ScTable-RB\"][\"value\"].split(\"_\")\nrawArray.forEach(function (item, index) {\n if (item != \"\") {\n valueArray.push(item);\n }\n});\n\nreturn valueArray[4];", + "animate": true, + "units": "µs" + } + } + ] + }, + { + "title": "Beam Energy", + "width": 1, + "row": { + "1": 49, + "2": 15, + "3": 17, + "4": 15, + "5": 13, + "6": 7, + "9": 17, + "10": 17, + "11": 17, + "12": 17, + "14": 17, + "15": 17 + }, + "col": { + "1": 1, + "2": 1, + "3": 3, + "4": 3, + "5": 5, + "6": 4, + "9": 2, + "10": 2, + "11": 2, + "12": 2, + "14": 2, + "15": 2 + }, + "col_width": 1, + "widgets": [ + { + "type": "text_widget", + "settings": { + "size": "regular", + "value": "switch(datasources[\"general\"][\"TD-M:Ctrl-SCE-1:BDest-Sel\"][\"value\"][\"index\"]) {\n case 0:\n return \"0 keV\";\n break;\n case 1:\n\t\treturn \"75 keV\";\n break;\n\tcase 2:\n\t\treturn String(datasources[\"general\"][\"PBI-FBPM01::Energy-R\"][\"value\"].toFixed(2))+\" MeV\";\n break;\n\tcase 3:\n\t\treturn \"21 MeV (Calc.)\";\n break;\n\tcase 4:\n\t\treturn \"DLT3 Energy\";\n break;\n default:\n return \"NO Energy reading\";\n}", + "animate": true + } + } + ] + }, + { + "title": "Beam Mode", + "width": 1, + "row": { + "1": 43, + "2": 25, + "3": 17, + "4": 15, + "5": 7, + "6": 7, + "7": 21, + "8": 21, + "9": 21, + "10": 21, + "11": 21, + "12": 21, + "15": 21, + "16": 21 + }, + "col": { + "1": 1, + "2": 2, + "3": 2, + "4": 1, + "5": 5, + "6": 5, + "7": 3, + "8": 3, + "9": 3, + "10": 3, + "11": 3, + "12": 3, + "15": 3, + "16": 3 + }, + "col_width": 1, + "widgets": [ + { + "type": "text_widget", + "settings": { + "size": "regular", + "value": "datasources[\"general\"][\"TD-M:Ctrl-SCE-1:BMod-Sel\"][\"value\"][\"choices\"][datasources[\"general\"][\"TD-M:Ctrl-SCE-1:BMod-Sel\"][\"value\"][\"index\"]]\n", + "animate": true + } + }, + { + "type": "text_widget", + "settings": { + "title": "Destination", + "size": "regular", + "value": "datasources[\"general\"][\"TD-M:Ctrl-SCE-1:BDest-Sel\"][\"value\"][\"choices\"][datasources[\"general\"][\"TD-M:Ctrl-SCE-1:BDest-Sel\"][\"value\"][\"index\"]]", + "animate": true + } + } + ] + }, + { + "title": "DTL Power", + "width": 1, + "row": { + "1": 57, + "2": 33, + "3": 37, + "4": 21, + "5": 29, + "6": 17, + "9": 19, + "10": 19, + "12": 19, + "14": 19, + "15": 19 + }, + "col": { + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 1, + "6": 1, + "9": 5, + "10": 5, + "12": 5, + "14": 5, + "15": 5 + }, + "col_width": 3, + "widgets": [ + { + "type": "flot_extended_plugin", + "settings": { + "plot_type": "area", + "legend": true, + "height": 5, + "value": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar module = \"\";\nvar timelength = 0;\nvar pwdata = [];\nvar enable = 1;\nvar data = [];\n\nfor (m=1; m<5; m++) {\n\tmodule = m.toString(); \n\n if (datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-EVR-101:RFSyncWdt-SP\"][\"value\"]/1000*2 > timelength) {\n timelength = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-EVR-101:RFSyncWdt-SP\"][\"value\"]/1000*2;\n }\n\n\tlet pwxdata = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-DIG-101:Dwn6-XAxis\"][\"value\"];\n\tlet pwydata = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-DIG-101:Dwn6-Cmp0\"][\"value\"];\n pwdata = [];\n \n let timestamp = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-DIG-101:Dwn6-Cmp0\"][\"timeStamp\"][\"secondsPastEpoch\"];\n\tlet now = Math.floor((new Date()).getTime() / 1000);\n\tif (now - timestamp > 120) {\n \tenable = 0;\n\t}\n\telse {\n \tenable = 1;\n\t}\n pwdata = [];\n\tfor (i=0; i < pwxdata.length; i++) {\n \tif (pwxdata[i] > timelength) {\n \tbreak;\n \t}\n\t\tpwdata.push([pwxdata[i], enable*pwydata[i]]);\n\t}\n\tfor (i=0; i < pwxdata.length; i++) {\n \tif (pwxdata[i] > timelength) {\n \tbreak;\n \t}\n\t\tpwdata.push([pwxdata[i], enable*pwydata[i]]);\n\t}\n data.push({label: 'DTL '+module, data: pwdata});\n}\nreturn data;", + "xticks": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar cols = document.getElementsByClassName('gs_w')[0].getAttribute('data-sizex');\n\nvar module = \"\";\nvar tmptimelength = 0;\nvar xdata = [];\nvar timelength = 0;\n\nfor (m=1; m<5; m++) {\n\tmodule = m.toString(); \n\n tmptimelength = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-EVR-101:RFSyncWdt-SP\"][\"value\"]/1000*2;\n\txdata = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-DIG-101:Dwn6-XAxis\"][\"value\"];\n \n\tif (tmptimelength > xdata[xdata.length-1]) {\n \ttmptimelength = xdata[xdata.length-1];\n\t}\n if (tmptimelength > timelength) {\n timelength = tmptimelength;\n }\n}\n\n\nvar xtick = [];\nvar size = 10;\nif (cols == 1) {\n size = 4;\n}\n\nfor (i = 0; i < (size+1); i += 1) {\n xtick.push([timelength*i/size, (timelength*i/size).toFixed(3).toString()]);\n}\nxtick[size/2][1] = xtick[size/2][1]+\"<br>t [ms]\";\n\nreturn xtick;", + "yticks": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar module = \"1\";\nvar dtl_data = [];\nvar min_dtl = 100000;\nvar max_dtl = 0;\nvar tmp_min = 0;\nvar tmp_max = 0;\n\nfor (m=1; m<5; m++) {\n\tmodule = m.toString();\n\tdtl_data = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-DIG-101:Dwn6-Cmp0\"][\"value\"];\n\ttmp_min = Math.min(...dtl_data);\n tmp_max = Math.max(...dtl_data);\n if (tmp_min < min_dtl) {\n min_dtl = tmp_min;\n }\n if (tmp_max > max_dtl) {\n max_dtl = tmp_max;\n }\n}\n\nvar dtl_ticks = [];\n\nif (max_dtl-min_dtl < 1) {\n return([[-2,\"-2\"],[-1,\"-1\"],[0,\"0\"],[1,\"1\"],[2,\"P [kW]\"]]);\n}\n\nfor (i = min_dtl; i <= max_dtl; i += (max_dtl-min_dtl)/5) {\n\tdtl_ticks.push([i, Math.trunc(i)]);\n}\n\ndtl_ticks.push([max_dtl+(max_dtl-min_dtl)/5, \"P [kW]\"]);\nreturn dtl_ticks;\n", + "zoom": "xy" + } + } + ] + }, + { + "title": "Cryogenic Distribution Line", + "width": 1, + "row": { + "1": 69, + "2": 45, + "3": 25, + "4": 33, + "5": 17, + "6": 15, + "7": 25, + "8": 25, + "9": 25, + "10": 25, + "11": 25, + "12": 25, + "13": 25 + }, + "col": { + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 1, + "6": 4, + "7": 1, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 1, + "13": 1 + }, + "col_width": 3, + "widgets": [ + { + "type": "flot_extended_plugin", + "settings": { + "plot_type": "None (Enable Points)", + "legend": true, + "height": 5, + "value": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar vbtemp = [];\n\nvar vb = 1;\nfor (let key in datasources[\"cryo\"]) {\n\tvbtemp.push([vb, datasources[\"cryo\"][key][\"value\"]]);\n vb = vb + 1;\n}\n\nvar data = [{label: \"Valve Box Temperature\", data: vbtemp, color: \"red\"}];\n\nreturn data;", + "xticks": "", + "yticks": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar vbdatay = [];\n\nfor (i = 0; i <= 300; i += 50) {\n\tvbdatay.push([i, i.toString()]);\n}\n\nvbdatay.push([350, \"T [K]\"]);\nreturn vbdatay;", + "points": true, + "zoom": "xy" + } + } + ] + } + ], + "datasources": [ + { + "name": "general", + "type": "JSON", + "settings": { + "url": "/data/api/v2/pvget/AccPSS:PSS-Area-1:PSSMode,BPROD:Ops:BState,NSO:Ops:SID,NSO:Ops:Msg,NSO:Ops:BeamAuthorization,NSO:Ops:ESSSystemPermit,FBIS::beam_permit_ok,PBI-FBPM01::Energy-R,TD-M:Ctrl-SCE-1:ScTable-RB,TD-M:Ctrl-SCE-1:BState-Sts,TD-M:Ctrl-SCE-1:BMod-Sel,TD-M:Ctrl-SCE-1:BDest-Sel", + "use_thingproxy": false, + "refresh": 10, + "method": "GET" + } + }, + { + "name": "Clock", + "type": "clock", + "settings": { + "refresh": 1, + "name": "Clock" + } + }, + { + "name": "source", + "type": "JSON", + "settings": { + "url": "/data/api/v2/pvget/ISrc-CS:ISS-Magtr-01:MwRdy,ISrc-CS:ISS-Magtr-01:PulsHLvl-S,ISrc-CS:ISS-HVPS-01:Pwr-R,ISrc-010:PBI-BCM-001:FlatTopCurrentR,ISrc-CS:ISS-HVPS-01:Vol-R", + "use_thingproxy": true, + "refresh": 10, + "method": "GET" + } + }, + { + "name": "rfq", + "type": "JSON", + "settings": { + "url": "/data/api/v2/pvget/RFQ-010:RFS-DIG-101:AI2-SMonAvg-Mag,RFQ-010:RFS-DIG-101:AI3-SMonAvg-Mag,RFQ-010:RFS-DIG-101:AI4-SMonAvg-Mag,RFQ-010:RFS-DIG-101:AI5-SMonAvg-Mag,RFQ-010:RFS-DIG-101:Dwn6-XAxis.[0:100:-1],RFQ-010:RFS-DIG-101:Dwn6-Cmp0.[0:100:-1],RFQ-010:RFS-EVR-101:RFSyncWdt-SP", + "use_thingproxy": true, + "refresh": 10, + "method": "GET" + } + }, + { + "name": "pbi", + "type": "JSON", + "settings": { + "url": "/data/api/v2/pvget/RFQ-010:PBI-BCM-001:PRC-TR1-ArrayData.[35772:4:36872],RFQ-010:PBI-BCM-001:PRC-TR1-ArrayData.[5503:200:49530],LEBT-010:PBI-FC-001:TRC2-ArrayData-Comp.[6500:1:6700],LEBT-010:PBI-FC-001:TRC2-ArrayData-Comp.[1000:40:9000],LEBT-010:PBI-BCM-001:PRC-TR1-ArrayData.[35772:4:36872],LEBT-010:PBI-BCM-001:PRC-TR1-ArrayData.[5503:200:49530],MEBT-010:PBI-FC-001:TRC2-ArrayData-Comp.[6500:1:6700],MEBT-010:PBI-FC-001:TRC2-ArrayData-Comp.[1000:40:9000],MEBT-010:PBI-BCM-001:PRC-TR1-ArrayData.[35772:4:36872],MEBT-010:PBI-BCM-001:PRC-TR1-ArrayData.[5503:200:49530],MEBT-010:PBI-BCM-002:PRC-TR1-ArrayData.[35772:4:36872],MEBT-010:PBI-BCM-002:PRC-TR1-ArrayData.[5503:200:49530],DTL-010:PBI-FC-001:TRC2-ArrayData-Comp.[1000:40:9000],DTL-010:PBI-FC-001:TRC2-ArrayData-Comp.[6500:1:6700],DTL-010:PBI-BCM-001:PRC-TR1-ArrayData.[5503:200:49530],DTL-010:PBI-BCM-001:PRC-TR1-ArrayTimeMs.[5503:200:49530],DTL-010:PBI-BCM-001:PRC-TR1-ArrayData.[35772:4:36872],DTL-010:PBI-BCM-001:PRC-TR1-ArrayTimeMs.[35772:4:36872]", + "use_thingproxy": true, + "refresh": 10, + "method": "GET", + "name": "pbi" + } + }, + { + "name": "dtl1", + "type": "JSON", + "settings": { + "url": "/data/api/v2/pvget/DTL-010:RFS-DIG-101:AI2-SMonAvg-Mag,DTL-010:RFS-DIG-101:AI3-SMonAvg-Mag,DTL-010:RFS-DIG-101:AI4-SMonAvg-Mag,DTL-010:RFS-DIG-101:AI5-SMonAvg-Mag,DTL-010:RFS-DIG-101:Dwn6-XAxis,DTL-010:RFS-DIG-101:Dwn6-Cmp0,DTL-010:RFS-EVR-101:RFSyncWdt-SP", + "use_thingproxy": true, + "refresh": 10, + "method": "GET" + } + }, + { + "name": "cryo", + "type": "JSON", + "settings": { + "url": "/data/api/v2/pvget/CrS-CTL:Cryo-TT-811:MeasValue,CrS-CTL:Cryo-TT-812:MeasValue,CrS-CTL:Cryo-TT-813:MeasValue,CrS-CTL:Cryo-TT-814:MeasValue,HBL-010CDL:Cryo-TT-82305:MeasValue,HBL-010CDL:Cryo-TT-82306:MeasValue,HBL-020CDL:Cryo-TT-82405:MeasValue,HBL-020CDL:Cryo-TT-82406:MeasValue,HBL-030CDL:Cryo-TT-82505:MeasValue,HBL-030CDL:Cryo-TT-82506:MeasValue,HBL-040CDL:Cryo-TT-82605:MeasValue,HBL-040CDL:Cryo-TT-82606:MeasValue,HBL-050CDL:Cryo-TT-82705:MeasValue,HBL-050CDL:Cryo-TT-82706:MeasValue,HBL-060CDL:Cryo-TT-82805:MeasValue,HBL-060CDL:Cryo-TT-82806:MeasValue,HBL-070CDL:Cryo-TT-82905:MeasValue,HBL-070CDL:Cryo-TT-82906:MeasValue,HBL-080CDL:Cryo-TT-83005:MeasValue,HBL-080CDL:Cryo-TT-83006:MeasValue,HBL-090CDL:Cryo-TT-83105:MeasValue,HBL-090CDL:Cryo-TT-83106:MeasValue,HBL-100CDL:Cryo-TT-83205:MeasValue,HBL-100CDL:Cryo-TT-83206:MeasValue,HBL-110CDL:Cryo-TT-83305:MeasValue,HBL-110CDL:Cryo-TT-83306:MeasValue,HBL-120CDL:Cryo-TT-83405:MeasValue,HBL-120CDL:Cryo-TT-83406:MeasValue,HBL-130CDL:Cryo-TT-83505:MeasValue,HBL-130CDL:Cryo-TT-83506:MeasValue,HBL-140CDL:Cryo-TT-83605:MeasValue,HBL-140CDL:Cryo-TT-83606:MeasValue,HBL-150CDL:Cryo-TT-83705:MeasValue,HBL-150CDL:Cryo-TT-83706:MeasValue,HBL-160CDL:Cryo-TT-83805:MeasValue,HBL-160CDL:Cryo-TT-83806:MeasValue,HBL-170CDL:Cryo-TT-83905:MeasValue,HBL-170CDL:Cryo-TT-83906:MeasValue,HBL-180CDL:Cryo-TT-84005:MeasValue,HBL-180CDL:Cryo-TT-84006:MeasValue,HBL-190CDL:Cryo-TT-84105:MeasValue,HBL-190CDL:Cryo-TT-84106:MeasValue,HBL-200CDL:Cryo-TT-84205:MeasValue,HBL-200CDL:Cryo-TT-84206:MeasValue,HBL-210CDL:Cryo-TT-84305:MeasValue,HBL-210CDL:Cryo-TT-84306:MeasValue,HBL-010CDL:Cryo-TT-82305:MeasValue,HBL-010CDL:Cryo-TT-82306:MeasValue,HBL-020CDL:Cryo-TT-82405:MeasValue,HBL-020CDL:Cryo-TT-82406:MeasValue,HBL-030CDL:Cryo-TT-82505:MeasValue,HBL-030CDL:Cryo-TT-82506:MeasValue,HBL-040CDL:Cryo-TT-82605:MeasValue,HBL-040CDL:Cryo-TT-82606:MeasValue,HBL-050CDL:Cryo-TT-82705:MeasValue,HBL-050CDL:Cryo-TT-82706:MeasValue,HBL-060CDL:Cryo-TT-82805:MeasValue,HBL-060CDL:Cryo-TT-82806:MeasValue,HBL-070CDL:Cryo-TT-82905:MeasValue,HBL-070CDL:Cryo-TT-82906:MeasValue,HBL-080CDL:Cryo-TT-83005:MeasValue,HBL-080CDL:Cryo-TT-83006:MeasValue,HBL-090CDL:Cryo-TT-83105:MeasValue,HBL-090CDL:Cryo-TT-83106:MeasValue,HBL-100CDL:Cryo-TT-83205:MeasValue,HBL-100CDL:Cryo-TT-83206:MeasValue,HBL-110CDL:Cryo-TT-83305:MeasValue,HBL-110CDL:Cryo-TT-83306:MeasValue,HBL-120CDL:Cryo-TT-83405:MeasValue,HBL-120CDL:Cryo-TT-83406:MeasValue,HBL-130CDL:Cryo-TT-83505:MeasValue,HBL-130CDL:Cryo-TT-83506:MeasValue,HBL-140CDL:Cryo-TT-83605:MeasValue,HBL-140CDL:Cryo-TT-83606:MeasValue,HBL-150CDL:Cryo-TT-83705:MeasValue,HBL-150CDL:Cryo-TT-83706:MeasValue,HBL-160CDL:Cryo-TT-83805:MeasValue,HBL-160CDL:Cryo-TT-83806:MeasValue,HBL-170CDL:Cryo-TT-83905:MeasValue,HBL-170CDL:Cryo-TT-83906:MeasValue,HBL-180CDL:Cryo-TT-84005:MeasValue,HBL-180CDL:Cryo-TT-84006:MeasValue,HBL-190CDL:Cryo-TT-84105:MeasValue,HBL-190CDL:Cryo-TT-84106:MeasValue,HBL-200CDL:Cryo-TT-84205:MeasValue,HBL-200CDL:Cryo-TT-84206:MeasValue,HBL-210CDL:Cryo-TT-84305:MeasValue,HBL-210CDL:Cryo-TT-84306:MeasValue,MBL-010CDL:Cryo-TT-81405:MeasValue,MBL-010CDL:Cryo-TT-81406:MeasValue,MBL-020CDL:Cryo-TT-81505:MeasValue,MBL-020CDL:Cryo-TT-81506:MeasValue,MBL-030CDL:Cryo-TT-81605:MeasValue,MBL-030CDL:Cryo-TT-81606:MeasValue,MBL-040CDL:Cryo-TT-81705:MeasValue,MBL-040CDL:Cryo-TT-81706:MeasValue,MBL-050CDL:Cryo-TT-81805:MeasValue,MBL-050CDL:Cryo-TT-81806:MeasValue,MBL-060CDL:Cryo-TT-81905:MeasValue,MBL-060CDL:Cryo-TT-81906:MeasValue,MBL-070CDL:Cryo-TT-82005:MeasValue,MBL-070CDL:Cryo-TT-82006:MeasValue,MBL-080CDL:Cryo-TT-82105:MeasValue,MBL-080CDL:Cryo-TT-82106:MeasValue,MBL-090CDL:Cryo-TT-82205:MeasValue,MBL-090CDL:Cryo-TT-82206:MeasValue,Spk-000CDL:Cryo-TT-91:MeasValue,Spk-000CDL:Cryo-TT-92:MeasValue,Spk-000CDL:Cryo-TT-97:MeasValue,Spk-000CDL:Cryo-TT-98:MeasValue,Spk-010CDL:Cryo-TT-01:MeasValue,Spk-010CDL:Cryo-TT-02:MeasValue,Spk-020CDL:Cryo-TT-01:MeasValue,Spk-020CDL:Cryo-TT-02:MeasValue,Spk-030CDL:Cryo-TT-01:MeasValue,Spk-030CDL:Cryo-TT-02:MeasValue,Spk-040CDL:Cryo-TT-01:MeasValue,Spk-040CDL:Cryo-TT-02:MeasValue,Spk-050CDL:Cryo-TT-01:MeasValue,Spk-050CDL:Cryo-TT-02:MeasValue,Spk-060CDL:Cryo-TT-01:MeasValue,Spk-060CDL:Cryo-TT-02:MeasValue,Spk-070CDL:Cryo-TT-01:MeasValue,Spk-070CDL:Cryo-TT-02:MeasValue,Spk-080CDL:Cryo-TT-01:MeasValue,Spk-080CDL:Cryo-TT-02:MeasValue,Spk-090CDL:Cryo-TT-01:MeasValue,Spk-090CDL:Cryo-TT-02:MeasValue,Spk-100CDL:Cryo-TT-01:MeasValue,Spk-100CDL:Cryo-TT-02:MeasValue,Spk-110CDL:Cryo-TT-01:MeasValue,Spk-110CDL:Cryo-TT-02:MeasValue,Spk-120CDL:Cryo-TT-01:MeasValue,Spk-120CDL:Cryo-TT-02:MeasValue,Spk-130CDL:Cryo-TT-01:MeasValue,Spk-130CDL:Cryo-TT-02:MeasValue,Spk-130CDL:Cryo-TT-81:MeasValue,Spk-130CDL:Cryo-TT-82:MeasValue,Spk-130CDL:Cryo-TT-85:MeasValue,Spk-130CDL:Cryo-TT-86:MeasValue", + "use_thingproxy": true, + "refresh": 10, + "method": "GET" + } + }, + { + "name": "dtl2", + "type": "JSON", + "settings": { + "url": "/data/api/v2/pvget/DTL-020:RFS-DIG-101:AI2-SMonAvg-Mag,DTL-020:RFS-DIG-101:AI3-SMonAvg-Mag,DTL-020:RFS-DIG-101:AI4-SMonAvg-Mag,DTL-020:RFS-DIG-101:AI5-SMonAvg-Mag,DTL-020:RFS-DIG-101:Dwn6-XAxis,DTL-020:RFS-DIG-101:Dwn6-Cmp0,DTL-020:RFS-EVR-101:RFSyncWdt-SP", + "use_thingproxy": true, + "refresh": 10, + "method": "GET" + } + }, + { + "name": "dtl3", + "type": "JSON", + "settings": { + "url": "/data/api/v2/pvget/DTL-030:RFS-DIG-101:AI2-SMonAvg-Mag,DTL-030:RFS-DIG-101:AI3-SMonAvg-Mag,DTL-030:RFS-DIG-101:AI4-SMonAvg-Mag,DTL-030:RFS-DIG-101:AI5-SMonAvg-Mag,DTL-030:RFS-DIG-101:Dwn6-XAxis,DTL-030:RFS-DIG-101:Dwn6-Cmp0,DTL-030:RFS-EVR-101:RFSyncWdt-SP", + "use_thingproxy": true, + "refresh": 10, + "method": "GET" + } + }, + { + "name": "dtl4", + "type": "JSON", + "settings": { + "url": "/data/api/v2/pvget/DTL-040:RFS-DIG-101:AI2-SMonAvg-Mag,DTL-040:RFS-DIG-101:AI3-SMonAvg-Mag,DTL-040:RFS-DIG-101:AI4-SMonAvg-Mag,DTL-040:RFS-DIG-101:AI5-SMonAvg-Mag,DTL-040:RFS-DIG-101:Dwn6-XAxis,DTL-040:RFS-DIG-101:Dwn6-Cmp0,DTL-040:RFS-EVR-101:RFSyncWdt-SP", + "use_thingproxy": true, + "refresh": 10, + "method": "GET" + } + } + ], + "columns": 6 +} diff --git a/WebSites/pos/dashboard.json b/WebSites/pos/dashboard.json index 217718f..4e8953c 100644 --- a/WebSites/pos/dashboard.json +++ b/WebSites/pos/dashboard.json @@ -100,9 +100,9 @@ "title": "Ion Source", "width": 1, "row": { - "1": 25, - "2": 17, - "3": 15, + "1": 15, + "2": 7, + "3": 7, "4": 7, "5": 7, "6": 7, @@ -118,10 +118,10 @@ "col": { "1": 1, "2": 2, - "3": 1, - "4": 3, - "5": 3, - "6": 6, + "3": 2, + "4": 2, + "5": 2, + "6": 2, "7": 1, "8": 1, "9": 1, @@ -166,8 +166,8 @@ "title": "Control Room", "width": 1, "row": { - "1": 15, - "2": 7, + "1": 33, + "2": 15, "3": 7, "4": 7, "5": 7, @@ -185,10 +185,10 @@ "col": { "1": 1, "2": 2, - "3": 2, - "4": 2, - "5": 2, - "6": 2, + "3": 3, + "4": 4, + "5": 5, + "6": 6, "7": 1, "8": 1, "9": 1, @@ -236,58 +236,14 @@ } ] }, - { - "title": "ISrc Beam Current", - "width": 1, - "row": { - "1": 53, - "2": 19, - "3": 21, - "4": 7, - "5": 17, - "6": 11, - "9": 17, - "10": 17, - "11": 17, - "12": 17, - "15": 17, - "16": 17 - }, - "col": { - "1": 1, - "2": 1, - "3": 3, - "4": 4, - "5": 5, - "6": 4, - "9": 2, - "10": 2, - "11": 2, - "12": 2, - "15": 2, - "16": 2 - }, - "col_width": 1, - "widgets": [ - { - "type": "text_widget", - "settings": { - "size": "regular", - "value": "datasources[\"source\"][\"ISrc-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"].toFixed(3)", - "animate": true, - "units": "mA" - } - } - ] - }, { "title": "Beam Production Table", "width": 1, "row": { - "1": 33, - "2": 23, - "3": 7, - "4": 11, + "1": 23, + "2": 15, + "3": 15, + "4": 7, "5": 7, "6": 7, "7": 13, @@ -302,9 +258,9 @@ "col": { "1": 1, "2": 1, - "3": 3, - "4": 4, - "5": 4, + "3": 1, + "4": 3, + "5": 3, "6": 3, "7": 1, "8": 1, @@ -322,8 +278,9 @@ "settings": { "title": "Frequency", "size": "regular", - "value": "datasources[\"general\"][\"TD-M:Ctrl-SCE-1:ScTable-RB\"][\"value\"].split(\"__\")[1];", - "animate": true + "value": "datasources[\"beamprod\"][\"TD-M:Ctrl-SCE-1:NepEvtIonMagStFreq-I\"][\"value\"].toFixed(1)", + "animate": true, + "units": "Hz" } }, { @@ -331,7 +288,7 @@ "settings": { "title": "ISrc Pulse Length", "size": "regular", - "value": "valueArray = [];\nrawArray = datasources[\"general\"][\"TD-M:Ctrl-SCE-1:ScTable-RB\"][\"value\"].split(\"_\")\nrawArray.forEach(function (item, index) {\n if (item != \"\") {\n valueArray.push(item);\n }\n});\n\nreturn valueArray[2];", + "value": "datasources[\"beamprod\"][\"BPROD:Ops:BSourcePL-RB\"][\"value\"]", "animate": true, "units": "µs" } @@ -341,7 +298,7 @@ "settings": { "title": "LEBT Pulse Length", "size": "regular", - "value": "valueArray = [];\nrawArray = datasources[\"general\"][\"TD-M:Ctrl-SCE-1:ScTable-RB\"][\"value\"].split(\"_\")\nrawArray.forEach(function (item, index) {\n if (item != \"\") {\n valueArray.push(item);\n }\n});\n\nreturn valueArray[3];", + "value": "datasources[\"beamprod\"][\"BPROD:Ops:BLebtPL-RB\"][\"value\"]", "animate": true, "units": "µs" } @@ -351,7 +308,7 @@ "settings": { "title": "MEBT Pulse Length", "size": "regular", - "value": "valueArray = [];\nrawArray = datasources[\"general\"][\"TD-M:Ctrl-SCE-1:ScTable-RB\"][\"value\"].split(\"_\")\nrawArray.forEach(function (item, index) {\n if (item != \"\") {\n valueArray.push(item);\n }\n});\n\nreturn valueArray[4];", + "value": "datasources[\"beamprod\"][\"BPROD:Ops:BeamPL-RB\"][\"value\"]", "animate": true, "units": "µs" } @@ -362,11 +319,11 @@ "title": "Beam Energy", "width": 1, "row": { - "1": 49, - "2": 15, + "1": 43, + "2": 25, "3": 17, "4": 15, - "5": 13, + "5": 7, "6": 7, "9": 17, "10": 17, @@ -377,10 +334,10 @@ }, "col": { "1": 1, - "2": 1, + "2": 2, "3": 3, - "4": 3, - "5": 5, + "4": 1, + "5": 4, "6": 4, "9": 2, "10": 2, @@ -405,11 +362,11 @@ "title": "Beam Mode", "width": 1, "row": { - "1": 43, + "1": 47, "2": 25, - "3": 17, + "3": 15, "4": 15, - "5": 7, + "5": 11, "6": 7, "7": 21, "8": 21, @@ -422,10 +379,10 @@ }, "col": { "1": 1, - "2": 2, + "2": 1, "3": 2, - "4": 1, - "5": 5, + "4": 2, + "5": 4, "6": 5, "7": 3, "8": 3, @@ -458,67 +415,15 @@ ] }, { - "title": "DTL Power", - "width": 1, - "row": { - "1": 57, - "2": 33, - "3": 37, - "4": 21, - "5": 29, - "6": 17, - "9": 19, - "10": 19, - "12": 19, - "14": 19, - "15": 19 - }, - "col": { - "1": 1, - "2": 1, - "3": 1, - "4": 1, - "5": 1, - "6": 1, - "9": 5, - "10": 5, - "12": 5, - "14": 5, - "15": 5 - }, - "col_width": 3, - "widgets": [ - { - "type": "flot_extended_plugin", - "settings": { - "plot_type": "area", - "legend": true, - "height": 5, - "value": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar module = \"\";\nvar timelength = 0;\nvar pwdata = [];\nvar enable = 1;\nvar data = [];\n\nfor (m=1; m<5; m++) {\n\tmodule = m.toString(); \n\n if (datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-EVR-101:RFSyncWdt-SP\"][\"value\"]/1000*2 > timelength) {\n timelength = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-EVR-101:RFSyncWdt-SP\"][\"value\"]/1000*2;\n }\n\n\tlet pwxdata = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-DIG-101:Dwn6-XAxis\"][\"value\"];\n\tlet pwydata = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-DIG-101:Dwn6-Cmp0\"][\"value\"];\n pwdata = [];\n \n let timestamp = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-DIG-101:Dwn6-Cmp0\"][\"timeStamp\"][\"secondsPastEpoch\"];\n\tlet now = Math.floor((new Date()).getTime() / 1000);\n\tif (now - timestamp > 120) {\n \tenable = 0;\n\t}\n\telse {\n \tenable = 1;\n\t}\n pwdata = [];\n\tfor (i=0; i < pwxdata.length; i++) {\n \tif (pwxdata[i] > timelength) {\n \tbreak;\n \t}\n\t\tpwdata.push([pwxdata[i], enable*pwydata[i]]);\n\t}\n\tfor (i=0; i < pwxdata.length; i++) {\n \tif (pwxdata[i] > timelength) {\n \tbreak;\n \t}\n\t\tpwdata.push([pwxdata[i], enable*pwydata[i]]);\n\t}\n data.push({label: 'DTL '+module, data: pwdata});\n}\nreturn data;", - "xticks": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar cols = document.getElementsByClassName('gs_w')[0].getAttribute('data-sizex');\n\nvar module = \"\";\nvar tmptimelength = 0;\nvar xdata = [];\nvar timelength = 0;\n\nfor (m=1; m<5; m++) {\n\tmodule = m.toString(); \n\n tmptimelength = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-EVR-101:RFSyncWdt-SP\"][\"value\"]/1000*2;\n\txdata = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-DIG-101:Dwn6-XAxis\"][\"value\"];\n \n\tif (tmptimelength > xdata[xdata.length-1]) {\n \ttmptimelength = xdata[xdata.length-1];\n\t}\n if (tmptimelength > timelength) {\n timelength = tmptimelength;\n }\n}\n\n\nvar xtick = [];\nvar size = 10;\nif (cols == 1) {\n size = 4;\n}\n\nfor (i = 0; i < (size+1); i += 1) {\n xtick.push([timelength*i/size, (timelength*i/size).toFixed(3).toString()]);\n}\nxtick[size/2][1] = xtick[size/2][1]+\"<br>t [ms]\";\n\nreturn xtick;", - "yticks": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar module = \"1\";\nvar dtl_data = [];\nvar min_dtl = 100000;\nvar max_dtl = 0;\nvar tmp_min = 0;\nvar tmp_max = 0;\n\nfor (m=1; m<5; m++) {\n\tmodule = m.toString();\n\tdtl_data = datasources[\"dtl\"+module][\"DTL-0\"+module+\"0:RFS-DIG-101:Dwn6-Cmp0\"][\"value\"];\n\ttmp_min = Math.min(...dtl_data);\n tmp_max = Math.max(...dtl_data);\n if (tmp_min < min_dtl) {\n min_dtl = tmp_min;\n }\n if (tmp_max > max_dtl) {\n max_dtl = tmp_max;\n }\n}\n\nvar dtl_ticks = [];\n\nif (max_dtl-min_dtl < 1) {\n return([[-2,\"-2\"],[-1,\"-1\"],[0,\"0\"],[1,\"1\"],[2,\"P [kW]\"]]);\n}\n\nfor (i = min_dtl; i <= max_dtl; i += (max_dtl-min_dtl)/5) {\n\tdtl_ticks.push([i, Math.trunc(i)]);\n}\n\ndtl_ticks.push([max_dtl+(max_dtl-min_dtl)/5, \"P [kW]\"]);\nreturn dtl_ticks;\n", - "zoom": "xy" - } - } - ] - }, - { - "title": "Cryogenic Distribution Line", + "title": "Beam Current", "width": 1, "row": { - "1": 69, - "2": 45, + "1": 53, + "2": 31, "3": 25, - "4": 33, + "4": 21, "5": 17, - "6": 15, - "7": 25, - "8": 25, - "9": 25, - "10": 25, - "11": 25, - "12": 25, - "13": 25 + "6": 17 }, "col": { "1": 1, @@ -526,27 +431,20 @@ "3": 1, "4": 1, "5": 1, - "6": 4, - "7": 1, - "8": 1, - "9": 1, - "10": 1, - "11": 1, - "12": 1, - "13": 1 + "6": 1 }, - "col_width": 3, + "col_width": 6, "widgets": [ { "type": "flot_extended_plugin", "settings": { - "plot_type": "None (Enable Points)", + "plot_type": "bar", "legend": true, - "height": 5, - "value": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar vbtemp = [];\n\nvar vb = 1;\nfor (let key in datasources[\"cryo\"]) {\n\tvbtemp.push([vb, datasources[\"cryo\"][key][\"value\"]]);\n vb = vb + 1;\n}\n\nvar data = [{label: \"Valve Box Temperature\", data: vbtemp, color: \"red\"}];\n\nreturn data;", - "xticks": "", - "yticks": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar vbdatay = [];\n\nfor (i = 0; i <= 300; i += 50) {\n\tvbdatay.push([i, i.toString()]);\n}\n\nvbdatay.push([350, \"T [K]\"]);\nreturn vbdatay;", - "points": true, + "height": 6, + "value": "let bcmdataset = [[0, datasources[\"beamcurr\"][\"ISrc-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"]],\n [2, datasources[\"beamcurr\"][\"LEBT-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"]],\n [3, datasources[\"beamcurr\"][\"RFQ-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"]],\n [4, datasources[\"beamcurr\"][\"MEBT-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"]],\n [6, datasources[\"beamcurr\"][\"MEBT-010:PBI-BCM-002:FlatTopCurrentR\"][\"value\"]],\n [7, datasources[\"beamcurr\"][\"DTL-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"]],\n [8, datasources[\"beamcurr\"][\"DTL-020:PBI-BCM-001:FlatTopCurrentR\"][\"value\"]],\n [9, datasources[\"beamcurr\"][\"DTL-030:PBI-BCM-001:FlatTopCurrentR\"][\"value\"]],\n [10, datasources[\"beamcurr\"][\"DTL-040:PBI-BCM-001:FlatTopCurrentR\"][\"value\"]]];\n\nlet fcdataset = [[1, datasources[\"beamcurr\"][\"LEBT-010:PBI-FC-001:STAT3-MeanValueR\"][\"value\"]],\n [5, datasources[\"beamcurr\"][\"MEBT-010:PBI-FC-001:STAT3-MeanValueR\"][\"value\"]],\n [11, datasources[\"beamcurr\"][\"DTL-040:PBI-FC-001:STAT3-MeanValueR\"][\"value\"]]];\n\nlet data = [{data: bcmdataset, color: \"lime\"},\n {data: fcdataset, color: \"yellow\"}];\nreturn data\n", + "xticks": "let clock = datasources[\"Clock\"][\"numeric_value\"]; // trick to trigger the update\nlet cols = document.getElementsByClassName('gs_w')[0].getAttribute('data-sizex');\n\nvar xticks = [[0, \"Ion Source<br>BCM\"],\n [1, \"LEBT<br>FC\"],\n [2, \"LEBT<br>BCM\"],\n [3, \"RFQ<br>BCM\"],\n [4, \"MEBT<br>BCM 1\"],\n [5, \"MEBT<br>FC\"],\n [6, \"MEBT<br>BCM 2\"],\n [7, \"DTL 1<br>BCM\"],\n [8, \"DTL 2<br>BCM\"],\n [9, \"DTL 3<br>BCM\"],\n [10, \"DTL 4<br>BCM\"],\n [11, \"DTL 4<br>FC\"]];\n\nif (cols == 1) {\n xticks = [[0, \"ISrc<br>BCM\"],\n [1, \"<br><br>LEBT<br>FC\"],\n [2, \"LEBT<br>BCM\"],\n [3, \"<br><br>RFQ<br>BCM\"],\n [4, \"MEBT<br>BCM 1\"],\n [5, \"<br><br>MEBT<br>FC\"],\n [6, \"MEBT<br>BCM 2\"],\n [7, \"<br><br>DTL 1<br>BCM\"],\n [8, \"DTL 2<br>BCM\"],\n [9, \"<br><br>DTL 3<br>BCM\"],\n [10, \"DTL 4<br>BCM\"],\n [11, \"<br><br>DTL 4<br>FC\"]];\n}\n\nreturn xticks;", + "yticks": "let maxcurr = Math.max(datasources[\"beamcurr\"][\"LEBT-010:PBI-FC-001:STAT3-MeanValueR\"][\"value\"],\n datasources[\"beamcurr\"][\"LEBT-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"RFQ-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"MEBT-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"MEBT-010:PBI-FC-001:STAT3-MeanValueR\"][\"value\"],\n datasources[\"beamcurr\"][\"MEBT-010:PBI-BCM-002:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"DTL-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"DTL-020:PBI-BCM-001:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"DTL-030:PBI-BCM-001:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"DTL-040:PBI-BCM-001:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"DTL-040:PBI-FC-001:STAT3-MeanValueR\"][\"value\"]);\n\nlet mincurr = Math.min(datasources[\"beamcurr\"][\"LEBT-010:PBI-FC-001:STAT3-MeanValueR\"][\"value\"],\n datasources[\"beamcurr\"][\"LEBT-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"RFQ-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"MEBT-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"MEBT-010:PBI-FC-001:STAT3-MeanValueR\"][\"value\"],\n datasources[\"beamcurr\"][\"MEBT-010:PBI-BCM-002:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"DTL-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"DTL-020:PBI-BCM-001:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"DTL-030:PBI-BCM-001:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"DTL-040:PBI-BCM-001:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"DTL-040:PBI-FC-001:STAT3-MeanValueR\"][\"value\"]);\n\nlet step=0.5;\nvar yticks=[];\nfor (i=mincurr; i<=maxcurr+step; i+=step) {\n yticks.push([i,i.toFixed(1).toString()]);\n}\n\nyticks[yticks.length-1] = [yticks[yticks.length-1][0],\"[mA]\"];\n\nreturn yticks;\n", + "points": false, "zoom": "xy" } } @@ -561,7 +459,8 @@ "url": "/data/api/v2/pvget/AccPSS:PSS-Area-1:PSSMode,BPROD:Ops:BState,NSO:Ops:SID,NSO:Ops:Msg,NSO:Ops:BeamAuthorization,NSO:Ops:ESSSystemPermit,FBIS::beam_permit_ok,PBI-FBPM01::Energy-R,TD-M:Ctrl-SCE-1:ScTable-RB,TD-M:Ctrl-SCE-1:BState-Sts,TD-M:Ctrl-SCE-1:BMod-Sel,TD-M:Ctrl-SCE-1:BDest-Sel", "use_thingproxy": false, "refresh": 10, - "method": "GET" + "method": "GET", + "name": "general" } }, { @@ -576,78 +475,28 @@ "name": "source", "type": "JSON", "settings": { - "url": "/data/api/v2/pvget/ISrc-CS:ISS-Magtr-01:MwRdy,ISrc-CS:ISS-Magtr-01:PulsHLvl-S,ISrc-CS:ISS-HVPS-01:Pwr-R,ISrc-010:PBI-BCM-001:FlatTopCurrentR,ISrc-CS:ISS-HVPS-01:Vol-R", - "use_thingproxy": true, - "refresh": 10, - "method": "GET" - } - }, - { - "name": "rfq", - "type": "JSON", - "settings": { - "url": "/data/api/v2/pvget/RFQ-010:RFS-DIG-101:AI2-SMonAvg-Mag,RFQ-010:RFS-DIG-101:AI3-SMonAvg-Mag,RFQ-010:RFS-DIG-101:AI4-SMonAvg-Mag,RFQ-010:RFS-DIG-101:AI5-SMonAvg-Mag,RFQ-010:RFS-DIG-101:Dwn6-XAxis.[0:100:-1],RFQ-010:RFS-DIG-101:Dwn6-Cmp0.[0:100:-1],RFQ-010:RFS-EVR-101:RFSyncWdt-SP", - "use_thingproxy": true, - "refresh": 10, - "method": "GET" - } - }, - { - "name": "pbi", - "type": "JSON", - "settings": { - "url": "/data/api/v2/pvget/RFQ-010:PBI-BCM-001:PRC-TR1-ArrayData.[35772:4:36872],RFQ-010:PBI-BCM-001:PRC-TR1-ArrayData.[5503:200:49530],LEBT-010:PBI-FC-001:TRC2-ArrayData-Comp.[6500:1:6700],LEBT-010:PBI-FC-001:TRC2-ArrayData-Comp.[1000:40:9000],LEBT-010:PBI-BCM-001:PRC-TR1-ArrayData.[35772:4:36872],LEBT-010:PBI-BCM-001:PRC-TR1-ArrayData.[5503:200:49530],MEBT-010:PBI-FC-001:TRC2-ArrayData-Comp.[6500:1:6700],MEBT-010:PBI-FC-001:TRC2-ArrayData-Comp.[1000:40:9000],MEBT-010:PBI-BCM-001:PRC-TR1-ArrayData.[35772:4:36872],MEBT-010:PBI-BCM-001:PRC-TR1-ArrayData.[5503:200:49530],MEBT-010:PBI-BCM-002:PRC-TR1-ArrayData.[35772:4:36872],MEBT-010:PBI-BCM-002:PRC-TR1-ArrayData.[5503:200:49530],DTL-010:PBI-FC-001:TRC2-ArrayData-Comp.[1000:40:9000],DTL-010:PBI-FC-001:TRC2-ArrayData-Comp.[6500:1:6700],DTL-010:PBI-BCM-001:PRC-TR1-ArrayData.[5503:200:49530],DTL-010:PBI-BCM-001:PRC-TR1-ArrayTimeMs.[5503:200:49530],DTL-010:PBI-BCM-001:PRC-TR1-ArrayData.[35772:4:36872],DTL-010:PBI-BCM-001:PRC-TR1-ArrayTimeMs.[35772:4:36872]", + "url": "/data/api/v2/pvget/ISrc-CS:ISS-Magtr-01:MwRdy,ISrc-CS:ISS-Magtr-01:PulsHLvl-S,ISrc-CS:ISS-HVPS-01:Pwr-R,ISrc-CS:ISS-HVPS-01:Vol-R", "use_thingproxy": true, "refresh": 10, "method": "GET", - "name": "pbi" - } - }, - { - "name": "dtl1", - "type": "JSON", - "settings": { - "url": "/data/api/v2/pvget/DTL-010:RFS-DIG-101:AI2-SMonAvg-Mag,DTL-010:RFS-DIG-101:AI3-SMonAvg-Mag,DTL-010:RFS-DIG-101:AI4-SMonAvg-Mag,DTL-010:RFS-DIG-101:AI5-SMonAvg-Mag,DTL-010:RFS-DIG-101:Dwn6-XAxis,DTL-010:RFS-DIG-101:Dwn6-Cmp0,DTL-010:RFS-EVR-101:RFSyncWdt-SP", - "use_thingproxy": true, - "refresh": 10, - "method": "GET" - } - }, - { - "name": "cryo", - "type": "JSON", - "settings": { - "url": "/data/api/v2/pvget/CrS-CTL:Cryo-TT-811:MeasValue,CrS-CTL:Cryo-TT-812:MeasValue,CrS-CTL:Cryo-TT-813:MeasValue,CrS-CTL:Cryo-TT-814:MeasValue,HBL-010CDL:Cryo-TT-82305:MeasValue,HBL-010CDL:Cryo-TT-82306:MeasValue,HBL-020CDL:Cryo-TT-82405:MeasValue,HBL-020CDL:Cryo-TT-82406:MeasValue,HBL-030CDL:Cryo-TT-82505:MeasValue,HBL-030CDL:Cryo-TT-82506:MeasValue,HBL-040CDL:Cryo-TT-82605:MeasValue,HBL-040CDL:Cryo-TT-82606:MeasValue,HBL-050CDL:Cryo-TT-82705:MeasValue,HBL-050CDL:Cryo-TT-82706:MeasValue,HBL-060CDL:Cryo-TT-82805:MeasValue,HBL-060CDL:Cryo-TT-82806:MeasValue,HBL-070CDL:Cryo-TT-82905:MeasValue,HBL-070CDL:Cryo-TT-82906:MeasValue,HBL-080CDL:Cryo-TT-83005:MeasValue,HBL-080CDL:Cryo-TT-83006:MeasValue,HBL-090CDL:Cryo-TT-83105:MeasValue,HBL-090CDL:Cryo-TT-83106:MeasValue,HBL-100CDL:Cryo-TT-83205:MeasValue,HBL-100CDL:Cryo-TT-83206:MeasValue,HBL-110CDL:Cryo-TT-83305:MeasValue,HBL-110CDL:Cryo-TT-83306:MeasValue,HBL-120CDL:Cryo-TT-83405:MeasValue,HBL-120CDL:Cryo-TT-83406:MeasValue,HBL-130CDL:Cryo-TT-83505:MeasValue,HBL-130CDL:Cryo-TT-83506:MeasValue,HBL-140CDL:Cryo-TT-83605:MeasValue,HBL-140CDL:Cryo-TT-83606:MeasValue,HBL-150CDL:Cryo-TT-83705:MeasValue,HBL-150CDL:Cryo-TT-83706:MeasValue,HBL-160CDL:Cryo-TT-83805:MeasValue,HBL-160CDL:Cryo-TT-83806:MeasValue,HBL-170CDL:Cryo-TT-83905:MeasValue,HBL-170CDL:Cryo-TT-83906:MeasValue,HBL-180CDL:Cryo-TT-84005:MeasValue,HBL-180CDL:Cryo-TT-84006:MeasValue,HBL-190CDL:Cryo-TT-84105:MeasValue,HBL-190CDL:Cryo-TT-84106:MeasValue,HBL-200CDL:Cryo-TT-84205:MeasValue,HBL-200CDL:Cryo-TT-84206:MeasValue,HBL-210CDL:Cryo-TT-84305:MeasValue,HBL-210CDL:Cryo-TT-84306:MeasValue,HBL-010CDL:Cryo-TT-82305:MeasValue,HBL-010CDL:Cryo-TT-82306:MeasValue,HBL-020CDL:Cryo-TT-82405:MeasValue,HBL-020CDL:Cryo-TT-82406:MeasValue,HBL-030CDL:Cryo-TT-82505:MeasValue,HBL-030CDL:Cryo-TT-82506:MeasValue,HBL-040CDL:Cryo-TT-82605:MeasValue,HBL-040CDL:Cryo-TT-82606:MeasValue,HBL-050CDL:Cryo-TT-82705:MeasValue,HBL-050CDL:Cryo-TT-82706:MeasValue,HBL-060CDL:Cryo-TT-82805:MeasValue,HBL-060CDL:Cryo-TT-82806:MeasValue,HBL-070CDL:Cryo-TT-82905:MeasValue,HBL-070CDL:Cryo-TT-82906:MeasValue,HBL-080CDL:Cryo-TT-83005:MeasValue,HBL-080CDL:Cryo-TT-83006:MeasValue,HBL-090CDL:Cryo-TT-83105:MeasValue,HBL-090CDL:Cryo-TT-83106:MeasValue,HBL-100CDL:Cryo-TT-83205:MeasValue,HBL-100CDL:Cryo-TT-83206:MeasValue,HBL-110CDL:Cryo-TT-83305:MeasValue,HBL-110CDL:Cryo-TT-83306:MeasValue,HBL-120CDL:Cryo-TT-83405:MeasValue,HBL-120CDL:Cryo-TT-83406:MeasValue,HBL-130CDL:Cryo-TT-83505:MeasValue,HBL-130CDL:Cryo-TT-83506:MeasValue,HBL-140CDL:Cryo-TT-83605:MeasValue,HBL-140CDL:Cryo-TT-83606:MeasValue,HBL-150CDL:Cryo-TT-83705:MeasValue,HBL-150CDL:Cryo-TT-83706:MeasValue,HBL-160CDL:Cryo-TT-83805:MeasValue,HBL-160CDL:Cryo-TT-83806:MeasValue,HBL-170CDL:Cryo-TT-83905:MeasValue,HBL-170CDL:Cryo-TT-83906:MeasValue,HBL-180CDL:Cryo-TT-84005:MeasValue,HBL-180CDL:Cryo-TT-84006:MeasValue,HBL-190CDL:Cryo-TT-84105:MeasValue,HBL-190CDL:Cryo-TT-84106:MeasValue,HBL-200CDL:Cryo-TT-84205:MeasValue,HBL-200CDL:Cryo-TT-84206:MeasValue,HBL-210CDL:Cryo-TT-84305:MeasValue,HBL-210CDL:Cryo-TT-84306:MeasValue,MBL-010CDL:Cryo-TT-81405:MeasValue,MBL-010CDL:Cryo-TT-81406:MeasValue,MBL-020CDL:Cryo-TT-81505:MeasValue,MBL-020CDL:Cryo-TT-81506:MeasValue,MBL-030CDL:Cryo-TT-81605:MeasValue,MBL-030CDL:Cryo-TT-81606:MeasValue,MBL-040CDL:Cryo-TT-81705:MeasValue,MBL-040CDL:Cryo-TT-81706:MeasValue,MBL-050CDL:Cryo-TT-81805:MeasValue,MBL-050CDL:Cryo-TT-81806:MeasValue,MBL-060CDL:Cryo-TT-81905:MeasValue,MBL-060CDL:Cryo-TT-81906:MeasValue,MBL-070CDL:Cryo-TT-82005:MeasValue,MBL-070CDL:Cryo-TT-82006:MeasValue,MBL-080CDL:Cryo-TT-82105:MeasValue,MBL-080CDL:Cryo-TT-82106:MeasValue,MBL-090CDL:Cryo-TT-82205:MeasValue,MBL-090CDL:Cryo-TT-82206:MeasValue,Spk-000CDL:Cryo-TT-91:MeasValue,Spk-000CDL:Cryo-TT-92:MeasValue,Spk-000CDL:Cryo-TT-97:MeasValue,Spk-000CDL:Cryo-TT-98:MeasValue,Spk-010CDL:Cryo-TT-01:MeasValue,Spk-010CDL:Cryo-TT-02:MeasValue,Spk-020CDL:Cryo-TT-01:MeasValue,Spk-020CDL:Cryo-TT-02:MeasValue,Spk-030CDL:Cryo-TT-01:MeasValue,Spk-030CDL:Cryo-TT-02:MeasValue,Spk-040CDL:Cryo-TT-01:MeasValue,Spk-040CDL:Cryo-TT-02:MeasValue,Spk-050CDL:Cryo-TT-01:MeasValue,Spk-050CDL:Cryo-TT-02:MeasValue,Spk-060CDL:Cryo-TT-01:MeasValue,Spk-060CDL:Cryo-TT-02:MeasValue,Spk-070CDL:Cryo-TT-01:MeasValue,Spk-070CDL:Cryo-TT-02:MeasValue,Spk-080CDL:Cryo-TT-01:MeasValue,Spk-080CDL:Cryo-TT-02:MeasValue,Spk-090CDL:Cryo-TT-01:MeasValue,Spk-090CDL:Cryo-TT-02:MeasValue,Spk-100CDL:Cryo-TT-01:MeasValue,Spk-100CDL:Cryo-TT-02:MeasValue,Spk-110CDL:Cryo-TT-01:MeasValue,Spk-110CDL:Cryo-TT-02:MeasValue,Spk-120CDL:Cryo-TT-01:MeasValue,Spk-120CDL:Cryo-TT-02:MeasValue,Spk-130CDL:Cryo-TT-01:MeasValue,Spk-130CDL:Cryo-TT-02:MeasValue,Spk-130CDL:Cryo-TT-81:MeasValue,Spk-130CDL:Cryo-TT-82:MeasValue,Spk-130CDL:Cryo-TT-85:MeasValue,Spk-130CDL:Cryo-TT-86:MeasValue", - "use_thingproxy": true, - "refresh": 10, - "method": "GET" - } - }, - { - "name": "dtl2", - "type": "JSON", - "settings": { - "url": "/data/api/v2/pvget/DTL-020:RFS-DIG-101:AI2-SMonAvg-Mag,DTL-020:RFS-DIG-101:AI3-SMonAvg-Mag,DTL-020:RFS-DIG-101:AI4-SMonAvg-Mag,DTL-020:RFS-DIG-101:AI5-SMonAvg-Mag,DTL-020:RFS-DIG-101:Dwn6-XAxis,DTL-020:RFS-DIG-101:Dwn6-Cmp0,DTL-020:RFS-EVR-101:RFSyncWdt-SP", - "use_thingproxy": true, - "refresh": 10, - "method": "GET" + "name": "source" } }, { - "name": "dtl3", + "name": "beamprod", "type": "JSON", "settings": { - "url": "/data/api/v2/pvget/DTL-030:RFS-DIG-101:AI2-SMonAvg-Mag,DTL-030:RFS-DIG-101:AI3-SMonAvg-Mag,DTL-030:RFS-DIG-101:AI4-SMonAvg-Mag,DTL-030:RFS-DIG-101:AI5-SMonAvg-Mag,DTL-030:RFS-DIG-101:Dwn6-XAxis,DTL-030:RFS-DIG-101:Dwn6-Cmp0,DTL-030:RFS-EVR-101:RFSyncWdt-SP", + "url": "/data/api/v2/pvget/TD-M:Ctrl-SCE-1:NepEvtIonMagStFreq-I,BPROD:Ops:BSourcePL-RB,BPROD:Ops:BLebtPL-RB,BPROD:Ops:BeamPL-RB", "use_thingproxy": true, "refresh": 10, "method": "GET" } }, { - "name": "dtl4", + "name": "beamcurr", "type": "JSON", "settings": { - "url": "/data/api/v2/pvget/DTL-040:RFS-DIG-101:AI2-SMonAvg-Mag,DTL-040:RFS-DIG-101:AI3-SMonAvg-Mag,DTL-040:RFS-DIG-101:AI4-SMonAvg-Mag,DTL-040:RFS-DIG-101:AI5-SMonAvg-Mag,DTL-040:RFS-DIG-101:Dwn6-XAxis,DTL-040:RFS-DIG-101:Dwn6-Cmp0,DTL-040:RFS-EVR-101:RFSyncWdt-SP", + "url": "/data/api/v2/pvget/ISrc-010:PBI-BCM-001:FlatTopCurrentR,LEBT-010:PBI-FC-001:STAT3-MeanValueR,LEBT-010:PBI-BCM-001:FlatTopCurrentR,RFQ-010:PBI-BCM-001:FlatTopCurrentR,MEBT-010:PBI-BCM-001:FlatTopCurrentR,MEBT-010:PBI-FC-001:STAT3-MeanValueR,MEBT-010:PBI-BCM-002:FlatTopCurrentR,DTL-010:PBI-BCM-001:FlatTopCurrentR,DTL-020:PBI-BCM-001:FlatTopCurrentR,DTL-030:PBI-BCM-001:FlatTopCurrentR,DTL-040:PBI-BCM-001:FlatTopCurrentR,DTL-040:PBI-FC-001:STAT3-MeanValueR", "use_thingproxy": true, "refresh": 10, "method": "GET" -- GitLab