BNMR: Custom pages: Difference between revisions

From DaqWiki
Jump to navigation Jump to search
en>Suz
mNo edit summary
mNo edit summary
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Pagelinks}}
{{Pagelinks}}
== Links ==
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* [[BNMR]]
* [[BNMR: Experimental Setup#Environment Variables|Environment variables]]
* [[BNMR: Experimental Modes|Experimental Modes]]
* [[BNMR: Getting Started|Getting Started]]
* [[BNMR#Nomenclature|Nomenclature]]
</div>


== 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 webpages are written specifically for the  {{bnmqr|join=and}} experiments to enable to users to enter parameters and control the experiments more easily. They are built using the [https://midas.triumf.ca/MidasWiki/index.php/Custom_Page Midas custom page] system.


== 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. The custom pages written for the {{bnmqr|join=and}} experiments are written in HTML and Javascript.
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 ==
Some of the custom pages written for the {{bnmqr|join=and}} experiments include:
 
* [[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 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
 
In order for  {{Utility|name=mhttpd}} to display custom pages, the custom page files must be listed in the {{Odbpath|path=/Custom}} ODB tree. See [[BNMR: Keys in /Custom ODB tree|keys in /Custom tree]] for details.
 
== Location of code ==
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" "
== Custom pages for bnmr/bnqr ==
|+ style="font-weight:bold" |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, <br>parameters_tunes.js, tunes_descriptions.js
| mhttpd.css, common.css,  bn[mq]r.css


|-
The custom pages written for the {{bnmqr|join=and}} experiments include:
| Compare Tunes
| compare_tunes.html
| params_common.js, tune_descriptions.js,  tunes_descriptions.js
| common.css,  bn[mq]r.css


|-
* [[BNMR: Custom Status page|Status page]] - replaces the MIDAS standard status page
| Mode 20 setup
* [[BNMR: Custom Settings page|Settings page]] - displays parameters for the selected PPG timing scheme, PSM mode etc
| slider20.html
* [[BNMR: Custom Logging page|Logging page]] - displays parameters for logging data to a MUD file
| ''Note: This page requires the standard jquery, nouislider, wnumb libraries''.
* [[BNMR: Custom Modes page|Modes page]] - displays the features of each experimental mode
| common.css,  bn[mq]r.css
* [[BNMR: Custom Expert page|Expert page]] - displays features that are rarely used or easy to misuse


== Defining in the /Custom ODB tree ==
In order for  {{Utility|name=mhttpd}} to display custom pages, file names an aliases must be defined in the experiment's {{Odbpath|path=/Custom}} ODB tree. This includes external stylesheets, html and javascript code. See [https://daq00.triumf.ca/MidasWiki/index.php//Custom_ODB_tree Midas documentation about /Custom] for more.


|}
== Code location ==
All custom page code is located in the bnmr repository:
* <code>cycling_framework/custom</code> directory contains tools from the base framework (including JQuery, Plotly and PPG visualization tools).
* <code>bnxr_common/custom</code> directory contains code common to both experiments.
* <code>config_bnmr.js</code> and <code>config_bnqr.js</code> define the specific differences for each experiment.


[[Category:Webserver]]
[[Category:BNMR]] [[Category:Webserver]]

Latest revision as of 12:47, 26 April 2022

Purpose

BNMR custom webpages are written specifically for the bnmr and bnqr experiments to enable to users to enter parameters and control the experiments more easily. They are built using the Midas custom page system.

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 for bnmr/bnqr

The custom pages written for the bnmr and bnqr experiments include:

  • Status page - replaces the MIDAS standard status page
  • Settings page - displays parameters for the selected PPG timing scheme, PSM mode etc
  • Logging page - displays parameters for logging data to a MUD file
  • Modes page - displays the features of each experimental mode
  • Expert page - displays features that are rarely used or easy to misuse

Defining in the /Custom ODB tree

In order for mhttpd to display custom pages, file names an aliases must be defined in the experiment's /Custom ODB tree. This includes external stylesheets, html and javascript code. See Midas documentation about /Custom for more.

Code location

All custom page code is located in the bnmr repository:

  • cycling_framework/custom directory contains tools from the base framework (including JQuery, Plotly and PPG visualization tools).
  • bnxr_common/custom directory contains code common to both experiments.
  • config_bnmr.js and config_bnqr.js define the specific differences for each experiment.