5,838
edits
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.
*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
*##''Save
*#'''
*##clicking that Close
*##Clicking the small '''x''' at the top right
*## Clicking anywhere outside the dialog
*#'''Delete
*##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.
*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.
=== Data logs ===
|
edits