Newer
Older
"plugins": [],
"panes": [
{
"width": 1,
"row": {
"1": 1,
"2": 1,
"3": 1,
"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\nvar title = \"\";\nif (datasources[\"gwhealth\"][\"gwstatus\"] == \"OK\") {\n\ttitle = \"Public Operations Screen\"; // Change this title. Try not to exceed the 30 chars\n}\nif (datasources[\"gwhealth\"][\"gwstatus\"] == \"KO\") {\n\ttitle = \"Public Operations Screen [Offline]\"; // Change this title. Try not to exceed the 30 chars\n}\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 p4p 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 p4p 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 p4p 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 p4p and Freeboard. Graphics by Dirk Nordt.\\\"></div></img></div>\";\n document.getElementsByClassName('gs_w')[0].firstElementChild.firstElementChild.innerHTML = title;\n}\n\nreturn text;",
},
"col": {
"1": 1,
"2": 1,
"3": 1,
"4": 1,
"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\nif (cols == 5) {\n\ttext = \"<center><H1>Spoke 06 Coupler 1 Warm Conditioning</H1></center>\"\n}\nif (cols == 4) {\n\ttext = \"<center><H1>Spoke 06 Coupler 1 Warm Conditioning</H1></center>\"\n}\nif (cols == 3) {\n\ttext = \"<center><H1>Spoke 06 Coupler 1 Warm Conditioning</H1></center>\"\n}\nif (cols == 2) {\n\ttext = \"<center><H3>Spoke 06 Coupler 1 Warm Conditioning</H3></center>\"\n}\nif (cols == 1) {\n\ttext = \"<center><H4>Spoke 06 Coupler 1 Warm Conditioning</H4></center>\"\n}\n\nreturn text;",
"plot_type": "line",
"legend": true,
"value": "function shiftTime(dataset) {\n return dataset.map(splitted => {\n let x = splitted[0]+7200000;\n let y = splitted[1];\n\n return [x, y];\n });\n}\n\n\ndata = [{label: 'Vacuum [x10⁻⁹ mBar]', data: shiftTime(datasources[\"archiver\"][\"Spk-060Crm:Vac-VGC-20000:PrsR\"])},\n {label: 'Power [kW]', data: shiftTime(datasources[\"archiver\"][\"Spk-060RFC:RFS-LLRF-201:FFPulseGenP\"]), yaxis: 2}];\n\nreturn data;\n\n\n",
"yticks": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar ytick = [];\n\nvaluesy = datasources[\"archiver\"][\"Spk-060Crm:Vac-VGC-20000:PrsR\"].map(ylist => ylist[1]);\n\nlet maxy = Math.max(...valuesy);\nlet miny = Math.min(...valuesy);\n\nfor (i = miny; i < maxy; i += (maxy-miny)/8) {\n ytick.push([i, String((i*1e9).toFixed(1))]);\n }\n\nreturn ytick;",
},
"col": {
"1": 1,
"2": 1,
"3": 1,
"4": 1,
"value": "let pwrxdata = datasources[\"general\"][\"Spk-060RFC:RFS-DIG-201:Dwn3-XAxis.[0:100:-1]\"][\"value\"];\nlet pwrydata = datasources[\"general\"][\"Spk-060RFC:RFS-DIG-201:Dwn3-Cmp0.[0:100:-1]\"][\"value\"];\nvar pwrdata = [];\n\nfor (i=0; i < pwrxdata.length; i++) {\n\tpwrdata.push([pwrxdata[i], pwrydata[i]]);\n}\n\nlet data = [{label: 'LLRF Pulse Power', data: pwrdata}];\n\nreturn data;",
"xticks": "datasources[\"Clock\"][\"numeric_value\"];\nlet cols = document.getElementsByClassName('gs_w')[0].getAttribute('data-sizex');\n\nvar xtick = [];\n\nlet valuesx = datasources[\"general\"][\"Spk-060RFC:RFS-DIG-201:Dwn3-XAxis.[0:100:-1]\"][\"value\"];\n\nlet maxx = Math.max(...valuesx);\nlet minx = Math.min(...valuesx);\n\nvar values = 14;\nif (cols == 1) {\n values = 6;\n}\n\nfor (i = minx; i < maxx; i += (maxx-minx)/values) {\n\txtick.push([i, String(i.toFixed(2))]);\n}\n\nxtick[Math.floor(xtick.length/2)]=[xtick[Math.floor(xtick.length/2)][0], xtick[Math.floor(xtick.length/2)][1]+\"<br>[ms]\"];\n\nreturn xtick;",
"yticks": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar ytick = [];\n\nlet valuesy = datasources[\"general\"][\"Spk-060RFC:RFS-DIG-201:Dwn3-Cmp0.[0:100:-1]\"][\"value\"];\n\nlet maxy = Math.max(...valuesy);\nlet miny = Math.min(...valuesy);\n\nfor (i = miny; i < maxy; i += (maxy-miny)/8) {\n if (maxy - i > (maxy-miny)/8) {\n\t\tytick.push([i, String(i.toFixed(0))]);\n }\n}\n\nytick.push([maxy, \"[kW]\"]);\n\nreturn ytick;",
"url": "/data/api/v2/pvget/Spk-060RFC:RFS-DIG-201:Dwn3-Cmp0.[0:100:-1],Spk-060RFC:RFS-DIG-201:Dwn3-XAxis.[0:100:-1]",
},
{
"name": "Clock",
"type": "clock",
"settings": {
"refresh": 1,
"name": "Clock"
"url": "/data/-/gwhealth/NSO:Ops:SID",
"use_thingproxy": true,
"refresh": 10,
"method": "GET"
}
"url": "/data/api/v1/archiver/Spk-060Crm:Vac-VGC-20000:PrsR,Spk-060RFC:RFS-LLRF-201:FFPulseGenP/3600/100/freeboard",
"method": "GET",
"name": "archiver"