BNMR: Custom pages: Difference between revisions

From DaqWiki
Jump to navigation Jump to search
en>Suz
mNo edit summary
mNo edit summary
 
(11 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| 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
* Tune 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}}. Some style sheets are used by several custom pages.
 
 


== Custom pages for bnmr/bnqr  ==


{| border="1" style="border-collapse:collapse; color:green; background-color:aliceblue"  "
The custom pages written for the {{bnmqr|join=and}} experiments include:
|+ Code
! Custom Page !! HTML !! JS !! CSS
|-
| Status
| Custom_Status.html
| cs_functions.js
| common.css, bn[mq]r.css
|-
| Parameters
| parameters.html
| parameter_functions.js, params_common.js,
| mhttpd.css, common.css,  bn[mq]r.css


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


|-
== Defining in the /Custom ODB tree ==
| Mode 20 setup
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.
| slider20.html
|
| common.css


|-
== Code location ==
| Compare Tunes
All custom page code is located in the bnmr repository:
| compare_tunes.html
* <code>cycling_framework/custom</code> directory contains tools from the base framework (including JQuery, Plotly and PPG visualization tools).
|  params_common.js, tune_descriptions.js
* <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: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.