BNMR: Custom pages: Difference between revisions
en>Suz mNo edit summary |
en>Suz mNo edit summary |
||
Line 12: | Line 12: | ||
== Purpose == | == Purpose == | ||
BNMR Custom pages are written specifically for the {{bnmqr|join=and}} experiments to enable to users to control the experiments more easily. | BNMR Custom pages are written specifically for the {{bnmqr|join=and}} experiments to enable to users to enter parameters and control the experiments more easily. | ||
== Introduction == | == Introduction == | ||
[https://midas.triumf.ca/MidasWiki/index.php/Midas_documentation MIDAS] experiments run the web server [[https://midas.triumf.ca/MidasWiki/index.php/Mhttpd mhttpd]] which allows users to control and communicate with their experiments using a standard web browser (e.g. Firefox). | [https://midas.triumf.ca/MidasWiki/index.php/Midas_documentation MIDAS] experiments run the web server [[https://midas.triumf.ca/MidasWiki/index.php/Mhttpd mhttpd]] which allows users to control and communicate with their experiments using a standard web browser (e.g. Firefox). | ||
Complicated experiments such as {{bnmqr|join=and}} involve a large number of ODB parameters in various directories that have to be setup in order to control the experiment. Navigating these parameters using the standard MIDAS ODB page can become complicated and time-consuming. For this reason, [https://midas.triumf.ca/MidasWiki/index.php/Custom_Page custom pages] specific to an experiment are often written to present relevant parameters for the experiment in a more user-friendly way, and to display information specific to that experiment | Complicated experiments such as {{bnmqr|join=and}} involve a large number of ODB parameters in various directories that have to be setup in order to control the experiment. Navigating these parameters using the standard MIDAS ODB page can become complicated and time-consuming. For this reason, [https://midas.triumf.ca/MidasWiki/index.php/Custom_Page custom pages] specific to an experiment are often written to present relevant parameters for the experiment in a more user-friendly way, and to display information specific to that experiment. | ||
== Custom pages == | == Custom pages == | ||
All [https://midas.triumf.ca/MidasWiki/index.php/Custom_Page MIDAS Custom Pages] written for the {{bnmqr|join=and}} experiments are | |||
written in HTML and Javascript. They include the [https://midas.triumf.ca/MidasWiki/index.php/Custom_Page_Features#The_MIDAS_Javascript_Library MIDAS Javascript library] (mhttpd.js) and use the MIDAS [https://midas.triumf.ca/MidasWiki/index.php/Custom_Page_Features#Access_the_ODB_using_mjson-rpc_asynchronous_functions asynchronous functions] to access the ODB. Most custom pages also include the | |||
[https://midas.triumf.ca/MidasWiki/index.php/Custom_Page_Features#MIDAS_stylesheet MIDAS stylesheet]. | |||
The custom pages written for the {{bnmqr|join=and}} experiments include: | |||
* [[BNMR: Custom Status page|Custom Status page]] - replaces the MIDAS standard status page | |||
* [[BNMR: Custom Parameters page|Parameters page]] - displays the parameters for the selected PPG Mode, Tunes, PSM Module setup. | |||
* [[BNMR: Custom Compare Tunes page|Compare Tunes page]] - enables users to compare two tunes | |||
* [[BNMR: Custom PPG Mode 2e Graphical page|PPG Mode 2e Graphical page]] - displays parameters for PPG Mode 2e graphically | |||
* [[BNMR: Custom PPG Mode 20 Setup page|PPG Mode 20 Setup page]] - prevents users from entering invalid values for the Beam and RF parameters in PPG Mode 20 | |||
== | |||
== Define in /Custom ODB tree == | |||
In order for {{Utility|name=mhttpd}} to display custom pages, custom page files must be defined in the experiment's {{Odbpath|path=/Custom}} ODB tree. This includes | |||
external stylesheets, html and javascript code. Any images with [https://midas.triumf.ca/MidasWiki/index.php/Custom_Page_Features#Superimposing_Labels.2C_Bars_and_Fills_onto_a_gif_image superimposed labels] must be listed in {{Odbpath|path=/Custom/Images}} subtree. The difference in appearance of the custom pages for {{bnmqr|join=and}} is handled by the stylesheets {{File|name=bnmr.css}} and {{File|name=bnqr.css}} respectively. All other files are identical for both experiments. | |||
See [[BNMR: Keys in /Custom ODB tree|keys in /Custom tree]] for more information. | |||
== Custom Page code == | |||
All custom page code is located in directory {{Filepath|path=~bn[mq]r/online/custom}} (see [[BNMR#Nomenclature|Nomenclature]]). | All custom page code is located in directory {{Filepath|path=~bn[mq]r/online/custom}} (see [[BNMR#Nomenclature|Nomenclature]]). | ||
The following table lists the source filenames for the custom pages : | The following table lists the source filenames for the custom pages : | ||
Line 39: | Line 47: | ||
{| border="1" style="border-collapse:collapse; color:black; background-color:aliceblue" " | {| border="1" style="border-collapse:collapse; color:black; background-color:aliceblue" " | ||
|+ style="font-weight:bold" |Table 1 : Custom Page Source code files | |+ style="font-weight:bold" |Table 1 : Custom Page Source code files | ||
! Custom Page !! HTML !! Javascript !! Stylesheet | ! Custom Page !! HTML !! Javascript !! Stylesheet !! Image | ||
|- | |- | ||
| Custom Status | | Custom Status | ||
Line 51: | Line 59: | ||
| parameter_functions.js, params_common.js, <br>parameters_tunes.js, tunes_descriptions.js | | parameter_functions.js, params_common.js, <br>parameters_tunes.js, tunes_descriptions.js | ||
| mhttpd.css, common.css, bn[mq]r.css | | mhttpd.css, common.css, bn[mq]r.css | ||
| | |||
|- | |- | ||
Line 57: | Line 66: | ||
| params_common.js, tune_descriptions.js, tunes_descriptions.js | | params_common.js, tune_descriptions.js, tunes_descriptions.js | ||
| common.css, bn[mq]r.css | | common.css, bn[mq]r.css | ||
| | |||
|- | |||
| Mode 2e graphical | |||
| enter_2e_params.html | |||
| | |||
| common.css, bn[mq]r.css | |||
| 2e_params.gif | |||
|- | |- | ||
| Mode 20 setup | | Mode 20 setup | ||
| slider20.html | | slider20.html '''**''' | ||
| | |||
| common.css, bn[mq]r.css | | common.css, bn[mq]r.css | ||
| | |||
|} | |||
: '''**''' This page requires the standard jquery, nouislider, wnumb libraries''. | |||
[[Category:Webserver]] | [[Category:Webserver]] |
Revision as of 13:10, 18 November 2016
Links
Purpose
BNMR Custom pages are written specifically for the bnmr and bnqr experiments to enable to users to enter parameters and control the experiments more easily.
Introduction
MIDAS experiments run the web server [mhttpd] which allows users to control and communicate with their experiments using a standard web browser (e.g. Firefox).
Complicated experiments such as bnmr and bnqr involve a large number of ODB parameters in various directories that have to be setup in order to control the experiment. Navigating these parameters using the standard MIDAS ODB page can become complicated and time-consuming. For this reason, custom pages specific to an experiment are often written to present relevant parameters for the experiment in a more user-friendly way, and to display information specific to that experiment.
Custom pages
All MIDAS Custom Pages written for the bnmr and bnqr experiments are written in HTML and Javascript. They include the MIDAS Javascript library (mhttpd.js) and use the MIDAS asynchronous functions to access the ODB. Most custom pages also include the MIDAS stylesheet.
The custom pages written for the bnmr and bnqr experiments include:
- Custom Status page - replaces the MIDAS standard status page
- Parameters page - displays the parameters for the selected PPG Mode, Tunes, PSM Module setup.
- Compare Tunes page - enables users to compare two tunes
- PPG Mode 2e Graphical page - displays parameters for PPG Mode 2e graphically
- PPG Mode 20 Setup page - prevents users from entering invalid values for the Beam and RF parameters in PPG Mode 20
Define in /Custom ODB tree
In order for mhttpd to display custom pages, custom page files must be defined in the experiment's /Custom ODB tree. This includes external stylesheets, html and javascript code. Any images with superimposed labels must be listed in /Custom/Images subtree. The difference in appearance of the custom pages for bnmr and bnqr is handled by the stylesheets bnmr.css and bnqr.css respectively. All other files are identical for both experiments.
See keys in /Custom tree for more information.
Custom Page code
All custom page code is located in directory ~bn[mq]r/online/custom (see Nomenclature).
The following table lists the source filenames for the custom pages :
Custom Page | HTML | Javascript | Stylesheet | Image |
---|---|---|---|---|
Custom Status | Custom_Status.html | cs_functions.js | common.css, bn[mq]r.css * | |
Parameters | parameters.html | parameter_functions.js, params_common.js, parameters_tunes.js, tunes_descriptions.js |
mhttpd.css, common.css, bn[mq]r.css | |
Compare Tunes | compare_tunes.html | params_common.js, tune_descriptions.js, tunes_descriptions.js | common.css, bn[mq]r.css | |
Mode 2e graphical | enter_2e_params.html | common.css, bn[mq]r.css | 2e_params.gif
| |
Mode 20 setup | slider20.html ** | common.css, bn[mq]r.css |
- ** This page requires the standard jquery, nouislider, wnumb libraries.