If EventStatus returned by the NRQL query is not equal to "None", "Critical" or "Warning" the app will crash.
Description
If EventStatus is equal to "SUCCESS" or "FAILED", the app will crash. This should be handled gracefully.
Two options are possible here (option 2 is preferable):
1- Any EventStatus should be transformed into "None" if EventStatus coming from the query not in:
2- Do not hardcode the severity object but ask the user what Critical is equal to ("FAILED" for example), what None=Ok is equal to ("SUCCESS" for example) and what Warning is equal to (all should be optional, if nothing is entered then use "None" always).
In addition, we have to implement option one above to prevent any crash if the user specify something that is not equal to the EventStatus coming from the query.
Steps to Reproduce
Create a NRQL status page using this query: FROM SyntheticCheck SELECT monitorName as EventName, result as EventStatus, timestamp as EventTimeStamp limit 5
The query will return this table:
the application will crash because of this error "cannot read property 'tolowercase' of undefined"
If EventStatus returned by the NRQL query is not equal to "None", "Critical" or "Warning" the app will crash.
Description
If EventStatus is equal to "SUCCESS" or "FAILED", the app will crash. This should be handled gracefully. Two options are possible here (option 2 is preferable): 1- Any EventStatus should be transformed into "None" if EventStatus coming from the query not in:
(snippet above from nrql.js).
2- Do not hardcode the severity object but ask the user what Critical is equal to ("FAILED" for example), what None=Ok is equal to ("SUCCESS" for example) and what Warning is equal to (all should be optional, if nothing is entered then use "None" always). In addition, we have to implement option one above to prevent any crash if the user specify something that is not equal to the EventStatus coming from the query.
Steps to Reproduce
Create a NRQL status page using this query:
FROM SyntheticCheck SELECT monitorName as EventName, result as EventStatus, timestamp as EventTimeStamp limit 5
The query will return this table:the application will crash because of this error "cannot read property 'tolowercase' of undefined"