diff --git a/WebSites/pbi/dashboard.json b/WebSites/pbi/dashboard.json index 503f811f3943d4b194db283429496088d5f484d3..01509e6e1a20b1e2406f9974105bab7d89fcf72a 100644 --- a/WebSites/pbi/dashboard.json +++ b/WebSites/pbi/dashboard.json @@ -11,6 +11,7 @@ "2": 1, "3": 1, "4": 1, + "5": 1, "6": 1 }, "col": { @@ -18,6 +19,7 @@ "2": 1, "3": 1, "4": 1, + "5": 1, "6": 1 }, "col_width": 4, @@ -48,7 +50,7 @@ "2": 1, "3": 1, "4": 1, - "5": 3, + "5": 1, "7": 3, "9": 3 }, @@ -70,13 +72,14 @@ ] }, { - "title": "MEBT BPMS", + "title": "Beam Position Monitors", "width": 1, "row": { "1": 21, "2": 21, "3": 21, "4": 21, + "5": 21, "8": 19, "9": 19, "10": 19, @@ -87,6 +90,7 @@ "2": 1, "3": 1, "4": 1, + "5": 1, "8": 1, "9": 1, "10": 1, @@ -100,8 +104,8 @@ "plot_type": "line", "legend": true, "height": 6, - "value": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar xbpm = [];\nvar ybpm = [];\n\nlet bpmpositions = [0.400, 0.762, 2.224, 2.424, 2.624, 3.436, 3.636, 3.836];\nvar xpv = \"\";\nvar ypv = \"\";\nvar value = 0;\nvar yvalue = 0;\n\nfor (i=1; i < 9; i++) {\n xpv = \"MEBT-010:PBI-BPM-00\"+String(i)+\":XP-AvgValue\";\n xvalue = datasources[\"MEBT-BPM\"][xpv][\"value\"]/1000;\n if (xvalue == null) {\n xvalue = 0.0;\n }\n xbpm.push([bpmpositions[i-1], xvalue]);\n ypv = \"MEBT-010:PBI-BPM-00\"+String(i)+\":YP-AvgValue\";\n yvalue = datasources[\"MEBT-BPM\"][ypv][\"value\"]/1000;\n if (yvalue == null) {\n yvalue = 0.0;\n }\n ybpm.push([bpmpositions[i-1], yvalue]);\n}\n\nlet data = [{label: 'Horizontal', data: xbpm, color: \"lime\"},\n {label: 'Vertical', data: ybpm, color: \"yellow\"}];\n\nreturn data;", - "xticks": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar cols = document.getElementsByClassName('gs_w')[0].getAttribute('data-sizex');\n\nvar digits = 3;\nvar bpmxlabel = \"<br>BPM Position from MEBT start [m]\";\n\nif (cols == 2) {\n bpmxlabel = \"<br>BPM pos. [m]\";\n digits = 1;\n}\nif (cols == 1) {\n bpmxlabel = \"<br>BPM pos. [m]\";\n digits = 0;\n}\n\n\nvar bpmxtick = [];\n\nlet bpmpositions = [0.400, 0.762, 2.224, 2.424, 2.624, 3.436, 3.636, 3.836];\n\nfor (i = 0; i < 8; i += 1) {\n\tbpmxtick.push([bpmpositions[i], String(bpmpositions[i].toFixed(digits))]);\n}\nbpmxtick[2][1] += bpmxlabel;\n\nreturn bpmxtick;", + "value": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar xpv = \"\";\nvar ypv = \"\";\nvar value = 0;\nvar yvalue = 0;\n\nvar mebtxbpm = [];\nvar mebtybpm = [];\nlet mebtpos = [7521, 7883, 9345, 9545, 9745, 10557, 10757, 10957];\nfor (i=1; i < 9; i++) {\n xpv = \"MEBT-010:PBI-BPM-00\"+String(i)+\":XP-AvgValue\";\n xvalue = datasources[\"MEBT-BPM\"][xpv][\"value\"]/1000;\n if (xvalue == null) { xvalue = 0.0; };\n mebtxbpm.push([mebtpos[i-1]/1000, xvalue]);\n \n ypv = \"MEBT-010:PBI-BPM-00\"+String(i)+\":YP-AvgValue\";\n yvalue = datasources[\"MEBT-BPM\"][ypv][\"value\"]/1000;\n if (yvalue == null) { yvalue = 0.0; };\n mebtybpm.push([mebtpos[i-1]/1000, yvalue]);\n};\n\nxpv = \"\";\nypv = \"\";\nvalue = 0;\nyvalue = 0;\n\nvar dtl1xbpm = [];\nvar dtl1ybpm = [];\nlet dtl1pos = [11363, 12422, 12827, 14457, 15260, 18055];\nfor (i=1; i < 7; i++) {\n xpv = \"DTL-010:PBI-BPM-00\"+String(i)+\":XP-AvgValue\";\n xvalue = datasources[\"DTL1-BPM\"][xpv][\"value\"]/1000;\n if (xvalue == null) { xvalue = 0.0; };\n dtl1xbpm.push([dtl1pos[i-1]/1000, xvalue]);\n \n ypv = \"DTL-010:PBI-BPM-00\"+String(i)+\":YP-AvgValue\";\n yvalue = datasources[\"DTL1-BPM\"][ypv][\"value\"]/1000;\n if (yvalue == null) { yvalue = 0.0; };\n dtl1ybpm.push([dtl1pos[i-1]/1000, yvalue]);\n};\n\nxpv = \"\";\nypv = \"\";\nvalue = 0;\nyvalue = 0;\n\nvar dtl2xbpm = [];\nvar dtl2ybpm = [];\nlet dtl2pos = [19475, 21809, 24402];\nfor (i=1; i < 4; i++) {\n xpv = \"DTL-020:PBI-BPM-00\"+String(i)+\":XP-AvgValue\";\n xvalue = datasources[\"DTL2-BPM\"][xpv][\"value\"]/1000;\n if (xvalue == null) { xvalue = 0.0; };\n dtl2xbpm.push([dtl2pos[i-1]/1000, xvalue]);\n \n ypv = \"DTL-020:PBI-BPM-00\"+String(i)+\":YP-AvgValue\";\n yvalue = datasources[\"DTL2-BPM\"][ypv][\"value\"]/1000;\n if (yvalue == null) { yvalue = 0.0; };\n dtl2ybpm.push([dtl2pos[i-1]/1000, yvalue]);\n};\n\nxpv = \"\";\nypv = \"\";\nvalue = 0;\nyvalue = 0;\n\nvar dtl3xbpm = [];\nvar dtl3ybpm = [];\nlet dtl3pos = [27239, 30821];\nfor (i=1; i < 3; i++) {\n xpv = \"DTL-030:PBI-BPM-00\"+String(i)+\":XP-AvgValue\";\n xvalue = datasources[\"DTL3-BPM\"][xpv][\"value\"]/1000;\n if (xvalue == null) { xvalue = 0.0; };\n dtl3xbpm.push([dtl3pos[i-1]/1000, xvalue]);\n \n ypv = \"DTL-030:PBI-BPM-00\"+String(i)+\":YP-AvgValue\";\n yvalue = datasources[\"DTL3-BPM\"][ypv][\"value\"]/1000;\n if (yvalue == null) { yvalue = 0.0; };\n dtl3ybpm.push([dtl3pos[i-1]/1000, yvalue]);\n};\n\nxpv = \"\";\nypv = \"\";\nvalue = 0;\nyvalue = 0;\n\nvar dtl4xbpm = [];\nvar dtl4ybpm = [];\nlet dtl4pos = [34710, 38246];\nfor (i=1; i < 3; i++) {\n xpv = \"DTL-040:PBI-BPM-00\"+String(i)+\":XP-AvgValue\";\n xvalue = datasources[\"DTL4-BPM\"][xpv][\"value\"]/1000;\n if (xvalue == null) { xvalue = 0.0; };\n dtl4xbpm.push([dtl4pos[i-1]/1000, xvalue]);\n \n ypv = \"DTL-040:PBI-BPM-00\"+String(i)+\":YP-AvgValue\";\n yvalue = datasources[\"DTL4-BPM\"][ypv][\"value\"]/1000;\n if (yvalue == null) { yvalue = 0.0; };\n dtl4ybpm.push([dtl4pos[i-1]/1000, yvalue]);\n};\n\nlet data = [{label: 'Horizontal', data: mebtxbpm, color: \"red\"},\n {label: 'Vertical', data: mebtybpm, color: \"yellow\"},\n {data: dtl1xbpm, color: \"red\"},\n {data: dtl1ybpm, color: \"yellow\"},\n {data: dtl2xbpm, color: \"red\"},\n {data: dtl2ybpm, color: \"yellow\"},\n {data: dtl3xbpm, color: \"red\"},\n {data: dtl3ybpm, color: \"yellow\"},\n\t\t\t{data: dtl4xbpm, color: \"red\"},\n {data: dtl4ybpm, color: \"yellow\"}];\n\nreturn data;", + "xticks": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar cols = document.getElementsByClassName('gs_w')[0].getAttribute('data-sizex');\n\nbpmxlabel = \"<br>BPM pos. [m]\";\nvar bpmxtick = [];\n\nlet bpmpositions = [7521, 7883, 9345, 9545, 9745, 10557, 10757, 10957, 11363, 12422, 12827, 14457, 15260, 18055, 19475, 21809, 24402, 27239, 30821, 34710, 38246];\n\nfor (i = 7521; i < 38246; i += 3072) {\n\tbpmxtick.push([i/1000, (i/1000).toFixed(0)]);\n}\nbpmxtick[5][1] += bpmxlabel;\n\nreturn bpmxtick;", "yticks": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar ytick = [];\n\nfor (i = -4; i < 4; i += 1) {\n\tytick.push([i, String(i)]);\n}\n\nytick.push([4, \"∆X,∆Y [mm]\"]);\n\nreturn ytick;", "points": true, "zoom": "xy" @@ -117,6 +121,7 @@ "2": 35, "3": 35, "4": 35, + "5": 35, "13": 35, "15": 35 }, @@ -125,6 +130,7 @@ "2": 1, "3": 1, "4": 1, + "5": 1, "13": 1, "15": 1 }, @@ -141,38 +147,6 @@ } } ] - }, - { - "title": "DTL1 BPMs", - "width": 1, - "row": { - "1": 53, - "2": 53, - "4": 53, - "16": 53 - }, - "col": { - "1": 1, - "2": 1, - "4": 1, - "16": 1 - }, - "col_width": 4, - "widgets": [ - { - "type": "flot_extended_plugin", - "settings": { - "plot_type": "line", - "legend": true, - "height": 6, - "value": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar xbpm = [];\nvar ybpm = [];\n\nlet bpmpositions = [0.230, 1.290, 1.695, 3.325, 4.128, 6.923];\nvar xpv = \"\";\nvar ypv = \"\";\nvar value = 0;\nvar yvalue = 0;\n\nfor (i=1; i < 7; i++) {\n xpv = \"DTL-010:PBI-BPM-00\"+String(i)+\":XP-AvgValue\";\n xvalue = datasources[\"DTL1-BPM\"][xpv][\"value\"]/1000;\n if (xvalue == null) {\n xvalue = 0.0;\n }\n xbpm.push([bpmpositions[i-1], xvalue]);\n ypv = \"DTL-010:PBI-BPM-00\"+String(i)+\":YP-AvgValue\";\n yvalue = datasources[\"DTL1-BPM\"][ypv][\"value\"]/1000;\n if (yvalue == null) {\n yvalue = 0.0;\n }\n ybpm.push([bpmpositions[i-1], yvalue]);\n}\n\nlet data = [{label: 'Horizontal', data: xbpm, color: \"lime\"},\n {label: 'Vertical', data: ybpm, color: \"yellow\"}];\n\nreturn data;", - "xticks": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar cols = document.getElementsByClassName('gs_w')[0].getAttribute('data-sizex');\n\nvar digits = 3;\nvar bpmxlabel = \"<br>BPM Position from DTL1 start [m]\";\n\nif (cols == 2) {\n bpmxlabel = \"<br>BPM pos. [m]\";\n digits = 1;\n}\nif (cols == 1) {\n bpmxlabel = \"<br>BPM pos. [m]\";\n digits = 0;\n}\n\n\nvar bpmxtick = [];\n\nlet bpmpositions = [0.230, 1.290, 1.695, 3.325, 4.128, 6.923];\n\nfor (i = 0; i < 6; i += 1) {\n\tbpmxtick.push([bpmpositions[i], String(bpmpositions[i].toFixed(digits))]);\n}\nbpmxtick[3][1] += bpmxlabel;\n\nreturn bpmxtick;", - "yticks": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar ytick = [];\n\nfor (i = -4; i < 4; i += 1) {\n\tytick.push([i, String(i)]);\n}\n\nytick.push([4, \"∆X,∆Y [mm]\"]);\n\nreturn ytick;", - "points": true, - "zoom": "xy" - } - } - ] } ], "datasources": [ @@ -223,6 +197,36 @@ "method": "GET", "name": "DTL1-BPM" } + }, + { + "name": "DTL2-BPM", + "type": "JSON", + "settings": { + "url": "/data/api/v2/pvget/DTL-020:PBI-BPM-001:XP-AvgValue,DTL-020:PBI-BPM-001:YP-AvgValue,DTL-020:PBI-BPM-002:XP-AvgValue,DTL-020:PBI-BPM-002:YP-AvgValue,DTL-020:PBI-BPM-003:XP-AvgValue,DTL-020:PBI-BPM-003:YP-AvgValue", + "use_thingproxy": true, + "refresh": 10, + "method": "GET" + } + }, + { + "name": "DTL3-BPM", + "type": "JSON", + "settings": { + "url": "/data/api/v2/pvget/DTL-030:PBI-BPM-001:XP-AvgValue,DTL-030:PBI-BPM-001:YP-AvgValue,DTL-030:PBI-BPM-002:XP-AvgValue,DTL-030:PBI-BPM-002:YP-AvgValue", + "use_thingproxy": true, + "refresh": 10, + "method": "GET" + } + }, + { + "name": "DTL4-BPM", + "type": "JSON", + "settings": { + "url": "/data/api/v2/pvget/DTL-040:PBI-BPM-001:XP-AvgValue,DTL-040:PBI-BPM-001:YP-AvgValue,DTL-040:PBI-BPM-002:XP-AvgValue,DTL-040:PBI-BPM-002:YP-AvgValue", + "use_thingproxy": true, + "refresh": 10, + "method": "GET" + } } ], "columns": 4