diff --git a/WebSites/fbis/dashboard.json b/WebSites/fbis/dashboard.json index 56146301126575e73597c34d6ab7051016eb00b7..ee636f8d21a92efca58daa0747fec734a74d3764 100644 --- a/WebSites/fbis/dashboard.json +++ b/WebSites/fbis/dashboard.json @@ -103,30 +103,139 @@ "type": "text_widget", "settings": { "size": "regular", - "value": "var bi = datasources[\"Interlocks\"][\"FBIS::BI_ok\"][\"value\"][\"index\"];\nvar rbi = datasources[\"Interlocks\"][\"FBIS::RBI_ok\"][\"value\"][\"index\"];\nvar ebi = datasources[\"Interlocks\"][\"FBIS::EBI_ok\"][\"value\"][\"index\"];\n\nif (ebi == 0) {\n return \"Emergency Beam Interlock\";\n} else if (rbi == 0) {\n return \"Regular Beam Interlock\";\n} else if (bi == 0) {\n return \"Beam Inhibit\";\n} else {\n return \"OK\";\n}", + "value": "var bi = datasources[\"Interlocks\"][\"FBIS::BI_ok\"][\"value\"][\"index\"];\nvar rbi = datasources[\"Interlocks\"][\"FBIS::RBI_ok\"][\"value\"][\"index\"];\nvar ebi = datasources[\"Interlocks\"][\"FBIS::EBI_ok\"][\"value\"][\"index\"];\n\nif (ebi == 0) {\n return \"Emergency Beam Interlock\";\n} else if (rbi == 0) {\n return \"Regular Beam Interlock\";\n} else if (bi == 0) {\n return \"Beam Inhibit\";\n} else {\n return \"Global Beam Permit OK\";\n}", "animate": true } } ] }, { - "title": "FBIS Status", + "title": "SYSTEMS", "width": 1, "row": { + "3": 31, "4": 7, - "7": 7 + "7": 31, + "8": 31, + "9": 31 }, "col": { + "3": 1, "4": 1, - "7": 1 + "7": 1, + "8": 1, + "9": 1 }, "col_width": 1, "widgets": [ { - "type": "html", + "type": "ragIndicator", "settings": { - "html": "var bi = datasources[\"Interlocks\"][\"FBIS::BI_ok\"][\"value\"][\"index\"];\nvar rbi = datasources[\"Interlocks\"][\"FBIS::RBI_ok\"][\"value\"][\"index\"];\nvar ebi = datasources[\"Interlocks\"][\"FBIS::EBI_ok\"][\"value\"][\"index\"];\n\nvar a = '<html><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><style>.rectangle{height:50px;width:220px;margin-left:40px;margin-top:10px;background-color:lime;}</style></head><body><div class=\"rectangle\"></div></body></html>';\nif (ebi == 0) {\n a = '<html><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><style>.rectangle{height:50px;width:220px;margin-left:40px;margin-top:10px;background-color:red;}</style></head><body><div class=\"rectangle\"></div></body></html>';\n} else if (rbi == 0) {\n a = '<html><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><style>.rectangle{height:50px;width:220px;margin-left:40px;margin-top:10px;background-color:orange;}</style></head><body><div class=\"rectangle\"></div></body></html>';\n} else if (bi == 0) {\n a = '<html><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><style>.rectangle{height:50px;width:220px;margin-left:40px;margin-top:10px;background-color:yellow;}</style></head><body><div class=\"rectangle\"></div></body></html>';\n} \n\n\n\nreturn a;", - "height": 1 + "title": "Insertable Devices", + "value": "var r = datasources[\"Interlocks\"][\"FBIS::MPSID_RBI_ok\"][\"value\"][\"index\"];\nvar g = datasources[\"Interlocks\"][\"FBIS::MPSID_ok\"][\"value\"][\"index\"];\n\nif (g == 1) {\n return 0;\n} else if (r == 0){\n return 2;\n}else {\n return 1;\n}", + "green_text": "OK", + "amber_text": "Inhibit", + "red_text": "Interlock" + } + }, + { + "type": "ragIndicator", + "settings": { + "title": "Quadrupole Magnets", + "value": "var r = datasources[\"Interlocks\"][\"FBIS::MPSMag_RBI_ok\"][\"value\"][\"index\"];\nvar g = datasources[\"Interlocks\"][\"FBIS::MPSMag_ok\"][\"value\"][\"index\"];\n\nif (g == 1) {\n return 0;\n} else if (r == 0){\n return 2;\n}else {\n return 1;\n}", + "green_text": "OK", + "amber_text": "Inhibit", + "red_text": "Interlock" + } + }, + { + "type": "ragIndicator", + "settings": { + "title": "Vacuum", + "value": "var r = datasources[\"Interlocks\"][\"FBIS::MPSVac_RBI_ok\"][\"value\"][\"index\"];\nvar g = datasources[\"Interlocks\"][\"FBIS::MPSVac_ok\"][\"value\"][\"index\"];\n\nif (g == 1) {\n return 0;\n} else if (r == 0){\n return 2;\n}else {\n return 1;\n}", + "green_text": "OK", + "amber_text": "Inhibit", + "red_text": "Interlock" + } + }, + { + "type": "ragIndicator", + "settings": { + "title": "Software Interlock System", + "value": "var r = datasources[\"Interlocks\"][\"FBIS::SIS_RBI_ok\"][\"value\"][\"index\"];\nvar g = datasources[\"Interlocks\"][\"FBIS::SIS_ok\"][\"value\"][\"index\"];\n\nif (g == 1) {\n return 0;\n} else if (r == 0){\n return 2;\n}else {\n return 1;\n}", + "green_text": "OK", + "amber_text": "Inhibit", + "red_text": "Interlock" + } + }, + { + "type": "ragIndicator", + "settings": { + "title": "Isrc PLC", + "value": "var r = datasources[\"Interlocks\"][\"FBIS::IS_PLC_RBI_ok\"][\"value\"][\"index\"];\nvar g = datasources[\"Interlocks\"][\"FBIS::IS_PLC_ok\"][\"value\"][\"index\"];\n\nif (g == 1) {\n return 0;\n} else if (r == 0){\n return 2;\n}else {\n return 1;\n}", + "green_text": "OK", + "amber_text": "Inhibit", + "red_text": "Interlock" + } + }, + { + "type": "ragIndicator", + "settings": { + "title": "Radio Frequency", + "value": "var r = datasources[\"Interlocks\"][\"FBIS::RF_RBI_ok\"][\"value\"][\"index\"];\nvar g = datasources[\"Interlocks\"][\"FBIS::RFLPSAllSystemStatus\"][\"value\"][\"index\"];\n\nif (g == 1) {\n return 0;\n} else if (r == 0){\n return 2;\n}else {\n return 1;\n}", + "green_text": "OK", + "amber_text": "Inhibit", + "red_text": "Interlock" + } + }, + { + "type": "ragIndicator", + "settings": { + "title": "PSS", + "value": "var r = datasources[\"Interlocks\"][\"FBIS::PSS_RBI_ok\"][\"value\"][\"index\"];\nvar g = datasources[\"Interlocks\"][\"FBIS::PSS_ok\"][\"value\"][\"index\"];\n\nif (g == 1) {\n return 0;\n} else if (r == 0){\n return 2;\n}else {\n return 1;\n}", + "green_text": "OK", + "amber_text": "Inhibit", + "red_text": "Interlock" + } + }, + { + "type": "ragIndicator", + "settings": { + "title": "MEBT Chopper PLC", + "value": "var r = datasources[\"Interlocks\"][\"FBIS::MEBT_Ch_PLC_RBI_ok\"][\"value\"][\"index\"];\nvar g = datasources[\"Interlocks\"][\"FBIS::MEBT_Ch_PLC_ok\"][\"value\"][\"index\"];\n\nif (g == 1) {\n return 0;\n} else if (r == 0){\n return 2;\n}else {\n return 1;\n}", + "green_text": "OK", + "amber_text": "Inhibit", + "red_text": "Interlock" + } + }, + { + "type": "ragIndicator", + "settings": { + "title": "BCMs", + "value": "var r = datasources[\"Interlocks\"][\"FBIS::BCM_RBI_ok\"][\"value\"][\"index\"];\nvar g = datasources[\"Interlocks\"][\"FBIS::BCM_ok\"][\"value\"][\"index\"];\n\nif (g == 1) {\n return 0;\n} else if (r == 0){\n return 2;\n}else {\n return 1;\n}", + "green_text": "OK", + "amber_text": "Inhibit", + "red_text": "Interlock" + } + }, + { + "type": "ragIndicator", + "settings": { + "title": "BPMs", + "value": "var r = datasources[\"Interlocks\"][\"FBIS::BPM_RBI_ok\"][\"value\"][\"index\"];\nvar g = datasources[\"Interlocks\"][\"FBIS::BPM_ok\"][\"value\"][\"index\"];\n\nif (g == 1) {\n return 0;\n} else if (r == 0){\n return 2;\n}else {\n return 1;\n}", + "green_text": "OK", + "amber_text": "Inhibit", + "red_text": "Interlock" + } + }, + { + "type": "ragIndicator", + "settings": { + "title": "LEBT Chopper Fault", + "value": "var r = datasources[\"Interlocks\"][\"FBIS::LEBT_Ch_Fault_RBI_ok\"][\"value\"][\"index\"];\nvar g = datasources[\"Interlocks\"][\"FBIS::LEBT_Ch_Fault_ok\"][\"value\"][\"index\"];\n\nif (g == 1) {\n return 0;\n} else if (r == 0){\n return 2;\n}else {\n return 1;\n}", + "green_text": "OK", + "amber_text": "Inhibit", + "red_text": "Interlock" } } ] @@ -306,109 +415,29 @@ ] }, { - "title": "SYSTEMS", "width": 1, "row": { - "3": 31, - "4": 11, - "7": 31, - "8": 31, + "4": 31, "9": 31 }, "col": { - "3": 1, "4": 1, - "7": 1, - "8": 1, - "9": 1 + "9": 2 }, - "col_width": 1, + "col_width": 4, "widgets": [ { - "type": "ragIndicator", - "settings": { - "title": "Insertable Devices", - "value": "var r = datasources[\"Interlocks\"][\"FBIS::MPSID_RBI_ok\"][\"value\"][\"index\"];\nvar g = datasources[\"Interlocks\"][\"FBIS::MPSID_dlv_ok\"][\"value\"][\"index\"];\n\nif (g == 1) {\n return 0;\n} else if (r == 0){\n return 2;\n}else {\n return 1;\n}", - "green_text": "OK", - "amber_text": "Inhibit", - "red_text": "Interlock" - } - }, - { - "type": "ragIndicator", - "settings": { - "title": "Quadrupole Magnets", - "value": "var r = datasources[\"Interlocks\"][\"FBIS::MPSMAG_RBI_ok\"][\"value\"][\"index\"];\nvar g = datasources[\"Interlocks\"][\"FBIS::MPSMAG_dlv_ok\"][\"value\"][\"index\"];\n\nif (g == 1) {\n return 0;\n} else if (r == 0){\n return 2;\n}else {\n return 1;\n}", - "green_text": "OK", - "amber_text": "Inhibit", - "red_text": "Interlock" - } - }, - { - "type": "ragIndicator", - "settings": { - "title": "Vacuum", - "value": "var r = datasources[\"Interlocks\"][\"FBIS::MPSVAC_RBI_ok\"][\"value\"][\"index\"];\nvar g = datasources[\"Interlocks\"][\"FBIS::MPSVAC_dlv_ok\"][\"value\"][\"index\"];\n\nif (g == 1) {\n return 0;\n} else if (r == 0){\n return 2;\n}else {\n return 1;\n}", - "green_text": "OK", - "amber_text": "Inhibit", - "red_text": "Interlock" - } - }, - { - "type": "text_widget", - "settings": { - "size": "regular", - "animate": false - } - }, - { - "type": "ragIndicator", - "settings": { - "title": "Isrc PLC", - "value": "var r = datasources[\"Interlocks\"][\"FBIS::IS_PLC_RBI_ok\"][\"value\"][\"index\"];\nvar g = datasources[\"Interlocks\"][\"FBIS::IS_PLC_dlv_ok\"][\"value\"][\"index\"];\n\nif (g == 1) {\n return 0;\n} else if (r == 0){\n return 2;\n}else {\n return 1;\n}", - "green_text": "OK", - "amber_text": "Inhibit", - "red_text": "Interlock" - } - }, - { - "type": "ragIndicator", - "settings": { - "title": "Radio Frequency", - "value": "var r = datasources[\"Interlocks\"][\"FBIS::RF_RBI_ok\"][\"value\"][\"index\"];\nvar g = datasources[\"Interlocks\"][\"FBIS::RFLPSAllSystemStatus\"][\"value\"][\"index\"];\n\nif (g == 1) {\n return 0;\n} else if (r == 0){\n return 2;\n}else {\n return 1;\n}", - "green_text": "OK", - "amber_text": "Inhibit", - "red_text": "Interlock" - } - }, - { - "type": "ragIndicator", - "settings": { - "title": "PSS", - "value": "var r = datasources[\"Interlocks\"][\"FBIS::PSS_RBI_ok\"][\"value\"][\"index\"];\nvar g = datasources[\"Interlocks\"][\"FBIS::PSS_dlv_ok\"][\"value\"][\"index\"];\n\nif (g == 1) {\n return 0;\n} else if (r == 0){\n return 2;\n}else {\n return 1;\n}", - "green_text": "OK", - "amber_text": "Inhibit", - "red_text": "Interlock" - } - }, - { - "type": "ragIndicator", - "settings": { - "title": "MEBT Chopper PLC", - "value": "var r = datasources[\"Interlocks\"][\"FBIS::MEBT_Chop_PLC_RBI_ok\"][\"value\"][\"index\"];\nvar g = datasources[\"Interlocks\"][\"FBIS::MEBT_Chop_PLC_dlv_ok\"][\"value\"][\"index\"];\n\nif (g == 1) {\n return 0;\n} else if (r == 0){\n return 2;\n}else {\n return 1;\n}", - "green_text": "OK", - "amber_text": "Inhibit", - "red_text": "Interlock" - } - }, - { - "type": "ragIndicator", + "type": "flot_extended_plugin", "settings": { - "title": "BCM", - "value": "var r = datasources[\"Interlocks\"][\"FBIS::BCM_1A_RBI_ok\"][\"value\"][\"index\"];\nvar g = datasources[\"Interlocks\"][\"FBIS::BCM_1A_dlv_ok\"][\"value\"][\"index\"];\n\nif (g == 1) {\n return 0;\n} else if (r == 0){\n return 2;\n}else {\n return 1;\n}", - "green_text": "OK", - "amber_text": "Inhibit", - "red_text": "Interlock" + "plot_type": "horiz_stacked_bar", + "legend": true, + "height": 5, + "value": "var dln01_pbd = datasources[\"Interlocks\"][\"FBIS-DLN01:Ctrl-AMC-03:cfg_no_of_pbdspu_A\"][\"value\"]; \nvar dln01_pbm = datasources[\"Interlocks\"][\"FBIS-DLN01:Ctrl-AMC-03:cfg_no_of_pbmspu_A\"][\"value\"]; \nvar dln01_spu = datasources[\"Interlocks\"][\"FBIS-DLN01:Ctrl-AMC-03:cfg_no_of_spu_A\"][\"value\"]; \nvar dln01_ssp = datasources[\"Interlocks\"][\"FBIS-DLN01:Ctrl-AMC-03:cfg_no_of_sspu_A\"][\"value\"]; \nvar dln01_pus = dln01_pbd + dln01_pbm + dln01_spu + dln01_ssp;\n\n\nvar dln01_bi = datasources[\"Interlocks\"][\"FBIS-DLN01:Ctrl-AMC-03:no_pu_bi_A\"][\"value\"]; \nvar dln01_rbi = datasources[\"Interlocks\"][\"FBIS-DLN01:Ctrl-AMC-03:no_pu_rbi_A\"][\"value\"]; \nvar dln01_ebi = datasources[\"Interlocks\"][\"FBIS-DLN01:Ctrl-AMC-03:no_pu_ebi_A\"][\"value\"];\n\nvar dln01_bi_p = (dln01_bi/dln01_pus)*100;\nvar dln01_rbi_p = (dln01_rbi/dln01_pus)*100;\nvar dln01_ebi_p = (dln01_ebi/dln01_pus)*100;\nvar dln01_ok_p = 100 - dln01_bi_p - dln01_rbi_p - dln01_ebi;\n\n\nvar dln02_pbd = datasources[\"Interlocks\"][\"FBIS-DLN02:Ctrl-AMC-03:cfg_no_of_pbdspu_A\"][\"value\"]; \nvar dln02_pbm = datasources[\"Interlocks\"][\"FBIS-DLN02:Ctrl-AMC-03:cfg_no_of_pbmspu_A\"][\"value\"]; \nvar dln02_spu = datasources[\"Interlocks\"][\"FBIS-DLN02:Ctrl-AMC-03:cfg_no_of_spu_A\"][\"value\"]; \nvar dln02_ssp = datasources[\"Interlocks\"][\"FBIS-DLN02:Ctrl-AMC-03:cfg_no_of_sspu_A\"][\"value\"]; \nvar dln02_pus = dln02_pbd + dln02_pbm + dln02_spu + dln02_ssp;\n\n\nvar dln02_bi = datasources[\"Interlocks\"][\"FBIS-DLN02:Ctrl-AMC-03:no_pu_bi_A\"][\"value\"]; \nvar dln02_rbi = datasources[\"Interlocks\"][\"FBIS-DLN02:Ctrl-AMC-03:no_pu_rbi_A\"][\"value\"]; \nvar dln02_ebi = datasources[\"Interlocks\"][\"FBIS-DLN02:Ctrl-AMC-03:no_pu_ebi_A\"][\"value\"];\n\nvar dln02_bi_p = (dln02_bi/dln02_pus)*100;\nvar dln02_rbi_p = (dln02_rbi/dln02_pus)*100;\nvar dln02_ebi_p = (dln02_ebi/dln02_pus)*100;\nvar dln02_ok_p = 100 - dln02_bi_p - dln02_rbi_p - dln02_ebi;\n\n\nvar d = [{\n label: 'OK',\n color: 'green',\n data: [[dln02_ok_p, 0], [dln01_ok_p, 1]]\n}, {\n label: 'BI',\n color: 'yellow',\n data: [[dln02_bi_p, 0], [dln01_bi_p, 1]]\n}, {\n label: 'RBI',\n color: 'orange',\n data: [[dln02_rbi_p, 0], [dln01_rbi_p, 1]]\n}, {\n label: 'EBI',\n color: 'red',\n data: [[dln02_ebi_p, 0], [dln01_ebi_p, 1]]\n}];\n\nreturn d;", + "xticks": "[[0, '0%'], [10, '10%'], [20, '20%'], [30, '30%'], [40, '40%'], [50, '50%'], [60, '60%'], [70, '70%'], [80, '80%'], [90, '90%'], [100, '100%'], [110, '']]", + "yticks": "[[0, 'DLN 02 (34 signals)'], [1, 'DLN 01 (99 signals)']]", + "points": false, + "tooltip": false, + "zoom": "" } } ] @@ -419,7 +448,7 @@ "name": "Interlocks", "type": "JSON", "settings": { - "url": "/data/api/v2/pvget/FBIS::beam_state_ok,FBIS-DLN01::status,FBIS-DLN02::status,FBIS-SCU01::status,FBIS-SCU02::status,FBIS-SCU03::status,FBIS-SCU04::status,FBIS::beam_permit_ok,FBIS::beam_destination,FBIS::beam_mode,FBIS::BI_ok,FBIS::RBI_ok,FBIS::EBI_ok,FBIS::PSS_dlv_ok,FBIS::MPSMAG_dlv_ok,FBIS::MPSID_dlv_ok,FBIS::MPSVAC_dlv_ok,FBIS::IS_PLC_dlv_ok,FBIS::RFLPSAllSystemStatus,FBIS::MEBT_Chop_PLC_dlv_ok,FBIS::BCM_1A_dlv_ok,FBIS::IS_PLC_RBI_ok,FBIS::PSS_RBI_ok,FBIS::IS_PLC_RBI_ok,FBIS::RF_RBI_ok,FBIS::MPSVAC_RBI_ok,FBIS::MPSID_RBI_ok,FBIS::MPSMAG_RBI_ok,FBIS::MEBT_Chop_PLC_RBI_ok,FBIS::BCM_1A_RBI_ok", + "url": "/data/api/v2/pvget/FBIS::beam_state_ok,FBIS-DLN01::status,FBIS-DLN02::status,FBIS-SCU01::status,FBIS-SCU02::status,FBIS-SCU03::status,FBIS-SCU04::status,FBIS::beam_permit_ok,FBIS::beam_destination,FBIS::beam_mode,FBIS::BI_ok,FBIS::RBI_ok,FBIS::EBI_ok,FBIS::PSS_ok,FBIS::MPSMag_ok,FBIS::MPSID_ok,FBIS::MPSVac_ok,FBIS::IS_PLC_ok,FBIS::RFLPSAllSystemStatus,FBIS::MEBT_Ch_PLC_ok,FBIS::LEBT_Ch_Fault_ok,FBIS::BCM_ok,FBIS::BPM_ok,FBIS::SIS_ok,FBIS::IS_PLC_RBI_ok,FBIS::PSS_RBI_ok,FBIS::IS_PLC_RBI_ok,FBIS::RF_RBI_ok,FBIS::MPSVac_RBI_ok,FBIS::MPSID_RBI_ok,FBIS::MPSMag_RBI_ok,FBIS::MEBT_Ch_PLC_RBI_ok,FBIS::LEBT_Ch_Fault_RBI_ok,FBIS::BCM_RBI_ok,FBIS::BPM_RBI_ok,FBIS::SIS_RBI_ok,FBIS-DLN01:Ctrl-AMC-03:cfg_no_of_pbdspu_A,FBIS-DLN01:Ctrl-AMC-03:cfg_no_of_pbmspu_A,FBIS-DLN01:Ctrl-AMC-03:cfg_no_of_spu_A,FBIS-DLN01:Ctrl-AMC-03:cfg_no_of_sspu_A,FBIS-DLN01:Ctrl-AMC-03:no_pu_bi_A,FBIS-DLN01:Ctrl-AMC-03:no_pu_ebi_A,FBIS-DLN01:Ctrl-AMC-03:no_pu_rbi_A,FBIS-DLN02:Ctrl-AMC-03:cfg_no_of_pbdspu_A,FBIS-DLN02:Ctrl-AMC-03:cfg_no_of_pbmspu_A,FBIS-DLN02:Ctrl-AMC-03:cfg_no_of_spu_A,FBIS-DLN02:Ctrl-AMC-03:cfg_no_of_sspu_A,FBIS-DLN02:Ctrl-AMC-03:no_pu_bi_A,FBIS-DLN02:Ctrl-AMC-03:no_pu_ebi_A,FBIS-DLN02:Ctrl-AMC-03:no_pu_rbi_A", "use_thingproxy": false, "refresh": 5, "method": "GET" @@ -530,4 +559,4 @@ } ], "columns": 4 -} +} \ No newline at end of file