Merge pull request #14863 from influxdata/fix/http-rules

fix(notification/rule): remove name from notify call
pull/14883/head
Michael Desa 2019-08-30 09:59:59 -04:00 committed by GitHub
commit bf28f6e771
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -63,7 +63,6 @@ func (s *HTTP) generateFluxASTNotifyPipe() ast.Statement {
endpointFn := flux.Function(flux.FunctionParams("r"), flux.Object(endpointProps...))
props := []*ast.Property{}
props = append(props, flux.Property("name", flux.String(s.Name)))
props = append(props, flux.Property("data", flux.Identifier("notification")))
props = append(props, flux.Property("endpoint",
flux.Call(flux.Identifier("endpoint"), flux.Object(flux.Property("mapFn", endpointFn)))))

View File

@ -29,7 +29,7 @@ statuses = monitor.from(start: -1h, fn: (r) =>
(r.foo == "bar" and r.baz == "bang"))
statuses
|> monitor.notify(name: "foo", data: notification, endpoint: endpoint(mapFn: (r) =>
|> monitor.notify(data: notification, endpoint: endpoint(mapFn: (r) =>
({data: json.encode(v: r)})))`
s := &rule.HTTP{