BNMR: Custom pages: Difference between revisions

From DaqWiki
Jump to navigation Jump to search
en>Suz
mNo edit summary
en>Suz
mNo edit summary
Line 21: Line 21:
Some of the custom pages written for the {{bnmqr|join=and}} experiments include:
Some of the custom pages written for the {{bnmqr|join=and}} experiments include:


* [[BNMR: Custom Status page| Status page]]  - this page replaces the MIDAS standard status page
* [[BNMR: Custom Status page|Custom Status page]]  - this page replaces the MIDAS standard status page
* [[BNMR: Custom Parameters page|Parameters page]] -  this page enables users to enter the parameters for the selected PPG Mode
* [[BNMR: Custom Parameters page|Parameters page]] -  this page enables users to enter the parameters for the selected PPG Mode
* Tune page -  this page enables users to compare two tunes
* [[BNMR: Custom Compare Tunes page|Compare Tunes page]] -  this page enables users to compare two tunes
* [[BNMR: Custom PPG Mode 20 Setup page|PPG Mode 20 Setup page]] -  this page prevents users from entering invalid values for the Beam and RF parameters
* [[BNMR: Custom PPG Mode 20 Setup page|PPG Mode 20 Setup page]] -  this page prevents users from entering invalid values for the Beam and RF parameters


Line 29: Line 29:


== Location of code ==
== Location of code ==
All custom page code is located in directory {{Filepath|path=~bn[mq]r/online/custom}}. Some style sheets are used by several custom pages.  
All custom page code is located in directory {{Filepath|path=~bn[mq]r/online/custom}} (see [[BNMR#Nomenclature|Nomenclature]]).  


All pages includes the [https://midas.triumf.ca/MidasWiki/index.php/Custom_Page_Features#The_MIDAS_Javascript_Library MIDAS Javascript library] (mhttpd.js). The custom pages use the [https://midas.triumf.ca/MidasWiki/index.php/Mjsonrpc mjson rpc] 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], in addition to local style sheets created for the {{bnmqr|join=and}} experiments.


The following table lists the source filenames for the custom pages :


 
{| border="1" style="border-collapse:collapse; color:black; background-color:aliceblue"  "
{| border="1" style="border-collapse:collapse; color:green; background-color:aliceblue"  "
|+ style="font-weight:bold" |Table 1 : Custom Page Source code files
|+ Code
! Custom Page !! HTML !! Javascript !! Stylesheet
! Custom Page !! HTML !! JS !! CSS
|-
|-
| Status
| Custom Status
| Custom_Status.html
| Custom_Status.html
| cs_functions.js
| cs_functions.js
| common.css, bn[mq]r.css  
| common.css, bn[mq]r.css *
|
|-
|-
| Parameters
| Parameters
| parameters.html
| parameters.html
| parameter_functions.js, params_common.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  


|-
| Compare Tunes
| compare_tunes.html
| params_common.js, tune_descriptions.js,  tunes_descriptions.js
| common.css,  bn[mq]r.css


|-
|-
| Mode 20 setup
| Mode 20 setup
| slider20.html
| slider20.html
|  
| ''Note: This page requires the standard jquery, nouislider, wnumb libraries''.
| common.css
| common.css,  bn[mq]r.css  


|-
| Compare Tunes
| compare_tunes.html
|  params_common.js, tune_descriptions.js
|


|}
|}
{{Category:Webserver}}

Revision as of 16:15, 17 November 2016

Links

Purpose

BNMR Custom pages are written specifically for the bnmr and bnqr experiments to enable to users to 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. The custom pages written for the bnmr and bnqr experiments are written in HTML and Javascript.

Custom pages

Some of the custom pages written for the bnmr and bnqr experiments include:

In order for mhttpd to display custom pages, the custom page files must be listed in the /Custom ODB tree. See keys in /Custom tree for details.

Location of code

All custom page code is located in directory ~bn[mq]r/online/custom (see Nomenclature).

All pages includes the MIDAS Javascript library (mhttpd.js). The custom pages use the mjson rpc asynchronous functions to access the ODB. Most custom pages also include the MIDAS stylesheet, in addition to local style sheets created for the bnmr and bnqr experiments.

The following table lists the source filenames for the custom pages :

Table 1 : Custom Page Source code files
Custom Page HTML Javascript Stylesheet
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 20 setup slider20.html Note: This page requires the standard jquery, nouislider, wnumb libraries. common.css, bn[mq]r.css