Category:Cumulus MX: Difference between revisions

m
The application programming interface only takes a copy of just 10 (or less if not all ten available) lines from log file and sends those to the admin interface.
 
The '''Refresh''' button will get the 10 lines currently displayed from the MX engine again. Useful if the log file is being updated by another process, or you wisely took a back up before you started editing, you have mucked up the editing, so you replace the original file with the backup and this button gets you access to the ten lines from that replaced copy. For the dayfile.txt, of course MX does a backup for you every day, so you could use that to replace a mucked up edit.
 
The dataTables software that shows the log on the web page includes pagination. TenThe full (up to) ten lines received from the Cumulus MX engine are shown at a time.
*There is an icon to move to first page
*An icon to move to previous page (if there is an earlier page)
*An icon to move to next page (if there is a later page)
*There is an icon to move to last page
 
When you choose another page, the api has to fetch the (up to) 10 lines for that page. These replace the dataTables insert you saw before
 
 
*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'' 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 dialogCloseg'''. 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:
*##The second ''Delete'' button on the modal will send the existing line back to the MX engine where the log file is then read into an array, and next MX 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
* 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
*The way that MX has been written is inconsistent in the way it deals with fields that MX now expects but at the time that log line was created did not exist. When adding the missing fields, some are added with empty string as content and some are added with a single space as content. When the editing modal is opened it will display placeholder text where a missing field is empty, but if you don't see that, there is a space that you can't see, but may well muck up any number you want to enter there.
*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 of MX 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. Again you may spot that inconsistency in content.
 
'''When you try to ''SaveEdit'' remember''' there is validation built into individual fields. This tells your browser if a minus sign is allowed or not, it defines how many integer digits are allowed and if a decimal comma (or decimal point) and one or two decimal places are allowed. If a field has the wrong format (and some fields have to cope with various units with different digit patterns), then a message will (only) be shown for the first field in error, and that field must be corrected before the save will work (alternatively close the dialog).
 
=== Data logs ===
5,838

edits