Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  23 Sep 2013, Stefan Ritt, Info, Custom page header implemented Screen_Shot_2013-09-23_at_15.17.40_.png
    Reply  12 Feb 2014, Stefan Ritt, Info, Custom page header implemented 
       Reply  18 Feb 2014, Konstantin Olchanski, Info, Custom page header implemented 
          Reply  19 Feb 2014, Stefan Ritt, Info, Custom page header implemented 
Message ID: 908     Entry time: 23 Sep 2013     Reply to this: 959
Author: Stefan Ritt 
Topic: Info 
Subject: Custom page header implemented 
Due to popular request, I implemented a custom header for mhttpd. This allows to inject some HTML code 
to be shown on top of the menu bar on all mhttpd pages. One possible application is to bring back the old 
status line with the name of the current experiment, the actual time and the refresh interval. 

To use this feature, one can put a new entry into the ODB under


which can be either a string (to show some short HTML code directly) or the name of a file containing some 
HTML code. If /Custom/Path is present, that path is used to locate the header file. A simple header file to 
recreate the GOT look (good-old-times) is here:

<div id="footerDiv" class="footerDiv">
<div style="display:inline; float:left;">MIDAS experiment "Test"</div>
<div id="refr" style="display:inline; float:right;"></div>
<script type="text/javascript">
var r = document.getElementById('refr');
var now	= new Date();
var c =	document.cookie.split('midas_refr=');
r.innerHTML = now.toString() + '&nbsp;&nbsp;&nbsp;' + 'Refr:' + c.pop().split(';').shift();

The JavaScript code is used to retrieve the midas_refr cookie which stores the refresh interval and displays 
it together with the current time.

Another application of this feature might be to check certain values in the ODB (via the ODBGet function) 
and some some important status or error condition.

Attachment 1: Screen_Shot_2013-09-23_at_15.17.40_.png  76 kB  Uploaded 23 Sep 2013  | Hide | Hide all
ELOG V3.1.4-2e1708b5