influxdata / influxdata/chronograf

Alert rule validation does not accept valid template {{ .Time.Local.Format "15:04:05 MST" }}

Open
#6,005 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.6k
Forks
250
Avg merge
1d 3h
Merged PRs (30d)
9

Description

Chronograf version: 1.10.0
Installation method: docker image chronograf:1.10 from docker hub
Related issues: https://github.com/influxdata/chronograf/issues/5090, https://github.com/influxdata/chronograf/issues/5137, https://github.com/influxdata/chronograf/issues/5343
Related PRs: https://github.com/influxdata/chronograf/pull/5516

This is a re-opening of https://github.com/influxdata/chronograf/issues/5343, which was reported by commit de96add6719c71e2acfd56036e7273224bc218d2 in fixed in 1.8.5 through https://github.com/influxdata/chronograf/pull/5516.

__Steps to reproduce:__
List the minimal actions needed to reproduce the behavior.

1. In the Alert message template use
```
Doorbell {{ .Time.Local.Format "15:04:05 MST" }}
```

__Expected behavior:__
I expect validation to pass.

__Actual behavior:__
Validation fails with message "Please correct templates in alert message."

__Environment info:__

* Chronograf version: 1.10.0

Other versions are probably not relevant, as the verification occurs without consulting external components in https://github.com/influxdata/chronograf/blob/406065e391633812d378fd644cb2ef8922020dfd/ui/src/kapacitor/utils/alertMessageValidation.ts#L63

__Config:__
Does not seem relevant. I can provide this if it is.

__Logs:__
No relevant log entries.

Contributor guide

Open the contributing guide

Research direction

Start in ui/src/kapacitor/utils/alertMessageValidation.ts at line 63, where the alert message template is validated. Reproduce the failure with `Doorbell {{ .Time.Local.Format "15:04:05 MST" }}` and compare the validation behavior with the related issues and PR mentioned. Done means this valid template passes validation without the correction error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.