Category:Cumulus MX: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m
 
=== The provided web pages ===
Setting up a web site is covered in [[Website_setup|this wiki page]] and the pages linked from there. I won't repeat that, but will try to explain below the MX context of the various files involved.
 
Setting up a web site is covered in [[Website_setup|this wiki page]] and the pages linked from there. I won't repeat that, but will try to explain below the MX context of the various files involved. MX will produce web pages locally even if you don't have a remote web site to display them on. You can view the web pages created in the web folder using a browser.
Cumulus MX provides a set of web templates, images, and json files, in '''\CumulusMX\web'''. If you have a web server, then MX can process these files and upload them for you (by default using File Transfer Process) providing you specify the host, port, protocol, directory, username, and password, for the upload process to use. If you don't understand any of these terms, then this is not the place for explaining them, but generally if your web space is supplied by a provider, they will be able to tell you most of these settings, and you will choose the directory name. If you have set up a web server yourself, then you should know the required settings.
 
TheCumulus webMX templatesprovides includeda areset basedof onweb designstemplates, byimages, Bethand Loftjson usedfiles, forin Cumulus 1'''\CumulusMX\web'''. They areThe writtenfirst in fairly simple Hyper-Text Mark-up Language.of Theythese are called templates (and have a 'T' at the end of the file name before the extension) because they include webboth tagstext thatand Cumulusweb hastags. toMX will '''process''' tothese inserttemplates theas currentit actualcreates valuesa andweb thenpage Cumulus(file willname generatewithout a web"T" pagein thatsame canweb befolder), uploaded.during that processing, Mostany layoutstext includein athe tabletemplate foris showingcopied valuesinto andnew stylingfile thatwithout giveschange, aany gradedweb backgroundtags colour.found Thein tablesthe includetemplate aare navigationparsed rowand withthe linkscorrect tovalue theis otherplaced in that pagesposition in the setoutput file. ThatIf navigationyou linehave fixesa theweb widthserver, ofthen theMX table,can process these files and upload them for you will(by realisedefault itusing wasFile designedTransfer inProcess) theproviding daysyou whenspecify allthe monitorshost, wereport, aprotocol, standarddirectory, shapeusername, and cannotpassword, adapt tofor the rangeupload ofprocess devices weto use. for viewingIf webyou pagesdon't nowadays.understand Howeverany of these terms, Stevethen Loftthis (whois wrotenot the originalplace Cumulusfor software)explaining saidthem, but "Theygenerally existif becauseyour they'reweb ourspace webis pages,supplied andby a provider, they're reallywill onlybe includedable withto Cumulustell asyou examplesmost of howthese thesettings, weband tagsyou work.will Itchoose neverthe occurreddirectory toname. meIf thatyou mosthave peopleset wouldup simplya useweb theserver suppliedyourself, examplesthen insteadyou ofshould creatingknow theirthe own pages!"required settings.
 
The web templates included are based on designs by Beth Loft used for Cumulus 1. Remember, Steve Loft (who wrote the original Cumulus software) said "''They exist because they're our web pages, and they're really only included with Cumulus as examples of how the web tags work. It never occurred to me that most people would simply use the supplied examples instead of creating their own pages!''"
The web template that does not include a table is called '''trendsT.htm''', that creates a structure that can display graphs. The data for all the graphs that can be displayed is contained in the various '''json''' files in '''\CumulusMX\web''', these files are also processed by Cumulus so latest values are added, and then uploaded so the web page produced by this template can use them.
 
The templates are written in fairly simple Hyper-Text Mark-up Language, designed to help people see how to write their own web templates. Here is a list of web templates provided:
*indexT .htm
*todayT.htm
*yesterdayT.htm
*thismonth.htm
*thisyear.htm
*recordT.htm
*monthlyrecordt.htm
*gaugesT.htm
*trendsT.htm
 
