Standard log files: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
 
 
==== DerivedNo Fieldsconflict ====
 
It must be remembered that the standard log file contains some fields that are directly read from your weather station and some that are derived from those readings. Consequently, the web page for viewing and editing the standard log file introduces some new terminology when you attempt to edit a line. It talks about '''Source Fields''' and these are:
#Temperature
#Humidity
#Wind speed
#Rainfall so far
 
If you alter the value for one or more of those ''Source Fields'', then there is a need to make consequent change to some of these '''Derived Fields''':
*Dew point
*Wind chill
*Apparent temperature
*Heat index
*Humidex
*Rain counter (how this is determined depends on type of weather station)
*Feels like temperature
 
The script used for this web page reacts to any edit in any source reading fields and flags which derived reading fields need to be reviewed. Unfortunately different versions of Cumulus may use different formulas, so the script will calculate all possible values and initially allow you to manually choose which one to use. If you view the same line a second time, the script will automatically read all source fields and automatically insert in derived fields the value that the latest version of MX calculates. On this second viewing the original and alternatively calculated values are shown so you can manually override the automatically populated values.
 
=== Pagination ===
 
When you select a month (and year) for the monthly log file that you want to view, that is sent back to the MX engine. It sends back via an application programming interface (API) the first 10 lines (fewer if there are less lines available) only.
 
At the same time, that API generates the pagination selector shown below the table. This consists of the word "First" to move to first page, the word "Previous" to move to previous page, a list of '''some''' page numbers to select directly (this will let you know how many pages there are as first and last are always shown, plus some in middle), the word "Next" to move to next page, and the word "Last" to move to last page.
 
If you select another page, by any selector, the API sends you ten lines (fewer if less available) for the selected page. Note that the line numbers shown will obviously change, page 4 for example shows lines 31 to 40.
 
=== Deleting or Editing a line ===
 
The images and text shown here do not represent the functionality available in MX version 3.4.5 when the ability to view and edit this log file was introduced to MX. That version and many subsequent versions work the same way as described below for deleting a line (although button naming has varied in different versions). But for editing a line, this original functionality included no validation of any input fields, so almost any rubbish could be typed in, and made no check for consistency, so you could edit one value without being reminded of its possible effect on other values.
 
At the time of writing, additional functionality is being prepared for build 3084 of MX, and the images shown are from the beta for this version, with the text reflecting that version. If the live version is different from the beta, this article will be updated.
 
The additional functionality adds validation of all inputs, checking number of digits, and prevents the minus sign or decimal places being inserted in fields that do not accept them. It also helps you to achieve consistency between fields by highlighting the effect on derived values of edits you make to source values. It then gives you the choice between manually making the extra edits or asking the web page to automatically make the adjustments for you.
 
Both the old functionality, and the newer functionality only work on a single log line at a time; there is no intention to provide bulk updating of lines.
 
==== The Edit Modal ====
 
When you select a line, you are in the dataTables software, but the AltEditor software now kicks in activating what it calls a '''Modal'''. For our purposes, it is probably more friendly to describe it as three buttons seen above the table, and two pop up dialogs initially sitting hidden at bottom of the web page.
 
Before you select the line, only the '''Refresh''' button is enabled. That basically just reloads the dataTables part of the web page without a need to reload the whole web page.
 
Whenever you select a line, the other two buttons (for editing that line and for deleting that line) are enabled:
*'''Edit a line''' button - clicking this reveals the dialog with a HTML form
** In this HTML form there are labels and input fields.
** These labels and inputs will now be filled with text, this includes the current contents of each field in the line (where these appear depends on whether this is first or second edit of the line as described below)
**Scroll down and you will see some footnotes.
** Below those footnotes in the footer are two buttons:
*#''Save Edit'' will send the edited line back to the MX engine where the log file is then read into an array, and the relevant array element is replaced by the line received. After that the log file is overwritten from the amended array. After that the log file as a whole is converted back to dataTables format and returned by the api that delivered the table originally.
*#''Close dialog''. You can close this dialog in 3 ways:
*##clicking that Close dialog button
*##Clicking the small '''x''' at the top right
*## Clicking anywhere outside the dialog
** How to use this for editing a line does deserve a full description in the following sections, although the interface is such you can probably work out what to do without reading what follows!
*'''Delete a line''' button - clicking this reveals a dialog where the current contents of each field will be added as a simple list
**Scroll down to the footer and find two buttons:
*#'''Delete''' - that confirms that you want the api to send back to the mX engine a message delete this line
*#'''Close dialog'''. You can close this dialog in 3 ways:
*##clicking that Close dialog button
*##Clicking the small '''x''' at the top right
*## Clicking anywhere outside the dialog
** There is no need to say any more about deleting a line, as the functionality in MX version 3.4.4 remains the same in the latest version. There has been some renaming of the buttons that appear at bottom of delete modal at certain versions, the buttons names started with default names used by the AltEditor software, but have been improved in response to user feedback.
 
 
==== First time you view a line to edit ====
 
