Skip to content
Snippets Groups Projects
dashboard.json 7.21 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
					}
				}
			]
		},
		{
			"title": "Shift ID",
			"width": 1,
			"row": {
Emanuele Laface's avatar
Emanuele Laface committed
				"5": 7,
				"6": 7,
Emanuele Laface's avatar
Emanuele Laface committed
			},
			"col": {
				"1": 1,
				"2": 1,
				"3": 1,
				"4": 1,
				"5": 1,
				"6": 1,
Emanuele Laface's avatar
Emanuele Laface committed
			},
			"col_width": 1,
			"widgets": [
				{
					"type": "text_widget",
					"settings": {
						"size": "regular",
						"value": "datasources[\"POS\"][\"NSO:Ops:SID\"][\"value\"]",
Emanuele Laface's avatar
Emanuele Laface committed
						"animate": false
					}
				}
			]
		},
		{
Emanuele Laface's avatar
Emanuele Laface committed
			"title": "Current time",
Emanuele Laface's avatar
Emanuele Laface committed
			"width": 1,
			"row": {
Emanuele Laface's avatar
Emanuele Laface committed
			},
			"col": {
				"1": 1,
Emanuele Laface's avatar
Emanuele Laface committed
				"2": 1,
				"3": 2,
Emanuele Laface's avatar
Emanuele Laface committed
				"5": 1,
Emanuele Laface's avatar
Emanuele Laface committed
			},
			"col_width": 1,
			"widgets": [
				{
Emanuele Laface's avatar
Emanuele Laface committed
					"settings": {
						"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>",
						"height": 2
Emanuele Laface's avatar
Emanuele Laface committed
			"width": 1,
			"row": {
				"5": 7,
				"6": 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": 1,
Emanuele Laface's avatar
Emanuele Laface committed
				"5": 2,
				"6": 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
					}
				}
			]
		},
			"title": "Power in the RFQ (not yet calibrated)",
Emanuele Laface's avatar
Emanuele Laface committed
				"2": 17,
Emanuele Laface's avatar
Emanuele Laface committed
				"2": 1,
						"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": ""
			"width": 1,
			"row": {
				"1": 35,
				"2": 31,
				"3": 27,
				"4": 27,
				"9": 17,
				"10": 17,
				"13": 17
			},
			"col": {
				"1": 1,
				"2": 2,
			},
			"col_width": 1,
			"widgets": [
				{
					"settings": {
						"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
		{
			"title": "Power applied to the RFQ",
Emanuele Laface's avatar
Emanuele Laface committed
			"width": 1,
			"row": {
Emanuele Laface's avatar
Emanuele Laface committed
				"5": 1,
				"6": 1,
Emanuele Laface's avatar
Emanuele Laface committed
			},
			"col": {
				"1": 1,
				"2": 1,
				"3": 1,
				"4": 1,
				"5": 3,
				"6": 3,
Emanuele Laface's avatar
Emanuele Laface committed
			},
			"col_width": 4,
			"widgets": [
				{
					"type": "flot_extended_plugin",
					"settings": {
Emanuele Laface's avatar
Emanuele Laface committed
						"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: 'Power', data: data}];",
Emanuele Laface's avatar
Emanuele Laface committed
						"xticks": "",
						"yticks": "",
						"points": false,
						"tooltip": false,
Emanuele Laface's avatar
Emanuele Laface committed
					}
				}
			]
		}
	],
	"datasources": [
		{
Emanuele Laface's avatar
Emanuele Laface committed
			"type": "JSON",
			"settings": {
				"url": "/data/api/v1/caget/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
		}
	],
	"columns": 4
}