All these templates (except gaugesT.htm and trendsT.htm) include a table for showing values and styling that gives a graded background colour. The tables include a navigation row with links to the other pages in the set. '''That navigation line fixes the width of the table''', and you will realise it was designed in the days when all monitors were a standard shape. Therefore the standard web pages as provided cannot adapt to the range of devices we use for viewing web pages nowadays. There are a selection of alternative web page sets available [[:Category:User_Contributions#web_template_complete_set_replacements|on the User_Contributions page]], and some of these are responsive and adapt to the width of the device they are being viewed on.
 
The webgaugesT.htm is a template thatsimilar doesto not[[SteelSeries includeGauges]] although the latter is designed to work with a tablerange of software and the former is calledspecific to MX. '''As supplied in MX if you mouse over the provided gauges appearing on your web site you will see a box with figures, not a graph as is seen with the general steel series gauges''', but there are some other differences such as how the figures are supplied for the displays. The remaining template '''trendsT.htm''', that creates a structure that can display graphs. The data for all the graphs that can be displayed is contained in the various '''json''' files in '''\CumulusMX\web''', these files are also processed by Cumulus so latest values are added, and then uploaded so the web page produced by this template can use them.
 
The image that is provided in '''\CumulusMX\web''' is ''MoonBaseImage.png'', MX can be set to use that to generate (on MX start-up and on the hour) "moon.png" which it then can FTP to your web (also on the hour).
 
'''To set up your web server for the first time''', you need to do a one-off installation of a number of files that do not change. These are found in '''\CumulusMX\webfiles''' and its sub-folders.
 
==== To set up your web server for the first time ====
These include the standard styling file '''\CumulusMX\webfiles\weatherstyle.css''' which you place in the directory specified for the uploads. To do this, you will probably need to invoke a FTP process outside of Cumulus. The filezilla client is a popular choice, although other software to do this is also available. Next you have three sub-folders, each of those sub-folders need to be replicated '''within''' the directory specified for the uploads. For example '''\CumulusMX\webfiles\images\picture.jpg''' will be stored in a "images" sub-directory of the upload directory and is used as the background image for web pages. There is nothing to stop you creating your own "picture.jpg" (instead of uploading the supplied one) and then Cumulus web pages will use that for the background image on each page. Similarly '''\CumulusMX\webfiles\js\cumuluscharts.js''' needs to be stored in a "js" sub-directory of your upload directory (this is the script that allows you to change the chart shown on the trends page and uses the appropriate json file to populate it with data). The "lib" sub-folder contains further levels of sub-folders all to be replicated on your web site.
 
When you first want to use Cumulus web pages on your web server, you need a number of static (unchanging) files to be put onto your web server. The web pages that MX uploads for you reference that static files and will not look right without them. The files that only have to be uploaded once are found in '''\CumulusMX\webfiles''' and its sub-folders. You don't create a folder called webfiles on your web server, but you put the files and sub-folders into position relative to where MX will upload the htm files.
 
To do this, you will must invoke a FTP process outside of Cumulus, MX does not include any functionality to do this one-off upload for you. The filezilla client is a popular choice as it has probably the most friendly graphical user interface, although other software to do this is also available. You may prefer a tool that lets you do the uploads from a command line without requiring working with a graphical interface.
 
#The static files to be uploaded include the standard styling file '''\CumulusMX\webfiles\weatherstyle.css''' which you place in the directory specified for the uploads.
#Next you have three sub-folders, each of those sub-folders need to be replicated '''within''' the directory specified for the uploads.
#*For example '''\CumulusMX\webfiles\images\picture.jpg''' will be stored in a "images" sub-directory of the upload directory and is used as the background image for web pages.
#**There is nothing to stop you creating your own "picture.jpg" (instead of uploading the supplied one) and then Cumulus web pages will use that for the background image on each page.
#*Similarly '''\CumulusMX\webfiles\js\cumuluscharts.js''' needs to be stored in a "js" sub-directory of your upload directory (this is the script that allows you to change the chart shown on the trends page and uses the appropriate json file to populate it with data).
# The "lib" sub-folder contains further levels of sub-folders all to be replicated on your web site.
# The '''trends.htm''' web page also loads some library software from an internet Content Delivery Network (cdn) to invoke the JavaScript based Highstocks library.
 
== Changing from Cumulus 1 to MX ==
5,838

edits

Navigation menu