diff --git a/README.md b/README.md index 473c126..ad20ff2 100644 --- a/README.md +++ b/README.md @@ -11,96 +11,15 @@ instrument-specific pages repository such as `pages/common.js` is an ES module that holds the shared front-end logic of the "Mudas" (MIDAS User interface) page. It contains no instrument specific information; that is supplied by the instrument repository. To reuse it in a -custom MIDAS UI you need three things: +custom MIDAS UI you need the following things: -1. an HTML page that provides the DOM skeleton `common.js` expects, -2. an ES-module init file that imports `common.js`, supplies the instrument +1. an ES-module init file that imports `common.js`, supplies the instrument configuration and drives the page, and -3. (optionally) per-tab markup/JS files under a `tabs/` directory. +2. (optionally) per-tab markup/JS files under a `tabs/` directory. -After installing (see above) the files live in the MIDAS pages directory -(the CMake install prefix), which MIDAS serves and advertises to the browser -via the `/ODB/Custom/Path` ODB entry. - -### The page skeleton - -`common.js` finds its targets by element `id`, so the page must contain the -structural elements it builds on. The reference implementation is -`pages/Mudas.html`. The ids the module looks for, grouped by feature: - -| Feature | Element ids | -| --- | --- | -| MIDAS header / sidebar (standard mhttpd) | `mheader`, `msidenav`, `mmain` | -| Alarms table | `alarmsTable` | -| Instrument banner | `instrName` | -| Header links | `elogLink`, `musrfitRun`, `SearchDBlink` | -| Run status banner / time | `run_statusBanner`, `stopTimetd`, `vstopTimetd`, `stopTime` | -| Run control buttons *(optional, guarded)* | `startButton`, `stopButton`, `pauseButton`, `resumeButton`, `writeButton`, `zeroButton` | -| HIPA status | `HIPAimg`, plus a HIPA entry with id `100` in the tab menu | -| Tab bar | `tabBtns`, `tabMenu`, `tabFrames`, `beforeMenu` | -| PySequencer header | `AutoRunState`, `AutoRunLine` | -| Proposal / DUO | `propID`, `propPI`, `propGRP`, `propFromDuo` | - -On top of these, any element whose **id** is a key of `instrODB` (below) is -bound to that ODB path, and the placeholders named `mvarvalue`, `mvarbox`, -`mvarcheckbox`, `mvarselect` and `frappy_enum` are resolved by -`mvar_init()` / `frappy_enum_init()`. - -### The init file - -The init file is an ES module loaded with `