Merge pull request #14863 from influxdata/fix/http-rules
fix(notification/rule): remove name from notify callpull/14883/head
commit
bf28f6e771
|
@ -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)))))
|
||||
|
|
|
@ -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{
|
||||
|
|
Loading…
Reference in New Issue