diff --git a/README.md b/README.md index cc179983d4a5657be4bc56640606861408200499..9e4268594d995f859fd17d652df1a9e37f23fd86 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Then on the website you have the editor mode where you can create your interface Once you think that you have a good page try to resize your browser window to different sizes and rearrange the cells according to the order that you want to have on different screens (mobile, desktop, etc.). Finally save the dashboard json file and replace the one that you have in the folder of your local server. Edit the dashboard file and change the allow_edit from true to false. -Finally, if you want to have the page into the main menu, you have to edit all the index.html files of all the screens and add your menu in the <ul id="menu"> section. +Finally, if you want to have the page into the main menu, you have to edit the file under WebSites/menu/available-screens.html adding the correct link to the new page. When these steps are complete run again the docker-compose up and verify that everything works according to what you expected. If you think that the diff --git a/WebSites/dev/index.html b/WebSites/dev/index.html index bf9fc47719df95974a5b042127d99d2bd85cabf6..b64a5da74bdbe2f0464cd0178bf6155a3f33f7a4 100644 --- a/WebSites/dev/index.html +++ b/WebSites/dev/index.html @@ -55,6 +55,7 @@ { //DOM Ready freeboard.setAssetRoot("/freeboard-ui/"); freeboard.initialize(true); + $('#menu').load("/menu/available-screens.html"); $('#menu').slicknav({ duplicate: false, label: 'Available Screens', @@ -73,13 +74,7 @@ <link rel="icon" sizes="192x192" href="/img/icons/pos_v01_dark@192.png"> </head> <body> -<ul id="menu"> - <li><a href="/">Public Operations Screen</a></li> - <li><a href="/interlocks/">High Voltage Interlocks</a></li> - <li><a href="/instruments/">Beam Instruments</a></li> - <li><a href="/ts2/">Test Stand 2</a></li> - <li><a href="/pvs/">PV Search Engine</a></li> -</ul> +<ul id="menu"></ul> <div id="board-content"> <img id="dash-logo" data-bind="attr:{src: header_image}, visible:header_image()"> <div class="gridster responsive-column-width"> diff --git a/WebSites/instruments/index.html b/WebSites/instruments/index.html index a1a01373d9ccbd47bb2cb391fa451b868b5564e6..fe25d5034af7712ab12679605d55cd8f3b04203c 100644 --- a/WebSites/instruments/index.html +++ b/WebSites/instruments/index.html @@ -47,6 +47,7 @@ { //DOM Ready freeboard.setAssetRoot("/freeboard-ui/"); freeboard.initialize(true); + $('#menu').load("/menu/available-screens.html"); $('#menu').slicknav({ duplicate: false, label: 'Available Screens', @@ -65,13 +66,7 @@ <link rel="icon" sizes="192x192" href="/img/icons/pos_v01_dark@192.png"> </head> <body> -<ul id="menu"> - <li><a href="/">Public Operations Screen</a></li> - <li><a href="/interlocks/">High Voltage Interlocks</a></li> - <li><a href="/instruments/">Beam Instruments</a></li> - <li><a href="/ts2/">Test Stand 2</a></li> - <li><a href="/pvs/">PV Search Engine</a></li> -</ul> +<ul id="menu"> </ul> <div id="board-content"> <img id="dash-logo" data-bind="attr:{src: header_image}, visible:header_image()"> <div class="gridster responsive-column-width"> diff --git a/WebSites/interlocks/index.html b/WebSites/interlocks/index.html index c5409f413bedd32e0ff4eee317ff13ae3994e33e..9fa973bb626edcb5086c9cd4032c78170f345df4 100644 --- a/WebSites/interlocks/index.html +++ b/WebSites/interlocks/index.html @@ -47,6 +47,7 @@ { //DOM Ready freeboard.setAssetRoot("/freeboard-ui/"); freeboard.initialize(true); + $('#menu').load("/menu/available-screens.html"); $('#menu').slicknav({ duplicate: false, label: 'Available Screens', @@ -65,13 +66,7 @@ <link rel="icon" sizes="192x192" href="/img/icons/pos_v01_dark@192.png"> </head> <body> -<ul id="menu"> - <li><a href="/">Public Operations Screen</a></li> - <li><a href="/interlocks/">High Voltage Interlocks</a></li> - <li><a href="/instruments/">Beam Instruments</a></li> - <li><a href="/ts2/">Test Stand 2</a></li> - <li><a href="/pvs/">PV Search Engine</a></li> -</ul> +<ul id="menu"></ul> <div id="board-content"> <img id="dash-logo" data-bind="attr:{src: header_image}, visible:header_image()"> <div class="gridster responsive-column-width"> diff --git a/WebSites/menu/available-screens.html b/WebSites/menu/available-screens.html new file mode 100644 index 0000000000000000000000000000000000000000..59dc84a5ed66afa5c8738997003b25919d91a326 --- /dev/null +++ b/WebSites/menu/available-screens.html @@ -0,0 +1,5 @@ +<li><a href="/">Public Operations Screen</a></li> +<li><a href="/interlocks/">High Voltage Interlocks</a></li> +<li><a href="/instruments/">Beam Instruments</a></li> +<li><a href="/ts2/">Test Stand 2</a></li> +<li><a href="/pvs/">PV Search Engine</a></li> diff --git a/WebSites/pos/index.html b/WebSites/pos/index.html index bf9fc47719df95974a5b042127d99d2bd85cabf6..155fc3a19b29377c51f6107e3a86138c17e72671 100644 --- a/WebSites/pos/index.html +++ b/WebSites/pos/index.html @@ -55,11 +55,8 @@ { //DOM Ready freeboard.setAssetRoot("/freeboard-ui/"); freeboard.initialize(true); - $('#menu').slicknav({ - duplicate: false, - label: 'Available Screens', - removeIds: false, - }); + $('#menu').load("/menu/available-screens.html"); + $('#menu').slicknav({ duplicate: false, label: 'Available Screens', removeIds: false, }); }); }); </script> @@ -73,13 +70,7 @@ <link rel="icon" sizes="192x192" href="/img/icons/pos_v01_dark@192.png"> </head> <body> -<ul id="menu"> - <li><a href="/">Public Operations Screen</a></li> - <li><a href="/interlocks/">High Voltage Interlocks</a></li> - <li><a href="/instruments/">Beam Instruments</a></li> - <li><a href="/ts2/">Test Stand 2</a></li> - <li><a href="/pvs/">PV Search Engine</a></li> -</ul> +<ul id="menu"></ul> <div id="board-content"> <img id="dash-logo" data-bind="attr:{src: header_image}, visible:header_image()"> <div class="gridster responsive-column-width"> diff --git a/WebSites/pvs/index.html b/WebSites/pvs/index.html index 19ed59f13b886ada28871298fe92f5a8932b8356..f98dc9e8116378451bb262402a3a0fe6c0f9b2b8 100644 --- a/WebSites/pvs/index.html +++ b/WebSites/pvs/index.html @@ -47,6 +47,7 @@ { //DOM Ready freeboard.setAssetRoot("/freeboard-ui/"); freeboard.initialize(true); + $('#menu').load("/menu/available-screens.html"); $('#menu').slicknav({ duplicate: false, label: 'Available Screens', @@ -65,13 +66,7 @@ <link rel="icon" sizes="192x192" href="/img/icons/pos_v01_dark@192.png"> </head> <body> -<ul id="menu"> - <li><a href="/">Public Operations Screen</a></li> - <li><a href="/interlocks/">High Voltage Interlocks</a></li> - <li><a href="/instruments/">Beam Instruments</a></li> - <li><a href="/ts2/">Test Stand 2</a></li> - <li><a href="/pvs/">PV Search Engine</a></li> -</ul> +<ul id="menu"></ul> <div id="board-content"> <img id="dash-logo" data-bind="attr:{src: header_image}, visible:header_image()"> <div class="gridster responsive-column-width"> diff --git a/WebSites/ts2/index.html b/WebSites/ts2/index.html index bf9fc47719df95974a5b042127d99d2bd85cabf6..b64a5da74bdbe2f0464cd0178bf6155a3f33f7a4 100644 --- a/WebSites/ts2/index.html +++ b/WebSites/ts2/index.html @@ -55,6 +55,7 @@ { //DOM Ready freeboard.setAssetRoot("/freeboard-ui/"); freeboard.initialize(true); + $('#menu').load("/menu/available-screens.html"); $('#menu').slicknav({ duplicate: false, label: 'Available Screens', @@ -73,13 +74,7 @@ <link rel="icon" sizes="192x192" href="/img/icons/pos_v01_dark@192.png"> </head> <body> -<ul id="menu"> - <li><a href="/">Public Operations Screen</a></li> - <li><a href="/interlocks/">High Voltage Interlocks</a></li> - <li><a href="/instruments/">Beam Instruments</a></li> - <li><a href="/ts2/">Test Stand 2</a></li> - <li><a href="/pvs/">PV Search Engine</a></li> -</ul> +<ul id="menu"></ul> <div id="board-content"> <img id="dash-logo" data-bind="attr:{src: header_image}, visible:header_image()"> <div class="gridster responsive-column-width"> diff --git a/default.conf b/default.conf index d5f26175deb6fe86835e47df2c13e6769064adbe..e697b6936265186c7e7ee6c1e69314dbce72e684 100644 --- a/default.conf +++ b/default.conf @@ -5,7 +5,7 @@ server { root /usr/share/nginx/web/pos; } - location ~ ^/(pvs|interlocks|instruments|ts2|dev) { + location ~ ^/(menu|pvs|interlocks|instruments|ts2|dev) { root /usr/share/nginx/web; }