Skip to content
Snippets Groups Projects
dashboard.json 9.96 KiB
Newer Older
Emanuele Laface's avatar
Emanuele Laface committed
{
	"version": 1,
	"header_image": "",
	"allow_edit": false,
	"plugins": [],
	"panes": [
		{
			"width": 1,
			"row": {
				"1": 1,
				"2": 1,
				"3": 1,
				"4": 1
			},
			"col": {
				"1": 1,
				"2": 1,
				"3": 1,
				"4": 1
			},
Emanuele Laface's avatar
Emanuele Laface committed
			"col_width": 4,
Emanuele Laface's avatar
Emanuele Laface committed
			"widgets": [
				{
					"type": "html",
					"settings": {
Emanuele Laface's avatar
Emanuele Laface committed
						"html": "datasources[\"Clock\"][\"numeric_value\"]; // trick to trigger the update\nvar cols = document.getElementsByClassName('gs_w')[0].getAttribute('data-sizex');\ndocument.getElementsByClassName('gs_w')[0].firstElementChild.firstElementChild.innerHTML = \"\";\nif (cols == 4){\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: 56px; color:#ffffff !important; position: relative; bottom: 35px; left: 160px;\\\" title=\\\"Designed by Emanuele Laface with PyEpics and Freeboard. Graphics by Dirk Nordt.\\\">Public Operations Screen</div></img></div>\";\n}\nif (cols == 3){\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: 46px; color:#ffffff !important; position: relative; bottom: 45px; left: 100px;\\\" title=\\\"Designed by Emanuele Laface with PyEpics and Freeboard. Graphics by Dirk Nordt.\\\">Public Operations Screen</div></img></div>\";\n}\n\nif (cols == 2){\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.\\\">Public Operations Screen</div></img></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 = \"Public Operations Screen\";\n}\n\nreturn text\n\n",
Emanuele Laface's avatar
Emanuele Laface committed
						"height": 2
					}
				}
			]
		},
		{
Emanuele Laface's avatar
Emanuele Laface committed
			"title": "Power applied to the RFQ",
			"width": 1,
			"row": {
				"1": 7,
				"2": 7,
				"3": 7,
				"4": 7,
				"5": 1,
				"6": 1,
				"7": 1,
				"9": 1
			},
			"col": {
				"1": 1,
				"2": 1,
				"3": 1,
				"4": 1,
				"5": 3,
				"6": 3,
				"7": 3,
				"9": 3
			},
			"col_width": 4,
			"widgets": [
				{
					"type": "flot_extended_plugin",
					"settings": {
						"plot_type": "stacked_area",
						"legend": true,
						"height": 4,
						"value": "xdata = datasources[\"POS\"][\"RFQ-010:RFS-DIG-101:Dwn0-XAxis.[0:10:1000]\"][\"value\"];\nydata = datasources[\"POS\"][\"RFQ-010:RFS-DIG-101:Dwn6-Cmp0.[0:10:1000]\"][\"value\"];\n\ndata = []\nfor (i = 0; i < ydata.length; i += 1) {\n\tdata.push([xdata[i],ydata[i]]);\n}\n\nreturn [{label: 'Current Power', data: data}];",
						"xticks": "",
						"yticks": "",
						"points": false,
						"tooltip": false,
						"zoom": "xy"
					}
				}
			]
		},
		{
			"title": "Power in the RFQ (not yet calibrated)",
			"width": 1,
			"row": {
				"1": 17,
				"2": 17,
				"3": 17,
				"4": 17,
				"6": 17,
				"9": 17,
				"10": 17
			},
			"col": {
				"1": 1,
				"2": 1,
				"3": 1,
				"4": 1,
				"6": 1,
				"9": 1,
				"10": 1
			},
			"col_width": 4,
			"widgets": [
				{
					"type": "flot_extended_plugin",
					"settings": {
						"plot_type": "stacked_area",
						"legend": true,
						"height": 4,
						"value": "xdata = datasources[\"POS\"][\"RFQ-010:RFS-DIG-101:Dwn0-XAxis.[0:10:1000]\"][\"value\"];\nydata = datasources[\"POS\"][\"RFQ-010:RFS-DIG-102:Dwn4-Cmp0.[0:10:1000]\"][\"value\"];\n\ndata = []\nfor (i = 0; i < ydata.length; i += 1) {\n\tdata.push([xdata[i],ydata[i]]);\n}\n\nreturn [{label: 'Power', data: data, color: 'red'}];",
						"zoom": ""
					}
				}
			]
		},
		{
			"title": "Average Power applied to the RFQ",
Emanuele Laface's avatar
Emanuele Laface committed
			"width": 1,
			"row": {
Emanuele Laface's avatar
Emanuele Laface committed
				"13": 27
Emanuele Laface's avatar
Emanuele Laface committed
			},
			"col": {
				"1": 1,
				"2": 1,
				"3": 1,
				"4": 1,
Emanuele Laface's avatar
Emanuele Laface committed
			},
Emanuele Laface's avatar
Emanuele Laface committed
			"col_width": 2,
Emanuele Laface's avatar
Emanuele Laface committed
			"widgets": [
				{
Emanuele Laface's avatar
Emanuele Laface committed
					"type": "flot_extended_plugin",
Emanuele Laface's avatar
Emanuele Laface committed
					"settings": {
Emanuele Laface's avatar
Emanuele Laface committed
						"plot_type": "line",
						"legend": true,
						"height": 3,
						"value": "current_value = datasources[\"POS\"][\"RFQ-010:RFS-DIG-101:AI6-SMonAvg-Mag\"][\"value\"].toFixed(3);\n\nreturn [\n    {label: \"Current Value: \"+current_value, data: datasources[\"RFQData\"][\"RFQ-010:RFS-DIG-101:AI6-SMonAvg-Mag\"]},\n];",
						"xticks": "5",
						"x_timestamp": true,
						"zoom": ""
Emanuele Laface's avatar
Emanuele Laface committed
			"title": "Repetition Rate",
Emanuele Laface's avatar
Emanuele Laface committed
			"width": 1,
			"row": {
Emanuele Laface's avatar
Emanuele Laface committed
				"1": 35,
				"2": 35,
				"3": 35,
Emanuele Laface's avatar
Emanuele Laface committed
				"14": 27
			},
			"col": {
				"1": 1,
				"2": 1,
				"3": 1,
				"4": 3,
				"14": 3
			},
			"col_width": 2,
			"widgets": [
				{
					"type": "flot_extended_plugin",
					"settings": {
						"plot_type": "line",
						"legend": true,
						"height": 3,
						"value": "current_value = Math.round(datasources[\"POS\"][\"RFQ-010:RFS-EVR-101:CycleFreq-RB\"][\"value\"]);\n\nreturn [\n    {label: \"Current Value: \"+current_value, data: datasources[\"RFQData\"][\"RFQ-010:RFS-EVR-101:CycleFreq-RB\"]}\n];\n",
						"x_timestamp": true,
						"zoom": ""
					}
				}
			]
		},
		{
			"title": "Shift ID",
			"width": 1,
			"row": {
				"1": 51,
				"2": 51,
				"3": 27,
				"4": 35,
				"5": 7,
				"6": 7,
				"7": 7,
				"10": 7,
				"12": 7,
				"13": 7,
				"15": 7
Emanuele Laface's avatar
Emanuele Laface committed
			},
			"col": {
				"1": 1,
Emanuele Laface's avatar
Emanuele Laface committed
				"2": 1,
Emanuele Laface's avatar
Emanuele Laface committed
				"3": 3,
				"4": 1,
Emanuele Laface's avatar
Emanuele Laface committed
				"5": 1,
Emanuele Laface's avatar
Emanuele Laface committed
				"7": 1,
Emanuele Laface's avatar
Emanuele Laface committed
				"12": 1,
				"13": 1,
				"15": 1
Emanuele Laface's avatar
Emanuele Laface committed
			},
			"col_width": 1,
			"widgets": [
				{
Emanuele Laface's avatar
Emanuele Laface committed
					"type": "text_widget",
Emanuele Laface's avatar
Emanuele Laface committed
					"settings": {
Emanuele Laface's avatar
Emanuele Laface committed
						"size": "regular",
						"value": "datasources[\"POS\"][\"NSO:Ops:SID\"][\"value\"]",
						"animate": false
Emanuele Laface's avatar
Emanuele Laface committed
			"width": 1,
			"row": {
Emanuele Laface's avatar
Emanuele Laface committed
				"1": 55,
				"2": 51,
Emanuele Laface's avatar
Emanuele Laface committed
				"4": 35,
				"5": 7,
				"6": 7,
Emanuele Laface's avatar
Emanuele Laface committed
				"12": 7,
				"13": 7,
				"15": 7
Emanuele Laface's avatar
Emanuele Laface committed
			},
			"col": {
				"1": 1,
Emanuele Laface's avatar
Emanuele Laface committed
				"2": 2,
Emanuele Laface's avatar
Emanuele Laface committed
				"3": 3,
Emanuele Laface's avatar
Emanuele Laface committed
				"5": 2,
				"6": 2,
Emanuele Laface's avatar
Emanuele Laface committed
				"12": 2,
				"13": 2,
				"15": 2
Emanuele Laface's avatar
Emanuele Laface committed
			},
			"col_width": 1,
			"widgets": [
				{
Emanuele Laface's avatar
Emanuele Laface committed
					"settings": {
						"size": "regular",
						"value": "datasources[\"POS\"][\"NSO:Ops:SL\"][\"value\"]",
						"animate": false
Emanuele Laface's avatar
Emanuele Laface committed
					}
				}
			]
		},
Emanuele Laface's avatar
Emanuele Laface committed
			"title": "Pulse Width",
Emanuele Laface's avatar
Emanuele Laface committed
				"1": 43,
				"2": 43,
				"3": 43,
				"4": 35,
				"15": 1
Emanuele Laface's avatar
Emanuele Laface committed
				"2": 1,
Emanuele Laface's avatar
Emanuele Laface committed
				"4": 3,
				"15": 15
Emanuele Laface's avatar
Emanuele Laface committed
			"col_width": 2,
Emanuele Laface's avatar
Emanuele Laface committed
						"plot_type": "line",
Emanuele Laface's avatar
Emanuele Laface committed
						"height": 3,
						"value": "current_value = Math.round(datasources[\"POS\"][\"RFQ-010:RFS-EVR-101:RFSyncWdt-SP\"][\"value\"]);\n\nreturn [\n    {label: \"Current Value: \"+current_value, data: datasources[\"RFQData\"][\"RFQ-010:RFS-EVR-101:RFSyncWdt-SP\"]}\n];",
						"x_timestamp": true,
Emanuele Laface's avatar
Emanuele Laface committed
			"title": "Current time",
			"width": 1,
			"row": {
Emanuele Laface's avatar
Emanuele Laface committed
				"1": 65,
				"2": 55,
				"3": 35,
				"4": 39,
				"5": 19,
				"6": 19,
				"10": 19,
				"12": 19,
				"13": 19,
				"15": 19,
				"16": 19
			},
			"col": {
				"1": 1,
Emanuele Laface's avatar
Emanuele Laface committed
				"2": 1,
Emanuele Laface's avatar
Emanuele Laface committed
				"4": 2,
				"5": 1,
				"6": 1,
				"10": 1,
				"12": 1,
				"13": 1,
				"15": 1,
				"16": 1
			},
			"col_width": 1,
			"widgets": [
				{
					"settings": {
Emanuele Laface's avatar
Emanuele Laface committed
						"html": "<div id=\"uhr\"></div>\n<script type=\"text/javascript\" src=\"./js/bahnhofsuhr.js\"></script>\n<script type=\"text/javascript\">\n    var uhr = new Bahnhofsuhr(\"uhr\", {showBorder: true, showShadow: false});\nwindow.onresize = uhr.scale;\n</script>",
Emanuele Laface's avatar
Emanuele Laface committed
		{
Emanuele Laface's avatar
Emanuele Laface committed
			"title": "Control Room Message",
Emanuele Laface's avatar
Emanuele Laface committed
			"width": 1,
			"row": {
Emanuele Laface's avatar
Emanuele Laface committed
				"1": 59,
				"2": 55,
				"3": 41,
				"4": 39,
				"9": 17,
				"10": 17,
				"12": 17,
				"13": 17,
				"15": 17,
				"16": 17
Emanuele Laface's avatar
Emanuele Laface committed
			},
			"col": {
				"1": 1,
Emanuele Laface's avatar
Emanuele Laface committed
				"2": 2,
				"3": 3,
Emanuele Laface's avatar
Emanuele Laface committed
				"4": 1,
Emanuele Laface's avatar
Emanuele Laface committed
				"9": 3,
				"10": 3,
				"12": 3,
				"13": 3,
				"15": 3,
				"16": 3
Emanuele Laface's avatar
Emanuele Laface committed
			},
Emanuele Laface's avatar
Emanuele Laface committed
			"col_width": 1,
Emanuele Laface's avatar
Emanuele Laface committed
			"widgets": [
				{
Emanuele Laface's avatar
Emanuele Laface committed
					"type": "html",
Emanuele Laface's avatar
Emanuele Laface committed
					"settings": {
Emanuele Laface's avatar
Emanuele Laface committed
						"html": "var date = new Date(datasources[\"POS\"][\"NSO:Ops:Msg\"][\"timestamp\"]*1e3);\nreturn \"<div class=\\\"tw-value\\\" style=\\\"font-size: 16px; width=100%; margin-top:10px; margin-left:10px; margin-right:10px;\\\" title=\\\"\"+date+\"\\\">\"+ datasources[\"POS\"][\"NSO:Ops:Msg\"][\"value\"] +\"</div>\"",
						"height": 2
Emanuele Laface's avatar
Emanuele Laface committed
					}
				}
			]
		}
	],
	"datasources": [
		{
Emanuele Laface's avatar
Emanuele Laface committed
			"type": "JSON",
			"settings": {
Emanuele Laface's avatar
Emanuele Laface committed
				"url": "/data/api/v1/caget/RFQ-010:RFS-DIG-101:AI6-SMonAvg-Mag,RFQ-010:RFS-EVR-101:CycleFreq-RB,RFQ-010:RFS-EVR-101:RFSyncWdt-SP,NSO:Ops:SID,NSO:Ops:Msg,NSO:Ops:SL,RFQ-010:RFS-DIG-101:Dwn6-Cmp0.[0:10:1000],RFQ-010:RFS-DIG-101:Dwn0-XAxis.[0:10:1000],RFQ-010:RFS-DIG-102:Dwn4-Cmp0.[0:10:1000]",
Emanuele Laface's avatar
Emanuele Laface committed
				"use_thingproxy": false,
				"refresh": 10,
Emanuele Laface's avatar
Emanuele Laface committed
				"method": "GET"
			}
		},
		{
			"name": "Clock",
			"type": "clock",
			"settings": {
Emanuele Laface's avatar
Emanuele Laface committed
		},
		{
			"name": "RFQData",
			"type": "JSON",
			"settings": {
				"url": "/data/api/v1/archiver/RFQ-010:RFS-DIG-101:AI6-SMonAvg-Mag,RFQ-010:RFS-EVR-101:CycleFreq-RB,RFQ-010:RFS-EVR-101:RFSyncWdt-SP/302400/100/freeboard",
				"use_thingproxy": false,
				"refresh": 10,
				"method": "GET"
			}
Emanuele Laface's avatar
Emanuele Laface committed
		}
	],
	"columns": 4
}