In `pydash_app.dashboard.services.fetching`: - [ ] Check if result of `/get_json_monitor_rules` is formatted correctly: - [ ] The top level structure is an array - [ ] The array contains objects that adhere to the right structure: - `endpoint`: string - `last_accessed`: date string, formatted as `%Y-%m-%d %H:%M:%S.%f` (`yyyy-mm-dd hh:mm:ss.micro`) OR the string `'None'` - `monitor`: boolean - `time_added`: date string, formatted as `%Y-%m-%d %H:%M:%S.%f` (`yyyy-mm-dd hh:mm:ss.micro`) - `version_added`: string - [ ] Check if result of `/get_json_data` is formatted correctly: - [ ] The top level structure is an array - [ ] The array contains objects that adhere to the right structure: - `endpoint`: string - `execution_time`: float - `time`: date string, formatted as `%Y-%m-%d %H:%M:%S.%f` (`yyyy-mm-dd hh:mm:ss.micro`) - `version`: string - `group_by`: string - `ip`: string In order to test this, we can try serving the following data from a remote dashboard: - [ ] Malformed structure from `/get_json_monitor_rules`: - [ ] Top level structure not an array - [ ] Endpoint objects with missing elements - [ ] Endpoint objects with wrongly formatted elements (for example: int instead of string, wrongly formatted date/time) - [ ] Malformed structure from `/get_json_data`: - [ ] Top level structure not an array - [ ] Endpoint call objects with missing elements - [ ] Endpoint call objects with wrongly formatted elements
In
pydash_app.dashboard.services.fetching:/get_json_monitor_rulesis formatted correctly:endpoint: stringlast_accessed: date string, formatted as%Y-%m-%d %H:%M:%S.%f(yyyy-mm-dd hh:mm:ss.micro) OR the string'None'monitor: booleantime_added: date string, formatted as%Y-%m-%d %H:%M:%S.%f(yyyy-mm-dd hh:mm:ss.micro)version_added: string/get_json_datais formatted correctly:endpoint: stringexecution_time: floattime: date string, formatted as%Y-%m-%d %H:%M:%S.%f(yyyy-mm-dd hh:mm:ss.micro)version: stringgroup_by: stringip: stringIn order to test this, we can try serving the following data from a remote dashboard:
/get_json_monitor_rules:/get_json_data: