Revert "Alerting: Add is_paused attr to the POST alert rule group endpoint" (#62310)

Revert "Alerting: Add is_paused attr to the POST alert rule group endpoint (#62253)"

This reverts commit 3ccafe3a5a.
pull/62401/head
George Robinson 2 years ago committed by GitHub
parent 846acd28ff
commit b6db1ed524
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      pkg/services/ngalert/api/api_ruler_validation.go
  2. 4
      pkg/services/ngalert/api/tooling/api.json
  3. 1
      pkg/services/ngalert/api/tooling/definitions/cortex-ruler.go
  4. 8
      pkg/services/ngalert/api/tooling/post.json
  5. 9
      pkg/services/ngalert/api/tooling/spec.json
  6. 4
      public/api-merged.json

@ -97,7 +97,6 @@ func validateRuleNode(
RuleGroup: groupName,
NoDataState: noDataState,
ExecErrState: errorState,
IsPaused: ruleNode.GrafanaManagedAlert.IsPaused,
}
newAlertRule.For, err = validateForInterval(ruleNode)

@ -2005,9 +2005,6 @@
],
"type": "string"
},
"is_paused": {
"type": "boolean"
},
"no_data_state": {
"enum": [
"Alerting",
@ -3498,6 +3495,7 @@
"type": "object"
},
"gettableAlert": {
"description": "GettableAlert gettable alert",
"properties": {
"annotations": {
"$ref": "#/definitions/labelSet"

@ -374,7 +374,6 @@ type PostableGrafanaRule struct {
UID string `json:"uid" yaml:"uid"`
NoDataState NoDataState `json:"no_data_state" yaml:"no_data_state"`
ExecErrState ExecutionErrorState `json:"exec_err_state" yaml:"exec_err_state"`
IsPaused bool `json:"is_paused" yaml:"is_paused"`
}
// swagger:model

@ -2005,9 +2005,6 @@
],
"type": "string"
},
"is_paused": {
"type": "boolean"
},
"no_data_state": {
"enum": [
"Alerting",
@ -3158,7 +3155,6 @@
"type": "object"
},
"URL": {
"description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use RawPath, an optional field which only gets\nset if the default encoding is different from Path.\n\nURL's String method uses the EscapedPath method to obtain the path. See the\nEscapedPath method for more details.",
"properties": {
"ForceQuery": {
"type": "boolean"
@ -3194,7 +3190,7 @@
"$ref": "#/definitions/Userinfo"
}
},
"title": "A URL represents a parsed URL (technically, a URI reference).",
"title": "URL is a custom URL type that allows validation at configuration load time.",
"type": "object"
},
"Userinfo": {
@ -3500,6 +3496,7 @@
"type": "object"
},
"gettableAlert": {
"description": "GettableAlert gettable alert",
"properties": {
"annotations": {
"$ref": "#/definitions/labelSet"
@ -3609,7 +3606,6 @@
"type": "object"
},
"gettableSilences": {
"description": "GettableSilences gettable silences",
"items": {
"$ref": "#/definitions/gettableSilence"
},

@ -4501,9 +4501,6 @@
"Error"
]
},
"is_paused": {
"type": "boolean"
},
"no_data_state": {
"type": "string",
"enum": [
@ -5890,6 +5887,7 @@
"$ref": "#/definitions/alertGroup"
},
"alertGroups": {
"description": "AlertGroups alert groups",
"type": "array",
"items": {
"$ref": "#/definitions/alertGroup"
@ -5995,6 +5993,7 @@
}
},
"gettableAlert": {
"description": "GettableAlert gettable alert",
"type": "object",
"required": [
"labels",
@ -6051,7 +6050,6 @@
"$ref": "#/definitions/gettableAlert"
},
"gettableAlerts": {
"description": "GettableAlerts gettable alerts",
"type": "array",
"items": {
"$ref": "#/definitions/gettableAlert"
@ -6059,7 +6057,6 @@
"$ref": "#/definitions/gettableAlerts"
},
"gettableSilence": {
"description": "GettableSilence gettable silence",
"type": "object",
"required": [
"comment",
@ -6109,7 +6106,6 @@
"$ref": "#/definitions/gettableSilence"
},
"gettableSilences": {
"description": "GettableSilences gettable silences",
"type": "array",
"items": {
"$ref": "#/definitions/gettableSilence"
@ -6300,6 +6296,7 @@
"$ref": "#/definitions/postableSilence"
},
"receiver": {
"description": "Receiver receiver",
"type": "object",
"required": [
"active",

@ -15561,9 +15561,6 @@
"Error"
]
},
"is_paused": {
"type": "boolean"
},
"no_data_state": {
"type": "string",
"enum": [
@ -18799,6 +18796,7 @@
}
},
"gettableAlert": {
"description": "GettableAlert gettable alert",
"type": "object",
"required": [
"labels",

Loading…
Cancel
Save