Simplify places in UI to specify a time period.
Currently in the UI there are a total of 5 places a user can specify a time duration.
- As the
Group by timefor an aggregate function on a field - As the
during the last Xfor a threshold alert - As the
over Xfor relative alerts - As the
compared to X beforefor the relative alerts - As the
Create an alert if data is missing for Xin deadman alerts
Screenshots of each of these can be found below.
Of these 5 only 3 are needed. 1 is the same as both 2 and 3.
In summary each of the alert types should be as follows:
- the threshold alert should only have the option to select the
group by time(1) if an aggregate function is picked, otherwise it has no meaning. - the relative alert should have the
group by time(1) option as well as thecompared to X before(4) option. Again thegroup by timeis only needed if an aggregate function was selected. - the deadman alert is different. It should only have the
Create an alert if data is missing for X(5) option. It should not even have thegroup by time(1) option. This is because the existance of data has nothing to do with the result of an aggregate function. So the deadman field selection should not allow an aggregate function to be selected.
Hopefully that is clear what should change.
In short remove 2 and 3 and prevent the selection of 1 in the deadman mode.
Screenshots of current UI elements in case it wasn't clear what each one was.
@nathanielc these changes make sense to me
Currently, the backend handles these issues in the following ways:
- threshold: ignore the groupby time and use
during last Xonly when there are aggregate functions - relative: ignore groupby time and use
over Xonly when there are aggregate functions - deadman: ignore group by time and use
Create an alert if data is missing
To handle @nathanielc 's changes above I'd need to modify the tickscript generator to respect groupby for threshold and relative while ignoring the over X and during last X
My current behavior for deadman is in-line already.
Removing the option labeled (1) for deadman would be a little tough. we could continue to allow it to be set in the UI and then just strip it from the query before sending it off, or the server can know to ignore it.
Removing (2) and (3) would be no problem
@willpiers server is currently ignoring groupby for deadman
I think this issue can be closed, we resolved the important ones that @nathanielc pointed out. The only remaining redundancy is in the deadman, which as @goller points out, only the "values" section matters anyway.
This is a bit confusing since we show the actual query in the "select a time series" section, if anything I think we should remove/hide that. If we decide that is a good idea I will open that under its own issue.




