Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(pkger): add parser support for notification rules #16297

Merged
merged 1 commit into from
Dec 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

### Features

1. [16234](https://github.com/influxdata/influxdb/pull/16234): add support for notification endpoints to influx templates/pkgs.
2. [16242](https://github.com/influxdata/influxdb/pull/16242): drop id prefix for secret key requirement for notification endpoints
3. [16259](https://github.com/influxdata/influxdb/pull/16259): add support for check resource to pkger parser
4. [16262](https://github.com/influxdata/influxdb/pull/16262): add support for check resource dry run functionality
5. [16275](https://github.com/influxdata/influxdb/pull/16275): add support for check resource apply functionality
6. [16283](https://github.com/influxdata/influxdb/pull/16283): add support for check resource export functionality
1. [16234](https://github.com/influxdata/influxdb/pull/16234): Add support for notification endpoints to influx templates/pkgs.
2. [16242](https://github.com/influxdata/influxdb/pull/16242): Drop id prefix for secret key requirement for notification endpoints
3. [16259](https://github.com/influxdata/influxdb/pull/16259): Add support for check resource to pkger parser
4. [16262](https://github.com/influxdata/influxdb/pull/16262): Add support for check resource dry run functionality
5. [16275](https://github.com/influxdata/influxdb/pull/16275): Add support for check resource apply functionality
6. [16283](https://github.com/influxdata/influxdb/pull/16283): Add support for check resource export functionality
1. [16212](https://github.com/influxdata/influxdb/pull/16212): Add new kv.ForwardCursor interface
1. [16297](https://github.com/influxdata/influxdb/pull/16297): Add support for notification rule to pkger parser

### Bug Fixes

Expand Down
8 changes: 4 additions & 4 deletions pkger/clone_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ func checkToResource(ch influxdb.Check, name string) Resource {
assignBase := func(base icheck.Base) {
r[fieldQuery] = base.Query.Text
r[fieldCheckStatusMessageTemplate] = base.StatusMessageTemplate
assignFluxDur(fieldCheckEvery, base.Every)
assignFluxDur(fieldCheckOffset, base.Offset)
assignFluxDur(fieldEvery, base.Every)
assignFluxDur(fieldOffset, base.Offset)
var tags []Resource
for _, t := range base.Tags {
if t.Valid() != nil {
Expand All @@ -112,7 +112,7 @@ func checkToResource(ch influxdb.Check, name string) Resource {
assignBase(cT.Base)
assignFluxDur(fieldCheckTimeSince, cT.TimeSince)
assignFluxDur(fieldCheckStaleTime, cT.StaleTime)
r[fieldCheckLevel] = cT.Level.String()
r[fieldLevel] = cT.Level.String()
assignNonZeroBools(r, map[string]bool{fieldCheckReportZero: cT.ReportZero})
case *icheck.Threshold:
r[fieldKind] = KindCheckThreshold.title()
Expand All @@ -127,7 +127,7 @@ func checkToResource(ch influxdb.Check, name string) Resource {
}

func convertThreshold(th icheck.ThresholdConfig) Resource {
r := Resource{fieldCheckLevel: th.GetLevel().String()}
r := Resource{fieldLevel: th.GetLevel().String()}

switch realType := th.(type) {
case icheck.Lesser:
Expand Down
Loading