Files Dashboard

From ecology
Revision as of 14:19, 29 June 2012 by Andera (talk | contribs)
Jump to: navigation, search

The files dashboard is a web page to get an overview of the raw data files of trackers. For a chosen project and a date interval, it displays a table with a row for every day within the date interval and a column for every tracker that belongs to the project.

Each cell from the table will then contains information for the files of that tracker for that day; in principle, one box for each file. And usually, no more than one file per day. The purpose is to have information at a glance, so if there are no files for a tracker for one day, an empty box is to be shown.

Three pieces of information are to be shown for each file:

  • Whether a file exists for a given day and tracker
  • How big the file is
  • Whether errors happened during parsing of its contents

User manual

If you've got access to the 'services' machine, you should be able to use your login/password and access the url: https://services.flysafe.sara.nl/uvabits/projectadmin/trackersdashboard

The url takes 3 parameters, that you can fill in by hand, like: ...?projectId=2&startDay=20120401&endDay=20120430

Parameters

projectId
is the Identifier of the Project that you want to query (currently we have only from 1 to 17)
startDay
is the first day you want to request in format yyyyMMdd, where
  • yyyy is the 4-digit year (e.g. 2012)
  • MM is the 2-digit month within the year (e.g. 05 for May)
  • dd is the 2-digit day of the month (e.g. 01 for the first day of the month)
endDay
is the last day you want included in the report, with the same format as the startDay

Note: The parameters are separated from the resource url by the standard HTTP symbol (a question mark, so '?'), and they are separated from each other by the standard HTTP parameter separator (the ampersand, so '&').

This has a number of advantages. Among others, you can make a bookmark of a specific report.

If a projectId fails to appear on the url, no project will be selected and therefore a message stating that no data has been found will be shown.

If the dates fail to make sense, then the current date will be selected by default.

Interaction

To easily select the parameters, the web page shows a bar at the top, with a couple of shortcuts

  • for months (namely, the current month as the last in the list, and then 11 months in advance), which set the startDay and endDay parameters appropriately
  • for projects (there's a dropdown list of all the project names; the request is sent to change the project by clicking on the submit button to the right of the list).

Files processing

Raw tracking data comes into the system sent as plain text files through a Dropbox account. Dropbox makes the files available in the server file system.

File properties

Once accessible through the local file system, they can be queried, read and parsed to extract the tracking information they contain.

The file name is expected to have the form Log_0533_13042012_xx.txt. This provides:

The tracker number
(in the example, 533)
The reported date
(in the example, April 13th 2012)


Apart from the name, the file has other attributes that the file system provides. Namely:

last modification date
tells when something was modified in the file for the last time.
Size
how big the file contents are