Skip to content
Snippets Groups Projects
dashboard.json 10.9 KiB
Newer Older
Emanuele Laface's avatar
Emanuele Laface committed
{
	"version": 1,
	"header_image": "",
	"allow_edit": false,
	"plugins": [],
	"panes": [
		{
			"title": "",
			"width": 1,
			"row": {
				"1": 1,
				"2": 1,
				"3": 1,
				"4": 1
			},
			"col": {
				"1": 1,
				"2": 1,
				"3": 1,
				"4": 1
			},
			"col_width": 4,
			"widgets": [
				{
					"type": "html",
					"settings": {
Emanuele Laface's avatar
Emanuele Laface committed
						"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 = \"NCL Faraday cups\"; // 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;",
Emanuele Laface's avatar
Emanuele Laface committed
						"height": 2
					}
				}
			]
		},
		{
			"title": "LEBT FC ",
			"width": 1,
			"row": {
Emanuele Laface's avatar
Emanuele Laface committed
				"1": 25,
				"2": 15,
Emanuele Laface's avatar
Emanuele Laface committed
				"3": 7,
				"4": 7,
				"5": 7,
				"7": 7
			},
			"col": {
				"1": 1,
				"2": 2,
Emanuele Laface's avatar
Emanuele Laface committed
				"3": 3,
Emanuele Laface's avatar
Emanuele Laface committed
				"4": 2,
				"5": 4,
				"7": 4
			},
			"col_width": 1,
			"widgets": [
				{
					"type": "text_widget",
					"settings": {
						"title": "Max PROTON CURRENT",
						"size": "regular",
Emanuele Laface's avatar
Emanuele Laface committed
						"value": "datasources[\"maxi\"][\"LEBT-010:PBI-FC-001:STAT3-MeanValueR\"][\"value\"].toFixed(2)",
Emanuele Laface's avatar
Emanuele Laface committed
						"animate": true,
						"units": "mA"
					}
				},
				{
					"type": "text_widget",
					"settings": {
						"title": "Position",
						"size": "regular",
						"value": "let index = datasources[\"Position\"][\"LEBT-010:PBI-FC-001:Position-R\"][\"value\"][\"index\"];\nlet selection = datasources[\"Position\"][\"LEBT-010:PBI-FC-001:Position-R\"][\"value\"][\"choices\"][index]; \nreturn selection; \n",
						"animate": true
					}
				},
Emanuele Laface's avatar
Emanuele Laface committed
				{
					"type": "indicator",
					"settings": {
						"title": "Water Flow ",
						"value": "datasources[\"Water\"][\"LEBT-010:PBI-FC-001:WtrFlowOK\"][\"value\"][\"choices\"]",
						"on_text": "OK",
						"off_text": "NOK"
					}
				},
				{
					"type": "gauge",
					"settings": {
						"title": "Water temperature body ",
						"value": "datasources[\"Water\"][\"LEBT-010:PBI-FC-001:BodyTemp-R\"][\"value\"].toFixed(1)",
						"units": "°C",
						"min_value": 0,
						"max_value": "100"
					}
				},
Emanuele Laface's avatar
Emanuele Laface committed
				{
					"type": "text_widget",
					"settings": {
						"title": "HV repeller",
						"size": "regular",
						"value": "datasources[\"HV\"][\"LEBT-010:PBI-FC-001:Voltage-R\"][\"value\"].toFixed(1)",
						"animate": true,
						"units": "V"
					}
				},
				{
					"type": "indicator",
					"settings": {
						"title": "HVV interlock ",
						"value": "datasources[\"HVV\"][\"LEBT-010:PBI-FC-001:VacuumInterlockOK\"][\"value\"][\"index\"]",
						"on_text": "OK",
						"off_text": "NOK"
					}
				},
				{
					"type": "gauge",
					"settings": {
						"title": "Water temperature repeller",
						"value": "datasources[\"Water\"][\"LEBT-010:PBI-FC-001:RepellerTemp-R\"][\"value\"].toFixed(1)",
						"units": "°C",
						"min_value": 0,
						"max_value": 100
					}
				}
			]
		},
		{
			"title": "IOCs status",
			"width": 1,
			"row": {
Emanuele Laface's avatar
Emanuele Laface committed
				"1": 17,
Emanuele Laface's avatar
Emanuele Laface committed
				"2": 7,
				"3": 7,
				"4": 7,
				"6": 7,
				"7": 7
			},
			"col": {
				"1": 1,
Emanuele Laface's avatar
Emanuele Laface committed
				"2": 2,
				"3": 2,
Emanuele Laface's avatar
Emanuele Laface committed
				"4": 1,
				"6": 3,
				"7": 3
			},
			"col_width": 1,
			"widgets": [
				{
					"type": "indicator",
					"settings": {
						"title": "DAQ ",
Emanuele Laface's avatar
Emanuele Laface committed
						"value": "datasources[\"IOC\"][\"PBI-FC01:SC-IOC-101:HEARTBEAT\"][\"value\"]",
Emanuele Laface's avatar
Emanuele Laface committed
						"on_text": "DAQ on ",
						"off_text": "DAQ off "
					}
				},
				{
					"type": "indicator",
					"settings": {
						"title": "MHV",
Emanuele Laface's avatar
Emanuele Laface committed
						"value": "datasources[\"IOC\"][\"PBI-FC01:SC-IOC-102:HEARTBEAT\"][\"value\"]",
Emanuele Laface's avatar
Emanuele Laface committed
						"on_text": "MHV on",
						"off_text": "MHV off "
					}
				},
				{
					"type": "indicator",
					"settings": {
						"title": "EVR",
Emanuele Laface's avatar
Emanuele Laface committed
						"value": "datasources[\"IOC\"][\"PBI-FC01:SC-IOC-103:HEARTBEAT\"][\"value\"]",
Emanuele Laface's avatar
Emanuele Laface committed
						"on_text": "EVR on ",
						"off_text": "EVR off "
					}
				}
			]
		},
		{
			"title": "MEBT FC ",
			"width": 1,
			"row": {
Emanuele Laface's avatar
Emanuele Laface committed
				"2": 7,
Emanuele Laface's avatar
Emanuele Laface committed
				"3": 7,
				"4": 7,
Emanuele Laface's avatar
Emanuele Laface committed
				"6": 7,
Emanuele Laface's avatar
Emanuele Laface committed
				"7": 7
			},
			"col": {
				"2": 1,
Emanuele Laface's avatar
Emanuele Laface committed
				"3": 1,
Emanuele Laface's avatar
Emanuele Laface committed
				"4": 3,
Emanuele Laface's avatar
Emanuele Laface committed
				"6": 3,
Emanuele Laface's avatar
Emanuele Laface committed
				"7": 3
			},
			"col_width": 1,
			"widgets": [
				{
					"type": "text_widget",
					"settings": {
						"title": "MAX PROTON CURRENT",
						"size": "regular",
Emanuele Laface's avatar
Emanuele Laface committed
						"value": "datasources[\"maxi\"][\"MEBT-010:PBI-FC-001:STAT3-MeanValueR\"][\"value\"].toFixed(2)",
Emanuele Laface's avatar
Emanuele Laface committed
						"animate": true,
						"units": "mA"
					}
				},
				{
					"type": "text_widget",
					"settings": {
						"title": "Position",
						"size": "regular",
Emanuele Laface's avatar
Emanuele Laface committed
						"value": "let index = datasources[\"Position\"][\"MEBT-010:PBI-FC-001:Position-R\"][\"value\"][\"index\"];\nlet selection = datasources[\"Position\"][\"MEBT-010:PBI-FC-001:Position-R\"][\"value\"][\"choices\"][index]; \nreturn selection; \n",
Emanuele Laface's avatar
Emanuele Laface committed
						"animate": true
					}
				},
Emanuele Laface's avatar
Emanuele Laface committed
				{
					"type": "indicator",
					"settings": {
						"title": "Water Flow",
						"value": "datasources[\"Water\"][\"MEBT-010:PBI-FC-001:WtrFlowOK\"][\"value\"][\"index\"]",
						"on_text": "OK",
						"off_text": "NOK"
					}
				},
				{
					"type": "gauge",
					"settings": {
						"title": "Water temperature body",
						"value": "datasources[\"Water\"][\"MEBT-010:PBI-FC-001:BodyTemp-R\"][\"value\"].toFixed(1)",
						"units": "°C",
						"min_value": 0,
						"max_value": 100
					}
				},
Emanuele Laface's avatar
Emanuele Laface committed
				{
					"type": "text_widget",
					"settings": {
						"title": "HV repeller",
						"size": "regular",
						"value": "datasources[\"HV\"][\"MEBT-010:PBI-FC-001:Voltage-R\"][\"value\"].toFixed(1)",
						"animate": true,
						"units": "V"
					}
				},
				{
					"type": "indicator",
					"settings": {
						"title": "HVV interlock ",
						"value": "datasources[\"HVV\"][\"MEBT-010:PBI-FC-001:VacuumInterlockOK\"][\"value\"][\"index\"]",
						"on_text": "OK",
						"off_text": "NOK"
					}
Emanuele Laface's avatar
Emanuele Laface committed
				}
			]
Emanuele Laface's avatar
Emanuele Laface committed
		},
		{
			"title": "DTL2 FC",
			"width": 1,
			"row": {
				"3": 15,
				"4": 7,
				"6": 7,
				"7": 7
			},
			"col": {
				"3": 2,
				"4": 4,
				"6": 4,
				"7": 4
			},
			"col_width": 1,
			"widgets": [
				{
					"type": "text_widget",
					"settings": {
						"title": "MAX PROTON CURRENT ",
						"size": "regular",
Emanuele Laface's avatar
Emanuele Laface committed
						"value": "datasources[\"maxi\"][\"DTL-020:PBI-FC-001:STAT3-MeanValueR\"][\"value\"].toFixed(2)",
Emanuele Laface's avatar
Emanuele Laface committed
						"animate": true,
						"units": "mA"
					}
				},
				{
					"type": "text_widget",
					"settings": {
						"title": "Position",
						"size": "regular",
						"value": "let index = datasources[\"Position\"][\"DTL-020:PBI-FC-001:Position-R\"][\"value\"][\"index\"];\nlet selection = datasources[\"Position\"][\"DTL-020:PBI-FC-001:Position-R\"][\"value\"][\"choices\"][index]; \nreturn selection;",
						"animate": true
					}
				},
				{
					"type": "indicator",
					"settings": {
						"title": "Water flow",
						"value": "datasources[\"Water\"][\"DTL-020:PBI-FC-001:WtrFlowOK\"][\"value\"][\"index\"]",
						"on_text": "OK",
						"off_text": "NOK "
					}
				},
				{
					"type": "gauge",
					"settings": {
						"title": "Water temperature body",
						"value": "datasources[\"Water\"][\"DTL-020:PBI-FC-001:BodyTemp-R\"][\"value\"].toFixed(1)",
						"units": "°C",
						"min_value": 0,
						"max_value": 100
					}
				},
				{
					"type": "text_widget",
					"settings": {
						"title": "HV repeller ",
						"size": "regular",
						"value": "datasources[\"HV\"][\"DTL-020:PBI-FC-001:Voltage-R\"][\"value\"].toFixed(1)",
						"animate": true,
						"units": "V"
					}
				},
				{
					"type": "indicator",
					"settings": {
						"title": "HVV interlock",
						"value": "datasources[\"HVV\"][\"DTL-020:PBI-FC-001:VacuumInterlockOK\"][\"value\"][\"index\"]",
						"on_text": "OK",
						"off_text": "NOK"
					}
				}
			]
Emanuele Laface's avatar
Emanuele Laface committed
		}
	],
	"datasources": [
		{
			"name": "IOC",
			"type": "JSON",
			"settings": {
Emanuele Laface's avatar
Emanuele Laface committed
				"url": "/data/api/v2/pvget/PBI-FC01:SC-IOC-101:HEARTBEAT,PBI-FC01:SC-IOC-102:HEARTBEAT,PBI-FC01:SC-IOC-103:HEARTBEAT, PBI-FC01:Ctrl-IOC-104:HEARTBEAT",
Emanuele Laface's avatar
Emanuele Laface committed
				"use_thingproxy": true,
				"refresh": 1,
				"method": "GET"
			}
		},
		{
			"name": "maxi",
			"type": "JSON",
			"settings": {
Emanuele Laface's avatar
Emanuele Laface committed
				"url": "/data/api/v2/pvget/LEBT-010:PBI-FC-001:STAT3-MeanValueR,MEBT-010:PBI-FC-001:STAT3-MeanValueR,DTL-020:PBI-FC-001:STAT3-MeanValueR",
Emanuele Laface's avatar
Emanuele Laface committed
				"use_thingproxy": true,
				"refresh": 5,
				"method": "GET"
			}
		},
		{
			"name": "HV",
			"type": "JSON",
			"settings": {
Emanuele Laface's avatar
Emanuele Laface committed
				"url": "/data/api/v2/pvget/LEBT-010:PBI-FC-001:Voltage-R,MEBT-010:PBI-FC-001:Voltage-R,DTL-020:PBI-FC-001:Voltage-R",
Emanuele Laface's avatar
Emanuele Laface committed
				"use_thingproxy": true,
				"refresh": 3,
				"method": "GET"
			}
		},
		{
			"name": "HVV",
			"type": "JSON",
			"settings": {
Emanuele Laface's avatar
Emanuele Laface committed
				"url": "/data/api/v2/pvget/LEBT-010:PBI-FC-001:VacuumInterlockOK,MEBT-010:PBI-FC-001:VacuumInterlockOK,DTL-020:PBI-FC-001:VacuumInterlockOK",
Emanuele Laface's avatar
Emanuele Laface committed
				"use_thingproxy": true,
				"refresh": 5,
Emanuele Laface's avatar
Emanuele Laface committed
				"method": "GET"
Emanuele Laface's avatar
Emanuele Laface committed
			}
		},
		{
			"name": "Water",
			"type": "JSON",
			"settings": {
Emanuele Laface's avatar
Emanuele Laface committed
				"url": "/data/api/v2/pvget/LEBT-010:PBI-FC-001:RepellerTemp-R,LEBT-010:PBI-FC-001:WtrFlowOK,MEBT-010:PBI-FC-001:WtrFlowOK,DTL-020:PBI-FC-001:WtrFlowOK,LEBT-010:PBI-FC-001:BodyTemp-R,MEBT-010:PBI-FC-001:BodyTemp-R,DTL-020:PBI-FC-001:BodyTemp-R",
Emanuele Laface's avatar
Emanuele Laface committed
				"use_thingproxy": true,
				"refresh": 5,
Emanuele Laface's avatar
Emanuele Laface committed
				"method": "GET"
Emanuele Laface's avatar
Emanuele Laface committed
			}
		},
		{
			"name": "Position",
			"type": "JSON",
			"settings": {
Emanuele Laface's avatar
Emanuele Laface committed
				"url": "/data/api/v2/pvget/LEBT-010:PBI-FC-001:Position-R,MEBT-010:PBI-FC-001:Position-R,DTL-020:PBI-FC-001:Position-R",
Emanuele Laface's avatar
Emanuele Laface committed
				"use_thingproxy": true,
				"refresh": 5,
Emanuele Laface's avatar
Emanuele Laface committed
				"method": "GET"
Emanuele Laface's avatar
Emanuele Laface committed
			}
		},
		{
			"name": "Clock",
			"type": "clock",
			"settings": {
Emanuele Laface's avatar
Emanuele Laface committed
				"refresh": 1
Emanuele Laface's avatar
Emanuele Laface committed
			}
		}
	],
	"columns": 4
}