Dashboard and Website Generator: Difference between pages

From Cumulus Wiki
(Difference between pages)
Jump to navigationJump to search
 
 
Line 1: Line 1:
{|align=right
|__TOC__
|}

== Introduction ==
== Introduction ==
[[File:Dashboard part 1.jpg|frameless|right|Startup Dashboard]]
[[File:Website example.jpg|thumb|right|Website Example Wolfshagen]]
While CumulusUtils started as a collection of modules to be used at will in the creation of a weather website - for the site of the author - after several modules it became clear that generation of a complete website would not be too difficult. It required a HTML framework within which the modules would fit, a menu, a runtime system to handle the realtime data, loading of files, clocks, sun and moon and an adaptation of mcrossley's gauges.
[[File:Dashboard part 2.jpg|frameless|right|Toggled Dashboard]]

The dashboard is the left part of the CumulusUtils Website as generated by the [[Website Generator]]. The Dashboard contains twentyfour panels of which twelve can be displayed at the same time. The menu choice ''Toggle Dashboard'' changes between the two sets of panels. It is fixed part of the website and cannot be removed (just like the reportview on the right).
The work set out on a scratch board where the site was drafted and the runtime was coded. The choice was made to split the screen in two in a 5/7 ratio which never changed since. The right pane became the ''ReportView'' where the user chooses the report he wishes to see while the realtime data are always visible in the left pane, the [[Dashboard]]. The contents of the Dashboard can be toggled between two sets of twelve panes and the lunar disc can be replaced by the lunar image produced by CMX (see [[Dashboard#The_Lunar_Disc|DashBoard]]).

In the example on the image on the right you see Holgers' fully translated site with expanded user menu and even multilingual by his own design to show off the things possible with the CumulusUtils framework.

== Operation ==
The website generation includes in principle all modules. It is created with the following command:

utils/bin/cumulusutils.exe Website

== Output ==
The output of the website generation is the output of all individual modules and in addition:

#index.html => is the Bootstrap formatted start page of the site
#cumulusutils.js => is the javascript runtime system
#cumuluscharts.txt => contains the charts for the Home page and is originally based on the CumulusMX recent charts. This file is produced by the ChartsCompiler but if the compiler is not used, the original charts as present in the old standard CumulusMX website will be presented.
#HighchartsLanguage.js => contains the language definitions for the charts. Not many possibilities are used but that may change. It is generated each run.


These files will be generated by the ''Website'' command. If you did not change anything, apart from the index.html they do NOT need to be uploaded (see the [[Thrifty_-_Cutils_Command_Qualifier|Thrifty qualifier]])
Examples of the two dashboards are shown on the right.


The following files are not generated but are required. If not present a message is logged on the console.
The Dashboard is configurable in two ways: the contents of a panel and - only if you use the [[ChartsCompiler]] - the click event attached to a panel.
Because click events are not configurable in the default configuration, it is advised NOT to change the panel content when not using CDL (but you're free to experiment).


#CUserAbout.txt => The menu choice About=>This Site uses the contents of a file named CUserAbout.txt to be displayed in a popup window. As you can imagine, the user has to create this file himself. The contents of this file must be text with HTML tags for formatting.
The part of the CumulusUtils interface to the right of the Dashboard is the part where the Charts and reports are shown. In the terminology of the CUtils that is the '''''ReportView'''''.


== Dashboard configuration ==
== Inifile parameters ==
'''NOTE: The Website Generator works closely together with the Internal [[FTP facility]]. You have to setup that first or upload the output manually. It's user preference.'''
To understand the configuration well the user needs first to understand the enumeration of the panels.


The Website section is the largest parameters section. Not all parameters will be reproduced here, see the [[Cumulusutils.ini]] article. Only the important individual parameters will be discussed, the others are discussed as a group.
The panels are enumerated from left to right and from top to bottom. So the first dashboard which shows at startup of the website has panel nr 1 on top left (default content is ''Temperature'') and panel nr 12 on bottom right (default content is ''Solar''). The second dashboard has panel nr 13 on top left (default content is ''Temperature Gauge'') and panel nr 24 on bottom right (default content is ''UV Gauge'').


[Website]
Beside this functional configuration the colouring as well can be adjusted. It is assumed the parameter naming is clear enough in this respect.
// The statistics parameters are currently either for Google or Matomo
// If the corresponding ID's and or Url are not filled in, invalid code is generated. If you do not want
// statistics than set ''StatisticsType'' without value
StatisticsType= [Google || Matomo] default is empty
GoogleStatsId= => When not empty, a google stats code fragment will be generated with this code as the user Id, default is empty
MatomoTrackerUrl=
MatomoSiteId=
PermitGoogleOptout=false (default) => Permits to generate code so the users own access to the site will not be measured, default=false


CumulusRealTimeLocation= => see below, default is empty
=== Content configuration ===
ShowInsideMeasurements=true | false => when true, inside temperature and humidity will be shown on the website (when available in the datafile), default=false
All panels can be assigned a block of predefined content which can be seen in the default configuration. The content itself is not user definable (and probably never will be).
CumulusRealTimeInterval=30 => The refresh cycle time of the runtime system to update the values on the dashboard and gauges, default=15
The [[cumulusutils.ini]] file has parameters for each panel (e.g. panel-1) in the [[Cumulusutils.ini#.5BWebsite.5D|''Section Website'']]. Assigning keywords to those parameters sets the content for that panel. E.g. panel-1=TemperatureGauge and panel-13=TemperatureText interchanges the gauge and text information panel content for the top-left panel in both dashboard toggles.
ShowUV=true => Show the UV values (if there is a sensor), default=true
ShowSolar=true => Show the solar radiation values (if there is a sensor), default=true
HeaderLeftText= => A free plain or HTML formatted text destined at the left side of the header, default is empty
HeaderRightText= => A free plain or HTML formatted text destined at the right side of the header, default is empty
SiteTitleAddition= => A free text addition to the title, default is empty
UseCMXMoonImage=false => When true the CMX generated moon image is used i.s.o. the CUtils native abstracted image
MoonImageLocation= => The full URL for the moon image, used when ''UseCMXMoonImage=true'', ignored otherwise
PwsfwiButtonInHeader=true => When true the direct access pwsFWI button will show in the header, when false it shows in the menu bar


All parameters starting with '''''Panel''''' affect what you actually see in that panel See [[Dashboard]] for more information.<br>
When errors are made in the keywords (e.g. typos) an error is written in the logfile and the panel remains empty.
All parameters starting with '''''Color''''' affect the Bootstrap elements relevant for the interface and give the user the possibility to create a personal touch to the presentation.<br>
All parameters starting with '''''Steelseries''''' affect the presentation of the gauges. You may find examples [https://www.wilmslowastro.com/steelseries/demoRadial.html here] and [http://www.boock.ch/meteo/gauges_stelserie_demoradial.php here] <ref> See the site of Mark Crossley if you wish to see more and create gauges yourself: [https://www.wilmslowastro.com/steelseries/demoLinear.html lineair], [https://www.wilmslowastro.com/steelseries/demoExtras.html extras], [https://www.wilmslowastro.com/steelseries/demoStopWatch.html stopwatch], [https://www.wilmslowastro.com/steelseries/demoLightBulb.html lightbulb], [https://www.wilmslowastro.com/steelseries/demoLcdSections.html LCD] and [https://www.wilmslowastro.com/steelseries/demoLcdSections.html trafficlight]</ref>. See also the [[SteelSeries_FAQ|SteelSeries FAQ]].<br>
All parameters starting with '''''Threshold''''' give a definition in pairs for a red led within a gauge to start flashing when the given boundary has surpassed.<br>
All parameters starting with '''''Home''''' apply to the Home page graphs and give the user the possibility to explicitly set non-default colours <ref>When use is made of the [[ChartsCompiler|CutilsCharts.def]] definition of charts for the [[ChartsCompiler]], then these colours have no meaning and either the colours from the [[ChartsCompiler|CutilsCharts.def]] or from the theme (if none specified) are used </ref>. <br>
When colours go in three they are gradient colours. If only the first colour is used, no gradient effect is seen.


<references />
The existing content (the block names) and their default panel assignment is given below:


=== Header Background Images ===
Panel-1=TemperatureText
(v6.8.4 and up)
Panel-2=PressureText
Special attention must be given to the Header Background Images parameters, meant to make user specific artwork to the site possible. The perception of the site changes dramatically when the header image changes in colour, brightness and what is actually depicted.
Panel-3=RainText
ColorTitleBackGroundImage= (this image represents the DAY, for historical reasons the name of the parameter has not been modified)
Panel-4=Clocks
ColorTitleBackGroundImageCivil=
Panel-5=WindGauge1
ColorTitleBackGroundImageNautical=
Panel-6=WindDirGauge1
ColorTitleBackGroundImageAstronomical=
Panel-7=WindRoseGauge1
ColorTitleBackGroundImageNight=
Panel-8=WindText
These parameters may contain the name of an imagefile which the user has placed on the website. The path must be relative to the webroot or a full URL specification. The images correspond to the respective phases of the day: DAY, CIVIL twilight, NAUTICAL twilight, ASTRONOMICAL twilight and NIGHT - see the solar disc in the [[dashboard]] - and are displayed when that corresponding phase starts. If an image is not specified, the image of the preceding phase is used where the order is: DAY, CIVIL, NAUTICAL, ASTRONOMICAL and NIGHT. So, when only DAY is specified, all phases have the DAY image displayed. When DAY and CIVIL are specified, DAY gets the DAY image and all other phases get the CIVIL image etc...
Panel-9=SolarDisc
Panel-10=LunarDisc
Panel-11=HumidityText
Panel-12=SolarText
Panel-13=TemperatureGauge
Panel-14=OtherTempsGauge
Panel-15=PressureGauge
Panel-16=HumidityGauge
Panel-17=WindGauge2
Panel-18=WindDirGauge2
Panel-19=WindRoseGauge2
Panel-20=CloudBaseGauge
Panel-21=RainGauge
Panel-22=RainSpeedGauge
Panel-23=SolarGauge
Panel-24=UVGauge


=== Chart Background Images ===
You can replace any panel content with the content specification '''''Empty'''''. This will blank that specific pane (in the background colour and an empty header) but not move the others.
(v6.9.6 and up)
NOTE: Contrary to the CMX standard, there is no need to configure FeelsLike anywhere. Both Apparent and Feels Like can be displayed. See page for [[Feels_Like|Feels Like]].
It is possible to define a background image for the chart as a whole (so not only the plot area but also the axis and titles). For this a general parameter exists (general because it is valid for all modules carrying charts):
ChartBackgroundImage=
If this parameter contains a filename, that file is used as background image of the charts. Note that the specification may also be a url which must be accessible by the user running the website.


=== Event configuration ===
=== CumulusRealTimeLocation ===
The parameter ''CumulusRealTimeLocation'' gives the user the possibility to setup the CumulusUtils website beside a main website and share the realtime and datafiles with the other site.
Each panel may have a click event attached to it: if a mouse click is received on that panel a predefined chart is displayed in the ''ReportView''. There is a default set of events which is used if there is no [[ChartsCompiler]] used. Those events are:


If there is a directory structure like:
['Temp','Pression','Rain','','WindSpeed','WindDir','WindDir','WindSpeed','','','Humidity','Solar','Temp','Temp','Pression','Humidity','','','','','Rain','Rain','Solar','Solar']
\ as webroot
|
- cutils\ as directory where the CumulusUtils site is located
|--- lib\
|--- css\
|--- CUicons\


then, when CumulusMX sends the realtime and datafiles to the webroot, you can set the ''CumulusRealTimeLocation'' to '''..\''' and it will automatically find the realtime and datafiles it needs.
Each of the 24 strings - separated by comma's - describes the chart which will be displayed when clicked. So if you interchange panel-1 and panel-2 (temperature and pressure) and you click on pressure you will see the temperature chart. These event/chart combinations cannot be changed by the user.


=== Javascript libraries ===
However, when using the [[ChartsCompiler]] / [[Charts Definition Language (CDL)|CDL]] combination, you can assign a chart to a Panel with the ConnectsTo construct.
When using the [[Website Generator]], all modules are used implicitly. Modules, with some exceptions, can be used standalone in any website by including the output of CumulusUtils in that website. When using the standalone mode you need to be aware of the [[cumulusutils.ini|inifile parameters]] (section general) ''GeneratejQueryInclude'' and ''DoLibraryIncludes''.


#GeneratejQueryInclude will - if true - generate the required jQuery library reference line on top of the module.
An example of this you see here:
#DoLibraryIncludes will - if true - generate the required library references (e.g. HighCharts, Leaflet etc...) on top of the module.


If you manage these libraries in your website yourself set these parameter values to false.
Chart Oversight Title Oversight of current weather status ConnectsTo 2 4 15 20
If the modules don't work and you have no idea what this is about, set these values to true.
PLOT Temperature Colour #058DC7 zindex 90
PLOT DewPoint Colour #50B432 zindex 80
PLOT pressure Colour red zindex 70
Plot Humidity Colour #64E572 zindex 60
Plot SolarRadiation As Area Opacity 0.2 Colour Orange zindex 20
Plot RainFall As Area colour #33B4FF opacity 0.2 zindex 10
EndChart


If you use the [[Website Generator]], '''set both parameters to false'''.
So when panel-2 is clicked (the default content would be pressure) you get this chart. But this also is valid for panel 4 (clocks), 15 (Pressure gauge) and 20 (Cloudbase gauge). So combining the panel configuration of the dashboard with the event configuration of the ChartsCompiler gives the user almost full control of how the website functions.


On top of the above use of these parameters, if you wish to run the [[ChartsCompiler]] as a module i.e. [[ChartsCompiler#Explicit_activation|explicit activation]] (command CompileOnly) but for use '''inside''' the CUtils environment then both library parameters must be false.
=== The Gauges ===
The gauges can be configured for appearance as described on the [[Website_Generator#Inifile_parameters|Website page]]. You may find examples [https://www.wilmslowastro.com/steelseries/demoRadial.html here] and [http://www.boock.ch/meteo/gauges_stelserie_demoradial.php here]. Please study the [[SteelSeries FAQ|Steelseries FAQ]] for the values of the parameters.


=== The Wind Gauges ===
== Other remarks ==
In this section some special subjects and questions and answers from the forum will be summarized
As you see, there are two sets of wind gauges. The reason for this is that it is not possible to create a second gauge object (for any gauge). Therefore, the existing object is moved between the first and the second dashboard during a toggle because we need the wind gauges in both dashboards. For the first dashboard you use the denominator 1 (e.g. WindGauge1) and for the second dashboard you use denominator 2 (e.g. WindGauge2). Mixing and moving these out of the dashboard will give unpredictable results.


=== The Lunar Disc ===
=== The Clocks ===
The clocks panel of the website shows three clocks:
The Lunar Disc native to CumulusUtils is an abstraction of the phases of the moon calculated and refreshed each hour. This is the preferred default (for aesthetic uniformity and good taste ;) )
#Station which is the actual time at the location of the station corrected for DST of the station location
#Browser which is the time on the computer of the viewer corrected for the browser location DST
#UTC


It is important for the automatic DST switch to understand that the generation of the daily website needs to take place after the switch time. So in spring that would be at 2 o'clock and in autumn that would be after 3 o'clock. If run before those hours the DST correction will obviously take place one day later.
However, some prefer the real moon image as delivered by CMX itself. This is possible in CumulusUtils by setting the inifile parameter ''UseCMXMoonImage'' in section [Website] to true. Note that you have to configure the use of this image in CMX and that CumulusUtils uses the actual path configured there (as a path relative to the webroot of CumulusUtils).


=== The PwsFWI button ===
PwsFWI is an identifying feature of CumulusUtils displaying a pretty accurate Forest Fire Risk Assessment Index for Personal Weather Stations and therefore can't be removed from Cutils. Default the pwsFWI button is displayed in the header but it can be configured to be in the menu bar (the navbar). For how to configure read the [[Website_Generator#Inifile_parameters|website page]]
[[Category:CumulusUtils]]
[[Category:CumulusUtils]]

Revision as of 13:05, 9 September 2025

Introduction

Website Example Wolfshagen

While CumulusUtils started as a collection of modules to be used at will in the creation of a weather website - for the site of the author - after several modules it became clear that generation of a complete website would not be too difficult. It required a HTML framework within which the modules would fit, a menu, a runtime system to handle the realtime data, loading of files, clocks, sun and moon and an adaptation of mcrossley's gauges.

The work set out on a scratch board where the site was drafted and the runtime was coded. The choice was made to split the screen in two in a 5/7 ratio which never changed since. The right pane became the ReportView where the user chooses the report he wishes to see while the realtime data are always visible in the left pane, the Dashboard. The contents of the Dashboard can be toggled between two sets of twelve panes and the lunar disc can be replaced by the lunar image produced by CMX (see DashBoard).

In the example on the image on the right you see Holgers' fully translated site with expanded user menu and even multilingual by his own design to show off the things possible with the CumulusUtils framework.

Operation

The website generation includes in principle all modules. It is created with the following command:

  utils/bin/cumulusutils.exe Website

Output

The output of the website generation is the output of all individual modules and in addition:

  1. index.html => is the Bootstrap formatted start page of the site
  2. cumulusutils.js => is the javascript runtime system
  3. cumuluscharts.txt => contains the charts for the Home page and is originally based on the CumulusMX recent charts. This file is produced by the ChartsCompiler but if the compiler is not used, the original charts as present in the old standard CumulusMX website will be presented.
  4. HighchartsLanguage.js => contains the language definitions for the charts. Not many possibilities are used but that may change. It is generated each run.

These files will be generated by the Website command. If you did not change anything, apart from the index.html they do NOT need to be uploaded (see the Thrifty qualifier)

The following files are not generated but are required. If not present a message is logged on the console.

  1. CUserAbout.txt => The menu choice About=>This Site uses the contents of a file named CUserAbout.txt to be displayed in a popup window. As you can imagine, the user has to create this file himself. The contents of this file must be text with HTML tags for formatting.

Inifile parameters

NOTE: The Website Generator works closely together with the Internal FTP facility. You have to setup that first or upload the output manually. It's user preference.

The Website section is the largest parameters section. Not all parameters will be reproduced here, see the Cumulusutils.ini article. Only the important individual parameters will be discussed, the others are discussed as a group.

 [Website]
 // The statistics parameters are currently either for Google or Matomo 
 // If the corresponding ID's and or Url are not filled in, invalid code is generated. If you do not want
 // statistics than set StatisticsType without value
 
 StatisticsType= [Google || Matomo] default is empty 
 GoogleStatsId=                        => When not empty, a google stats code fragment will be generated with this code as the user Id, default is empty
 MatomoTrackerUrl=
 MatomoSiteId=
 PermitGoogleOptout=false (default)    => Permits to generate code so the users own access to the site will not be measured, default=false
 CumulusRealTimeLocation=              => see below, default is empty
 ShowInsideMeasurements=true | false   => when true, inside temperature and humidity will be shown on the website (when available in the datafile), default=false
 CumulusRealTimeInterval=30            => The refresh cycle time of the runtime system to update the values on the dashboard and gauges, default=15
 ShowUV=true                           => Show the UV values (if there is a sensor), default=true
 ShowSolar=true                        => Show the solar radiation values (if there is a sensor), default=true
 HeaderLeftText=                       => A free plain or HTML formatted text destined at the left side of the header, default is empty
 HeaderRightText=                      => A free plain or HTML formatted text destined at the right side of the header, default is empty
 SiteTitleAddition=                    => A free text addition to the title, default is empty
 UseCMXMoonImage=false                 => When true the CMX generated moon image is used i.s.o. the CUtils native abstracted image 
 MoonImageLocation=                    => The full URL for the moon image, used when UseCMXMoonImage=true, ignored otherwise
 PwsfwiButtonInHeader=true             => When true the direct access pwsFWI button will show in the header, when false it shows in the menu bar

All parameters starting with Panel affect what you actually see in that panel See Dashboard for more information.
All parameters starting with Color affect the Bootstrap elements relevant for the interface and give the user the possibility to create a personal touch to the presentation.
All parameters starting with Steelseries affect the presentation of the gauges. You may find examples here and here [1]. See also the SteelSeries FAQ.
All parameters starting with Threshold give a definition in pairs for a red led within a gauge to start flashing when the given boundary has surpassed.
All parameters starting with Home apply to the Home page graphs and give the user the possibility to explicitly set non-default colours [2].
When colours go in three they are gradient colours. If only the first colour is used, no gradient effect is seen.

  1. See the site of Mark Crossley if you wish to see more and create gauges yourself: lineair, extras, stopwatch, lightbulb, LCD and trafficlight
  2. When use is made of the CutilsCharts.def definition of charts for the ChartsCompiler, then these colours have no meaning and either the colours from the CutilsCharts.def or from the theme (if none specified) are used

Header Background Images

(v6.8.4 and up) Special attention must be given to the Header Background Images parameters, meant to make user specific artwork to the site possible. The perception of the site changes dramatically when the header image changes in colour, brightness and what is actually depicted.

ColorTitleBackGroundImage=                 (this image represents the DAY, for historical reasons the name of the parameter has not been modified)
ColorTitleBackGroundImageCivil=
ColorTitleBackGroundImageNautical=
ColorTitleBackGroundImageAstronomical=
ColorTitleBackGroundImageNight=

These parameters may contain the name of an imagefile which the user has placed on the website. The path must be relative to the webroot or a full URL specification. The images correspond to the respective phases of the day: DAY, CIVIL twilight, NAUTICAL twilight, ASTRONOMICAL twilight and NIGHT - see the solar disc in the dashboard - and are displayed when that corresponding phase starts. If an image is not specified, the image of the preceding phase is used where the order is: DAY, CIVIL, NAUTICAL, ASTRONOMICAL and NIGHT. So, when only DAY is specified, all phases have the DAY image displayed. When DAY and CIVIL are specified, DAY gets the DAY image and all other phases get the CIVIL image etc...

Chart Background Images

(v6.9.6 and up) It is possible to define a background image for the chart as a whole (so not only the plot area but also the axis and titles). For this a general parameter exists (general because it is valid for all modules carrying charts):

ChartBackgroundImage=

If this parameter contains a filename, that file is used as background image of the charts. Note that the specification may also be a url which must be accessible by the user running the website.

CumulusRealTimeLocation

The parameter CumulusRealTimeLocation gives the user the possibility to setup the CumulusUtils website beside a main website and share the realtime and datafiles with the other site.

If there is a directory structure like:

 \                              as webroot
 |
 - cutils\                       as directory where the CumulusUtils site is located
     |--- lib\
     |--- css\ 
     |--- CUicons\

then, when CumulusMX sends the realtime and datafiles to the webroot, you can set the CumulusRealTimeLocation to ..\ and it will automatically find the realtime and datafiles it needs.

Javascript libraries

When using the Website Generator, all modules are used implicitly. Modules, with some exceptions, can be used standalone in any website by including the output of CumulusUtils in that website. When using the standalone mode you need to be aware of the inifile parameters (section general) GeneratejQueryInclude and DoLibraryIncludes.

  1. GeneratejQueryInclude will - if true - generate the required jQuery library reference line on top of the module.
  2. DoLibraryIncludes will - if true - generate the required library references (e.g. HighCharts, Leaflet etc...) on top of the module.

If you manage these libraries in your website yourself set these parameter values to false. If the modules don't work and you have no idea what this is about, set these values to true.

If you use the Website Generator, set both parameters to false.

On top of the above use of these parameters, if you wish to run the ChartsCompiler as a module i.e. explicit activation (command CompileOnly) but for use inside the CUtils environment then both library parameters must be false.

Other remarks

In this section some special subjects and questions and answers from the forum will be summarized

The Clocks

The clocks panel of the website shows three clocks:

  1. Station which is the actual time at the location of the station corrected for DST of the station location
  2. Browser which is the time on the computer of the viewer corrected for the browser location DST
  3. UTC

It is important for the automatic DST switch to understand that the generation of the daily website needs to take place after the switch time. So in spring that would be at 2 o'clock and in autumn that would be after 3 o'clock. If run before those hours the DST correction will obviously take place one day later.