*The first time you bring up the edit modal, it shows all the fields with exactly the same content as was in the line you selected.[[File:Edit stnd log line.png|right]]
*All the fields have the content converted to strings for display purposes. This allows the display of the contents whether a decimal point or a decimal comma is used for those fields where decimal places are permitted
*A few fields are read only:
*#The line number cannot be changed as this is part of how the MX engine recognises the line when the edit is saved and sent back via an application programming interface.
*#The date and time cannot be changed as they record when the readings were made. This editor is not designed to deal with clock problems, the time the line was created was taken from system time so there should not be a problem
*#The rain counter cannot be amended. It is only relevant when MX is actually processing the meteorological day with the rain counter, and you are not advised to change the rain counter for the current day using this web page. Instead got to '''Edit''' tab and choose ''Today's rain'' and that will edit the rain counter correctly.
*Some fields show a '''‡''' which links to a footnote at the bottom of the fields.
**These are source fields, and were listed earlier.
*Some fields have a line below the field box saying something like: <tt>Derived: heat index=12.1 (humidex=7.4)</tt>
**These derived fields were also listed earlier.
**This added line shows what is the calculated value for the box above (and in this particular case an alternative derived value)
**If there are decimal places, the way the value is shown should use a decimal comma if you use a decimal comma, and a decimal point otherwise.
**You can check whether this number (12.1 in this case) agrees with the value in the box.
 
'''Feels Like Temperature'''
 
This was not available in MX at versions below 3.5.4 (released 25 Apr 2020) build 3075. When you view an earlier log for all lines, this field will be blank. After that release was installed your standard logs will have this field set in every line.
 
When you bring up a line to edit for the first time, two figures will be shown below the input field (regardless of whether it is empty or already populated). The first figure (not having round brackets round it) is the figure calculated in the way it was done at version 3.5.4, and still being done at version 3.6.7 (build 3083). The second figure (surrounded by round brackets) is how the developer now believes it should be calculated.
 
==== If you change the value in one or more source field(s) ====
 
[[File:Edit stnd log line(field change).png|right]]
If you alter the number shown in the input box for one of the fields marked with a '''‡''', then any derived fields that are calculated using that source will be recalculated and you will see a message like the one shown in the screen shot: <tt>Humidity change=> 12.8</tt> which appears a few fields down from the top.
 
Where altering a particular source does not change a particular derived value, it will continue to say something like: <tt>Derived: 13.5 ºC</tt> as you can see much further down in the image to right.
 
[[File:Edit stnd log line scrolldown.png|left|500px]]
These messages below the input boxes for derived values, will be seen to change again if you then edit another source field. Now you can understand why on this dialog, the values read in from the existing line stay in the input boxes where you have not made an edit. There is no point in making the updates to the derived value fields permanent until you have finished editing the source fields. Consequently, when you have finished your edits to the source fields, you will see a prompt at the bottom of the screen (see image to left) suggesting you can manually change the derived values to the values shown below those input fields, before you click '''Save edit'''.
 
If you don't want to edit all the derived fields manually, there is an alternative approach also mentioned in the footnotes in image on left, and the next section describes that alternative.
 
==== Second time you edit same line ====
The image on the left reflects when you have edited one or more source fields in the first edit of that line, at this stage the derived field input boxes still contain their original values and the recalulated numbers are still being shown below. As it says when you scroll down to click '''Save edit''', there is an OR option. Here are the instructions for that alternative option:
#Subsequently, click that '''Save edit''',
#wait for ''Success'' information message to appear,
#then check which line number is shown at top of dialog.
#Next close the dialog in one of the three ways described earlier.
#Finally, select that same line number and click '''Edit a row''' for a second time, you now have the same line displayed, but in a different way.
 
You will be seeing something like the image on the right. [[File:Edit stnd log line2ndTime.png|right|600px]]
*You will see that the values that were shown as derived values (under the input boxes) on the first edit are now automatically placed in those input boxes for this second edit.
*And the values that were shown previously in those input boxes (after any edits) have been moved below the boxes and shown like this: <tt>Previously: 13.6</tt>
*Everyone of those derived value input boxes has an additional message to make it clear what has been done <tt>Automatically updated to derived value</tt>
*If you look closely at the image you can see for some fields a difference between the values that were previously saved to the line and the values that are now to be saved when the '''Save edit''' button is clicked for second time to finish making all values in this log file line consistent.
 
'''Dew point temperature'''
 
When you bring up a line to edit for the second time, the dew point input field will be populated with the figure calculated in the way it is done in MX, but the Cumulus 1 value is no longer shown, all that is shown below is the previous value.
 
 
'''Feels Like temperature'''
 
When you bring up a line to edit for the second time, the feels like input field will be populated with the figure calculated in the way it is calculated from build 3084.
 
The first figure shown below the input field is the previous value (regardless of whether it was empty or already populated). The second figure (surrounded by round brackets) is how
was done from version 3.5.4, to version 3.6.7 (build 3083), as you have the option to change to that.
 
=== Problems ===
 
Because the dataTables version of the log seen on this web page in the admin interface, is not the actual log being used by the MX "engine", there can be no conflicts on access and this way of editing log files is just as safe for the current log as for past logs.
5,838

edits

Navigation menu