chronograf icon indicating copy to clipboard operation
chronograf copied to clipboard

Simplify places in UI to specify a time period.

Open nathanielc opened this issue 10 years ago • 4 comments

Currently in the UI there are a total of 5 places a user can specify a time duration.

  1. As the Group by time for an aggregate function on a field
  2. As the during the last X for a threshold alert
  3. As the over X for relative alerts
  4. As the compared to X before for the relative alerts
  5. As the Create an alert if data is missing for X in 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 the compared to X before(4) option. Again the group by time is 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 the group 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.

  1. image
  2. image
  3. image
  4. image
  5. image

nathanielc avatar Nov 09 '16 17:11 nathanielc

@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 X only when there are aggregate functions
  • relative: ignore groupby time and use over X only 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.

goller avatar Nov 09 '16 17:11 goller

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 avatar Nov 17 '16 18:11 willpiers

@willpiers server is currently ignoring groupby for deadman

goller avatar Nov 17 '16 20:11 goller

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.

nhaugo avatar Jan 05 '17 00:01 nhaugo