Skip to content

Commit

Permalink
Filter Alerts - Omit Throttle Time and Throttle Field when not present (
Browse files Browse the repository at this point in the history
  • Loading branch information
fjerlov-cs authored Jul 10, 2024
1 parent 5189483 commit b24a1e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/filter-alerts.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type FilterAlert struct {
Enabled bool `graphql:"enabled" yaml:"enabled" json:"enabled"`
QueryOwnershipType string `graphql:"queryOwnership" yaml:"queryOwnershipType" json:"queryOwnershipType"`
ThrottleTimeSeconds int `graphql:"throttleTimeSeconds" yaml:"throttleTimeSeconds,omitempty" json:"throttleTimeSeconds,omitempty"`
ThrottleField string `graphql:"throttleField" yaml:"throttleField,omitempty" json:"throttleField"`
ThrottleField string `graphql:"throttleField" yaml:"throttleField,omitempty" json:"throttleField,omitempty"`
RunAsUserID string `graphql:"runAsUserId" yaml:"runAsUserId,omitempty" json:"runAsUserId,omitempty"`
}

Expand Down
8 changes: 4 additions & 4 deletions api/internal/humiographql/filter-alerts.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ type CreateFilterAlert struct {
ActionIdsOrNames []graphql.String `json:"actionIdsOrNames"`
Labels []graphql.String `json:"labels"`
Enabled graphql.Boolean `json:"enabled"`
ThrottleTimeSeconds Long `json:"throttleTimeSeconds"`
ThrottleField graphql.String `json:"throttleField"`
ThrottleTimeSeconds Long `json:"throttleTimeSeconds,omitempty"`
ThrottleField graphql.String `json:"throttleField,omitempty"`
RunAsUserID graphql.String `json:"runAsUserId,omitempty"`
QueryOwnershipType QueryOwnershipType `json:"queryOwnershipType"`
}
Expand All @@ -44,8 +44,8 @@ type UpdateFilterAlert struct {
ActionIdsOrNames []graphql.String `json:"actionIdsOrNames"`
Labels []graphql.String `json:"labels"`
Enabled graphql.Boolean `json:"enabled"`
ThrottleTimeSeconds Long `json:"throttleTimeSeconds"`
ThrottleField graphql.String `json:"throttleField"`
ThrottleTimeSeconds Long `json:"throttleTimeSeconds,omitempty"`
ThrottleField graphql.String `json:"throttleField,omitempty"`
RunAsUserID graphql.String `json:"runAsUserId,omitempty"`
QueryOwnershipType QueryOwnershipType `json:"queryOwnershipType"`
}

0 comments on commit b24a1e9

Please sign in to comment.