Category:Cumulus MX: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m
 
== The Data Log Viewing and Editing interface ==
 
[[File:Data Logs Options.png|right|800px]]
The '''Data logs''' tab in the admin interface, as shown in image to right (which is taken from an experimental version, the released version of mXMX has different headings), gives access to screens that can display the contents of [[Monthly3 logtypes files|Detailedof log files for any month]] with menu item '''Data logs''' (yes same name as tab), the [[Extra Sensor Files|Extra Sensor Log Files]] with menu item '''Extra Data Logs''', and the [[Dayfile.txt|daily summary log (dayfile.txt)]] with menu item '''Dayfile'''.:
#The [[Standard log files|standard log file]]; there is one of these for each month - choose menu item '''Data logs''' (yes same name as tab)
#The [[Extra Sensor Files|Extra Sensor log File]]; there is one of these for each month - choose menu item '''Extra Data Logs'''
#The [[Dayfile.txt|Daily Summary log file]]; there is only one of these - choose menu item '''Dayfile'''
 
=== General points common to web pages for editing standard and extra sensor logs ===
All screens use the datatables library to access the application programme interface (api) generated by MX for representing the selected log file, and to produce the formatted output that you see. In the api the schema used is based on that defined in the version of MX you are running, with nulls added for any fields in the current schema, but not in the schema when the line being read was created.
 
'''For the first two web pages, but not the daily summary log web page:'''
Version 3.6.1 changes the wording on the pop up dialogs for editing a single row; Earlier versions used "Close", "Edit" buttons. Later versions use the more meaningful "Cancel" and "Save" buttons respectively for '''Edit''' on main screen. All versions use "Cancel" and "Delete" respectively on the pop up dialog when selecting "Delete" on main screen. The new terminology takes precedence in the following sub-sections.
*On this screen,you see a box for selecting the log you want to display. The default month and year (shown on loading the web page) is taken from yesterday's date. No log is loaded at start up. You can '''either''' type in a period (one or two digit representing month, then hyphen, then four digits representing year) '''or''' select year then click month in the data picker (this is produced by the bootstrap software MX uses, it is not the date picker provided by your browser), when you click on the month the box is updated with selected period.
* Next to it is a "Load" button. Press it and the Cumulus MX engine will generate an application programming interface (api) table taken from the log file selected and it is sent in dataTables software format to the web page. There is a "Refresh" button, for when you want that api to refresh the table (without reloading the whole page).
 
=== Web page for editing daily summary log only ===
<big>WARNING: In any of the log files, if you choose to Edit a row, when you then save it, if that row that was originally shorter because it was created by an earlier version, MX will have generated nulls for the extra fields, thus datatables will store the row with the length defined in the MX version you are now using, so extra commas (and any values you set) will be added to end of just any line that has been edited, leaving other lines in the log file unchanged in length.</big>
 
There is no need to select this log, the Cumulus MX engine will generate an application programming interface (api) table containing the whole log file and it is sent in dataTables software format to the web page. There is a "Refresh" button, for when you want that api to refresh the table (without reloading the whole page).
=== Data logs ===
 
 
*This screen can be used to display any monthly log file in the '''CumulusMX/data''' folder.
=== General points common to all 3 web pages for editing all logs ===
*None are displayed until you select date (defaults to current month) and click '''Load'''.
 
*The selector will find any file in the folder, including those those for dates before when MX believes is earliest date (StartDate= xxxx, in Cumulus.ini). The only proviso is that the file naming must obey that currently defined in the current locale supplied to MONO (or defined in Control Panel for Windows operating system).
'''For all 3 web pages'''
*When you select a line, two buttons are enabled:
*#'''Edit a line''' - rather obviously brings up a dialog (known as modal by the '''altEditor''' software that generates it) showing all fields and letting you change the contents of most individual fields. Scroll down and in the footer are two buttons:
*#'#''Save edit'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 first 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
*#'''Delete a line''' - rather obviously brings up a dialog (known as modal by the '''altEditor''' software that generates it) showing all fields. Scroll down and in the footer are two buttons:
*##''Delete'' will send the existing line back to the MX engine where the log file is then read into an array, and deletes the relevant array element whose date matches the line received. At present, MX software in the engine does not check the times match! 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'''. You can close this dialog in 3 ways:
*##clicking that Close button
*##Clicking the small '''x''' at the top right
*## Clicking anywhere outside the dialog
 
'''Be aware'''
* The api expects the log file to contain all the fields defined in the version of MX that is being used.
*Lines in the log files created by earlier versions of Cumulus (Cumulus 1 or MX) may have fewer fields
*Since the dataTables representation seen in the web page is not the actual log, any missing fields will show as blanks in that table and in the edit or delete dialogs.
*If you do edit a line, and then '''Save edit''' that particular line (but no others in the log file) will change its length to that used by the current version and you will see additional trailing field separators (commas, semicolons, or whatever defined for your locale) in that line making it seem different from its neighbours.
 
=== Data logs ===
 
For full information on how to use this screen, please see [[Standard_log_files#Accessing_standard_log_file_in_admin_interface_of_Cumulus_MX|Standard_log_files article]].
=== Dayfile ===
 
There is nothing to add to what has already been said.
For displaying and editing the dayfile.txt file. Like the others, highlight any one row and the ''datatables'' software used here will offer '''Edit a line''' and '''Delete a line''' buttons that operate on that row.
 
Since the dataTables format information is provided via an api (same process as for other log files above) you are not actually viewing the daily summary log directly; and therefore you do not need to worry about any locking conflicts.
 
*Note, when you click the '''Edit a line''' button, it pops up a window that shows all the fields (in the highlighted row) vertically.
*Having edited any fields, scroll down to the footer where there 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 first api.
*#'''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
 
 
with cancel (previously "close") and save (previously "edit" or "edit row") buttons visible when you scroll down. It does not show any values from any other files. MX does not provide within this screen any way to read the monthly data logs for a particular day and recalculate the value to place in any field of this dayfile log. In the future it is possible that there might be a separate executable, outside the admin interface that could do this (similar to separate executable mentioned for MySQL functionality, later on this page), but at the time of writing that is no more than a possible very low priority project with the developer.
 
== Changing Settings ==
5,838

edits

Navigation menu