User Defined Menu: Difference between revisions

m
 
(4 intermediate revisions by the same user not shown)
 
=== System 2 ===
In the utils directory there must be a file ''CutilsMenu.def''. If this file is not present you get the default menu. The default contents of this file as delivered in the distribution is :shown at the end of this page.
 
You recognize the standard menu of CumulusUtils. User items can be added to the standard menu as is indicated above. While generating the website this menu will be incorporated. The System 1 menu will be generated in addition to System 2 (i.e. those items will be on the rightmost side of the menu).
Home
 
==== Items ====
About
Any menu topic named other than the standard item will create a new, user defined, main menu dropdown. For all drop downs ''items'' can be defined as follows:
Item Test1 External <nowiki>https://waterinfo.rws.nl/#!/kaart/waterhoogte-t-o-v-nap/</nowiki> EndItem
Item Test2 Internal <nowiki>https://embed.windy.com/embed2.html?lat=53.2589&lon=6.9314&detailLat=47.339&detailLon=6.812&width=1000&height=700&zoom=5&level=surface&overlay=temp&product=ecmwf&menu=&message=true&marker=true&calendar=now&pressure=true&type=map&location=coordinates&detail=&metricWind=km%2Fh&metricTemp=%C2%B0C&radarRange=-1</nowiki> EndItem
Item Test3 Report tagtest EndItem
 
Item <name> <type> <destination> EndItem
Reports
Graphs
Records
Extra
Misc
ToggleDashboard
 
This Item definition line has space separated words.
You recognize the standard menu of CumulusUtils.
From version 6.12 the menu runs from left to right (as before it went from right to left).
 
The <name> is what you will see in the menu and may consist of one or more words. If <name> is a valid filespec on the seerver or a valid URL, it will display the contents of that filespec or URL. It is intended to be used as a specification for a small images to be displayed in the menu. It is the users responsibility to have a correct filespec or URL. No validation is done other than:
User items can be added to the standard menu as is indicated above. While generating the website this menu will be incorporated. The System 1 menu will be generated in addition to System 2 (i.e. those items will be on the rightmost side of the menu)
 
#<name> starts with <code>'./' OR '../'</code>
==== Items ====
#<name> starts with <code>'http' OR 'https'</code>
Any menu topic named other than the standard item will create a new, user defined, main menu dropdown. For all drop downs items can be defined as follows:
 
In which Itemcases the <name> <type>is <destination>interpreted as an EndItemURL.
 
The <name> is what you will see in the menu.
The Type can be of :
 
#'''External''': The URL given as destination will be opened in a new window or new tab besides CUtils
#'''Internal''': The URL given as destination will be opened in the ReportView, the large viewport on the right side of the dashboard. It is implemented as an Iframe which is generated to the standard demands of Cutils
#'''Report''': Any UserReport of Cutils or any other legitimate HTML/Javascript file similar to the standard reports and charts. The destination is a textfilefully specified text file name : ''filename.txt'' (so including the extension)
#'''Image''': The URL for the image (e.g. a satellite image) will be shown in the ReportView
#'''Image''': Not implemented yet
#'''Separator''': No further arguments. Creates a thin horizontal line below the last item
 
<destination> is the URL of what you want to see. An URL can be a full specification or just a filename in which case the report must be present on the server in the webroot (asproduced alwaysby Cutils or by the user).
 
TheExample examplelines are shown at the bottom of this page and in the distribution contains threefile ''CutilsMenu-example lines-for-use.def''
 
Both files for System 1 & 2 are available in the distribution.
Both System 1 & 2 can be used concurrently.
 
Error recovery in case of errors is present. System 2 however cannot validate against the real world so while developing your menu: be precise or be prepared to rerun if your menu looks garbled. Garbage in is garbage out.
 
== Output ==
There is no output of the user menu, only a visible appearance on the website.
 
System 2 however may produce menufiles on the server of the form: ''<main menu item><subitem number>.txt''.
 
== Inifile parameters ==
== Example of CuserMenu.def (System 2) ==
 
The lines below are examples
Lines starting with a semicolon (;) are treated as comment
 
;
Home;<br/>
; CumulusUtils Menu definitions for Website- Part of CumulusUtils
About;<br/>
;
Reports;<br/>
 
Records;<br/>
Home
Graphs;<br/>
Reports
Extra;<br/>
Misc;<br/>
Graphs
<nowiki>;</nowiki>Toggle Dashboard;<br/>
Item Test3Extra Report tagtestextrasensorscharts.txt EndItem
Records
Extra
Misc
Maps
User
Item ./wu.png External https://www.wunderground.com/dashboard/pws/IWAGEN6?cm_ven=localwx_pwsdash EndItem
NL
Item Test1Waterstanden External <nowiki>https://waterinfo.rws.nl/#!/kaart/waterhoogte-t-o-v-nap/</nowiki> EndItem
Item TopoNL External https://topotijdreis.nl EndItem
Item Hoogtekaart External https://ahn.arcgisonline.nl/ahnviewer/ EndItem
Item CropMap External https://www.esa.int/ESA_Multimedia/Images/2018/05/Crop_map EndItem
Item Separator EndItem
Item Waterstanden (Int) Internal https://waterinfo.rws.nl/#!/kaart/waterhoogte/ EndItem
Item TopoNL (Int) Internal https://topotijdreis.nl EndItem
ToggleDashboard
About
 
 
[[Category:CumulusUtils]]