move integrations to separate integrations property
This commit is contained in:
committed by
Yuri Tseretyan
parent
927654a65d
commit
d75506cafe
@@ -1,7 +1,7 @@
|
||||
package v0alpha2
|
||||
|
||||
BaseIntegration: {
|
||||
uid?: string
|
||||
uid?: string
|
||||
disable_resolve_message?: bool
|
||||
}
|
||||
|
||||
@@ -12,237 +12,237 @@ BaseIntegration: {
|
||||
}
|
||||
|
||||
// A string that contain sensitive information.
|
||||
#Secret: #SecretString | #RedactedSecret
|
||||
#Secret: string
|
||||
|
||||
AlertmanagerIntegration: BaseIntegration & {
|
||||
url: string
|
||||
basicAuthUser?: string
|
||||
url: string
|
||||
basicAuthUser?: string
|
||||
basicAuthPassword?: #Secret
|
||||
}
|
||||
|
||||
DingdingIntegration: BaseIntegration & {
|
||||
url?: string
|
||||
msgType?: string
|
||||
title?: string
|
||||
message?: string
|
||||
url?: string
|
||||
msgType?: string
|
||||
title?: string
|
||||
message?: string
|
||||
}
|
||||
|
||||
DiscordIntegration: BaseIntegration & {
|
||||
url: #Secret
|
||||
title?: string
|
||||
message?: string
|
||||
avatar_url?: string
|
||||
url: #Secret
|
||||
title?: string
|
||||
message?: string
|
||||
avatar_url?: string
|
||||
use_discord_username?: bool
|
||||
}
|
||||
|
||||
EmailIntegration: BaseIntegration & {
|
||||
addresses: [...string]
|
||||
addresses: [...string]
|
||||
singleEmail?: bool
|
||||
message?: string
|
||||
subject?: string
|
||||
message?: string
|
||||
subject?: string
|
||||
}
|
||||
|
||||
GooglechatIntegration: BaseIntegration & {
|
||||
url: #Secret
|
||||
title?: string
|
||||
url: #Secret
|
||||
title?: string
|
||||
message?: string
|
||||
}
|
||||
|
||||
JiraIntegration: BaseIntegration & {
|
||||
api_url: string
|
||||
project: string
|
||||
api_url: string
|
||||
project: string
|
||||
issue_type: string
|
||||
|
||||
summary?: string
|
||||
description?: string
|
||||
labels?: [...string]
|
||||
priority?: string
|
||||
reopen_transition?: string
|
||||
resolve_transition?: string
|
||||
summary?: string
|
||||
description?: string
|
||||
labels?: [...string]
|
||||
priority?: string
|
||||
reopen_transition?: string
|
||||
resolve_transition?: string
|
||||
wont_fix_resolution?: string
|
||||
reopen_duration?: string
|
||||
dedup_key_field?: string
|
||||
fields?: {}
|
||||
reopen_duration?: string
|
||||
dedup_key_field?: string
|
||||
fields?: {}
|
||||
|
||||
user?: #Secret
|
||||
password?: #Secret
|
||||
user?: #Secret
|
||||
password?: #Secret
|
||||
api_token?: #Secret
|
||||
}
|
||||
|
||||
KafkaIntegration: BaseIntegration & {
|
||||
kafkaRestProxy: #Secret
|
||||
kafkaTopic: string
|
||||
kafkaTopic: string
|
||||
|
||||
description?: string
|
||||
details?: string
|
||||
username?: string
|
||||
password?: #Secret
|
||||
apiVersion?: string
|
||||
description?: string
|
||||
details?: string
|
||||
username?: string
|
||||
password?: #Secret
|
||||
apiVersion?: string
|
||||
kafkaClusterId?: string
|
||||
}
|
||||
|
||||
LineIntegration: BaseIntegration & {
|
||||
token: #Secret
|
||||
|
||||
title?: string
|
||||
title?: string
|
||||
description?: string
|
||||
}
|
||||
|
||||
#TLSConfig: {
|
||||
insecureSkipVerify?: bool
|
||||
caCertificate?: #Secret
|
||||
clientCertificate?: #Secret
|
||||
clientKey?: #Secret
|
||||
insecureSkipVerify?: bool
|
||||
caCertificate?: #Secret
|
||||
clientCertificate?: #Secret
|
||||
clientKey?: #Secret
|
||||
}
|
||||
|
||||
MqttIntegration: BaseIntegration & {
|
||||
brokerUrl?: string
|
||||
clientId?: string
|
||||
topic?: string
|
||||
message?: string
|
||||
brokerUrl?: string
|
||||
clientId?: string
|
||||
topic?: string
|
||||
message?: string
|
||||
messageFormat?: string
|
||||
username?: string
|
||||
password?: #Secret
|
||||
qos?: int64
|
||||
retain?: bool
|
||||
tlsConfig?: #TLSConfig
|
||||
username?: string
|
||||
password?: #Secret
|
||||
qos?: int64
|
||||
retain?: bool
|
||||
tlsConfig?: #TLSConfig
|
||||
}
|
||||
|
||||
OnCallIntegration: BaseIntegration & {
|
||||
url: string
|
||||
|
||||
httpMethod?: string
|
||||
maxAlerts?: int64
|
||||
authorization_scheme?: string
|
||||
httpMethod?: string
|
||||
maxAlerts?: int64
|
||||
authorization_scheme?: string
|
||||
authorization_credentials?: #Secret
|
||||
username?: string
|
||||
password?: #Secret
|
||||
title?: string
|
||||
message?: string
|
||||
username?: string
|
||||
password?: #Secret
|
||||
title?: string
|
||||
message?: string
|
||||
}
|
||||
|
||||
OpsgenieIntegrationResponder: {
|
||||
id?: string
|
||||
name?: string
|
||||
id?: string
|
||||
name?: string
|
||||
username?: string
|
||||
type: string
|
||||
type: string
|
||||
}
|
||||
|
||||
OpsgenieIntegration: BaseIntegration & {
|
||||
apiKey: #Secret
|
||||
|
||||
apiUrl?: string
|
||||
message?: string
|
||||
description?: string
|
||||
autoClose?: bool
|
||||
apiUrl?: string
|
||||
message?: string
|
||||
description?: string
|
||||
autoClose?: bool
|
||||
overridePriority?: bool
|
||||
sendTagsAs?: string
|
||||
sendTagsAs?: string
|
||||
responders?: [...OpsgenieIntegrationResponder]
|
||||
}
|
||||
|
||||
PagerdutyIntegration: BaseIntegration & {
|
||||
integrationKey: #Secret
|
||||
|
||||
severity?: string
|
||||
class?: string
|
||||
component?: string
|
||||
group?: string
|
||||
summary?: string
|
||||
source?: string
|
||||
client?: string
|
||||
severity?: string
|
||||
class?: string
|
||||
component?: string
|
||||
group?: string
|
||||
summary?: string
|
||||
source?: string
|
||||
client?: string
|
||||
client_url?: string
|
||||
details?: {[string]: string}
|
||||
url?: string
|
||||
details?: {[string]: string}
|
||||
url?: string
|
||||
}
|
||||
|
||||
PushoverIntegration: BaseIntegration & {
|
||||
userKey: #Secret
|
||||
userKey: #Secret
|
||||
apiToken: #Secret
|
||||
|
||||
priority?: int64
|
||||
okPriority?: int64
|
||||
retry?: int64
|
||||
expire?: int64
|
||||
device?: string
|
||||
sound?: string
|
||||
okSound?: string
|
||||
title?: string
|
||||
message?: string
|
||||
priority?: int64
|
||||
okPriority?: int64
|
||||
retry?: int64
|
||||
expire?: int64
|
||||
device?: string
|
||||
sound?: string
|
||||
okSound?: string
|
||||
title?: string
|
||||
message?: string
|
||||
uploadImage?: bool
|
||||
}
|
||||
|
||||
SensugoIntegration: BaseIntegration & {
|
||||
url: string
|
||||
url: string
|
||||
apikey: #Secret
|
||||
|
||||
entity?: string
|
||||
check?: string
|
||||
entity?: string
|
||||
check?: string
|
||||
namespace?: string
|
||||
handler?: string
|
||||
message?: string
|
||||
handler?: string
|
||||
message?: string
|
||||
}
|
||||
|
||||
#SigV4Config: {
|
||||
region?: string
|
||||
region?: string
|
||||
access_key?: #Secret
|
||||
secret_key?: #Secret
|
||||
profile?: string
|
||||
role_arn?: string
|
||||
profile?: string
|
||||
role_arn?: string
|
||||
}
|
||||
|
||||
SnsIntegration: BaseIntegration & {
|
||||
api_url?: string
|
||||
sigv4: #SigV4Config
|
||||
topic_arn?: string
|
||||
api_url?: string
|
||||
sigv4: #SigV4Config
|
||||
topic_arn?: string
|
||||
phone_number?: string
|
||||
target_arn?: string
|
||||
subject?: string
|
||||
message?: string
|
||||
attributes?: {[string]: string}
|
||||
target_arn?: string
|
||||
subject?: string
|
||||
message?: string
|
||||
attributes?: {[string]: string}
|
||||
}
|
||||
|
||||
SlackIntegration: BaseIntegration & {
|
||||
endpointUrl?: string
|
||||
url?: #Secret
|
||||
token?: #Secret
|
||||
recipient?: string
|
||||
text?: string
|
||||
title?: string
|
||||
username?: string
|
||||
icon_emoji?: string
|
||||
icon_url?: string
|
||||
endpointUrl?: string
|
||||
url?: #Secret
|
||||
token?: #Secret
|
||||
recipient?: string
|
||||
text?: string
|
||||
title?: string
|
||||
username?: string
|
||||
icon_emoji?: string
|
||||
icon_url?: string
|
||||
mentionChannel?: string
|
||||
mentionUsers?: string
|
||||
mentionGroups?: string
|
||||
color?: string
|
||||
mentionUsers?: string
|
||||
mentionGroups?: string
|
||||
color?: string
|
||||
}
|
||||
|
||||
TelegramIntegration: BaseIntegration & {
|
||||
bottoken: #Secret
|
||||
chatid: string
|
||||
message_thread_id: string
|
||||
bottoken: #Secret
|
||||
chatid: string
|
||||
message_thread_id: string
|
||||
|
||||
message?: string
|
||||
parse_mode?: string
|
||||
message?: string
|
||||
parse_mode?: string
|
||||
disable_web_page_preview?: bool
|
||||
protect_content?: bool
|
||||
disable_notifications?: bool
|
||||
protect_content?: bool
|
||||
disable_notifications?: bool
|
||||
}
|
||||
|
||||
TeamsIntegration: BaseIntegration & {
|
||||
url: #Secret
|
||||
|
||||
message?: string
|
||||
title?: string
|
||||
message?: string
|
||||
title?: string
|
||||
sectiontitle?: string
|
||||
}
|
||||
|
||||
ThreemaIntegration: BaseIntegration & {
|
||||
gateway_id: string
|
||||
gateway_id: string
|
||||
recipient_id: string
|
||||
api_secret: #Secret
|
||||
api_secret: #Secret
|
||||
|
||||
title?: string
|
||||
title?: string
|
||||
description?: string
|
||||
}
|
||||
|
||||
@@ -250,81 +250,83 @@ VictoropsIntegration: BaseIntegration & {
|
||||
url: #Secret
|
||||
|
||||
messageType?: string
|
||||
title?: string
|
||||
title?: string
|
||||
description?: string
|
||||
}
|
||||
|
||||
WebexIntegration: BaseIntegration & {
|
||||
bot_token: #Secret
|
||||
|
||||
api_url?: string
|
||||
message?: string
|
||||
room_id?: string
|
||||
api_url?: string
|
||||
message?: string
|
||||
room_id?: string
|
||||
}
|
||||
|
||||
#CustomPayload: {
|
||||
template?: string
|
||||
vars?: {[string]: string}
|
||||
vars?: {[string]: string}
|
||||
}
|
||||
|
||||
#HMACConfig: {
|
||||
secret?: #Secret
|
||||
header: string
|
||||
timestampHeader: string
|
||||
secret?: #Secret
|
||||
header: string
|
||||
timestampHeader: string
|
||||
}
|
||||
|
||||
WebhookIntegration: BaseIntegration & {
|
||||
url: string
|
||||
|
||||
httpMethod?: string
|
||||
maxAlerts?: int64
|
||||
authorization_scheme?: string
|
||||
authorization_credentials?: #Secret
|
||||
username?: string
|
||||
password?: #Secret
|
||||
headers?: {[string]: string}
|
||||
title?: string
|
||||
message?: string
|
||||
tlsConfig?: #TLSConfig
|
||||
hmacConfig?: #HMACConfig
|
||||
payload?: #CustomPayload
|
||||
httpMethod?: string
|
||||
maxAlerts?: int64
|
||||
authorization_scheme?: string
|
||||
authorization_credentials?: #Secret
|
||||
username?: string
|
||||
password?: #Secret
|
||||
headers?: {[string]: string}
|
||||
title?: string
|
||||
message?: string
|
||||
tlsConfig?: #TLSConfig
|
||||
hmacConfig?: #HMACConfig
|
||||
payload?: #CustomPayload
|
||||
}
|
||||
|
||||
WecomIntegration: BaseIntegration & {
|
||||
endpointUrl?: string
|
||||
url?: #Secret
|
||||
secret?: #Secret
|
||||
agent_id?: string
|
||||
corp_id?: string
|
||||
message?: string
|
||||
title?: string
|
||||
msgtype?: string
|
||||
touser?: string
|
||||
endpointUrl?: string
|
||||
url?: #Secret
|
||||
secret?: #Secret
|
||||
agent_id?: string
|
||||
corp_id?: string
|
||||
message?: string
|
||||
title?: string
|
||||
msgtype?: string
|
||||
touser?: string
|
||||
}
|
||||
|
||||
ReceiverSpec: {
|
||||
title: string
|
||||
alertmanager?: [...AlertmanagerIntegration]
|
||||
dingding?: [...DingdingIntegration]
|
||||
discord?: [...DiscordIntegration]
|
||||
email?: [...EmailIntegration]
|
||||
googlechat?: [...GooglechatIntegration]
|
||||
jira?: [...JiraIntegration]
|
||||
kafka?: [...KafkaIntegration]
|
||||
line?: [...LineIntegration]
|
||||
mqtt?: [...MqttIntegration]
|
||||
opsgenie?: [...OpsgenieIntegration]
|
||||
pagerduty?: [...PagerdutyIntegration]
|
||||
oncall?: [...OnCallIntegration]
|
||||
pushover?: [...PushoverIntegration]
|
||||
sensugo?: [...SensugoIntegration]
|
||||
slack?: [...SlackIntegration]
|
||||
sns?: [...SnsIntegration]
|
||||
teams?: [...TeamsIntegration]
|
||||
telegram?: [...TelegramIntegration]
|
||||
threema?: [...ThreemaIntegration]
|
||||
victorops?: [...VictoropsIntegration]
|
||||
webhook?: [...WebhookIntegration]
|
||||
wecom?: [...WecomIntegration]
|
||||
webex?: [...WebexIntegration]
|
||||
}
|
||||
title: string
|
||||
integrations: {
|
||||
alertmanager?: [...AlertmanagerIntegration]
|
||||
dingding?: [...DingdingIntegration]
|
||||
discord?: [...DiscordIntegration]
|
||||
email?: [...EmailIntegration]
|
||||
googlechat?: [...GooglechatIntegration]
|
||||
jira?: [...JiraIntegration]
|
||||
kafka?: [...KafkaIntegration]
|
||||
line?: [...LineIntegration]
|
||||
mqtt?: [...MqttIntegration]
|
||||
opsgenie?: [...OpsgenieIntegration]
|
||||
pagerduty?: [...PagerdutyIntegration]
|
||||
oncall?: [...OnCallIntegration]
|
||||
pushover?: [...PushoverIntegration]
|
||||
sensugo?: [...SensugoIntegration]
|
||||
slack?: [...SlackIntegration]
|
||||
sns?: [...SnsIntegration]
|
||||
teams?: [...TeamsIntegration]
|
||||
telegram?: [...TelegramIntegration]
|
||||
threema?: [...ThreemaIntegration]
|
||||
victorops?: [...VictoropsIntegration]
|
||||
webhook?: [...WebhookIntegration]
|
||||
wecom?: [...WecomIntegration]
|
||||
webex?: [...WebexIntegration]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,67 +53,67 @@ func (o *Receiver) SetInUse(routesCnt int, rules []string) {
|
||||
|
||||
func (s *Spec) GetIntegrationsTypes() []string {
|
||||
response := make([]string, 0, 5)
|
||||
if len(s.Alertmanager) > 0 {
|
||||
if len(s.Integrations.Alertmanager) > 0 {
|
||||
response = append(response, "alertmanager")
|
||||
}
|
||||
if len(s.Discord) > 0 {
|
||||
if len(s.Integrations.Discord) > 0 {
|
||||
response = append(response, "discord")
|
||||
}
|
||||
if len(s.Email) > 0 {
|
||||
if len(s.Integrations.Email) > 0 {
|
||||
response = append(response, "email")
|
||||
}
|
||||
if len(s.Googlechat) > 0 {
|
||||
if len(s.Integrations.Googlechat) > 0 {
|
||||
response = append(response, "googlechat")
|
||||
}
|
||||
if len(s.Kafka) > 0 {
|
||||
if len(s.Integrations.Kafka) > 0 {
|
||||
response = append(response, "kafka")
|
||||
}
|
||||
if len(s.Line) > 0 {
|
||||
if len(s.Integrations.Line) > 0 {
|
||||
response = append(response, "line")
|
||||
}
|
||||
if len(s.Opsgenie) > 0 {
|
||||
if len(s.Integrations.Opsgenie) > 0 {
|
||||
response = append(response, "opsgenie")
|
||||
}
|
||||
if len(s.Pagerduty) > 0 {
|
||||
if len(s.Integrations.Pagerduty) > 0 {
|
||||
response = append(response, "pagerduty")
|
||||
}
|
||||
if len(s.Pushover) > 0 {
|
||||
if len(s.Integrations.Pushover) > 0 {
|
||||
response = append(response, "pushover")
|
||||
}
|
||||
if len(s.Sensugo) > 0 {
|
||||
if len(s.Integrations.Sensugo) > 0 {
|
||||
response = append(response, "sensu")
|
||||
}
|
||||
if len(s.Slack) > 0 {
|
||||
if len(s.Integrations.Slack) > 0 {
|
||||
response = append(response, "slack")
|
||||
}
|
||||
if len(s.Teams) > 0 {
|
||||
if len(s.Integrations.Teams) > 0 {
|
||||
response = append(response, "teams")
|
||||
}
|
||||
if len(s.Telegram) > 0 {
|
||||
if len(s.Integrations.Telegram) > 0 {
|
||||
response = append(response, "telegram")
|
||||
}
|
||||
if len(s.Threema) > 0 {
|
||||
if len(s.Integrations.Threema) > 0 {
|
||||
response = append(response, "threema")
|
||||
}
|
||||
if len(s.Victorops) > 0 {
|
||||
if len(s.Integrations.Victorops) > 0 {
|
||||
response = append(response, "victorops")
|
||||
}
|
||||
if len(s.Webhook) > 0 {
|
||||
if len(s.Integrations.Webhook) > 0 {
|
||||
response = append(response, "webhook")
|
||||
}
|
||||
if len(s.Wecom) > 0 {
|
||||
if len(s.Integrations.Wecom) > 0 {
|
||||
response = append(response, "wecom")
|
||||
}
|
||||
return response
|
||||
}
|
||||
|
||||
func (s *Spec) IntegrationsCount() int {
|
||||
return len(s.Alertmanager) + len(s.Dingding) + len(s.Discord) + len(s.Email) +
|
||||
len(s.Googlechat) + len(s.Kafka) + len(s.Line) + len(s.Opsgenie) +
|
||||
len(s.Pagerduty) + len(s.Oncall) + len(s.Pushover) + len(s.Sensugo) +
|
||||
len(s.Sns) + len(s.Slack) + len(s.Teams) + len(s.Telegram) +
|
||||
len(s.Threema) + len(s.Victorops) + len(s.Webhook) + len(s.Wecom) +
|
||||
len(s.Webex) + len(s.Mqtt)
|
||||
return len(s.Integrations.Alertmanager) + len(s.Integrations.Dingding) + len(s.Integrations.Discord) + len(s.Integrations.Email) +
|
||||
len(s.Integrations.Googlechat) + len(s.Integrations.Kafka) + len(s.Integrations.Line) + len(s.Integrations.Opsgenie) +
|
||||
len(s.Integrations.Pagerduty) + len(s.Integrations.Oncall) + len(s.Integrations.Pushover) + len(s.Integrations.Sensugo) +
|
||||
len(s.Integrations.Sns) + len(s.Integrations.Slack) + len(s.Integrations.Teams) + len(s.Integrations.Telegram) +
|
||||
len(s.Integrations.Threema) + len(s.Integrations.Victorops) + len(s.Integrations.Webhook) + len(s.Integrations.Wecom) +
|
||||
len(s.Integrations.Webex) + len(s.Integrations.Mqtt)
|
||||
}
|
||||
|
||||
// InUseAnnotation returns the key for the in-use annotation for the given resource.
|
||||
|
||||
@@ -18,20 +18,7 @@ func NewAlertmanagerIntegration() *AlertmanagerIntegration {
|
||||
|
||||
// A string that contain sensitive information.
|
||||
// +k8s:openapi-gen=true
|
||||
type Secret interface{}
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
type SecretString string
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
type RedactedSecret struct {
|
||||
Specified bool `json:"specified"`
|
||||
}
|
||||
|
||||
// NewRedactedSecret creates a new RedactedSecret object.
|
||||
func NewRedactedSecret() *RedactedSecret {
|
||||
return &RedactedSecret{}
|
||||
}
|
||||
type Secret string
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
type DingdingIntegration struct {
|
||||
@@ -510,7 +497,19 @@ func NewWebexIntegration() *WebexIntegration {
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
type Spec struct {
|
||||
Title string `json:"title"`
|
||||
Title string `json:"title"`
|
||||
Integrations V0alpha2SpecIntegrations `json:"integrations"`
|
||||
}
|
||||
|
||||
// NewSpec creates a new Spec object.
|
||||
func NewSpec() *Spec {
|
||||
return &Spec{
|
||||
Integrations: *NewV0alpha2SpecIntegrations(),
|
||||
}
|
||||
}
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
type V0alpha2SpecIntegrations struct {
|
||||
Alertmanager []AlertmanagerIntegration `json:"alertmanager,omitempty"`
|
||||
Dingding []DingdingIntegration `json:"dingding,omitempty"`
|
||||
Discord []DiscordIntegration `json:"discord,omitempty"`
|
||||
@@ -536,7 +535,7 @@ type Spec struct {
|
||||
Webex []WebexIntegration `json:"webex,omitempty"`
|
||||
}
|
||||
|
||||
// NewSpec creates a new Spec object.
|
||||
func NewSpec() *Spec {
|
||||
return &Spec{}
|
||||
// NewV0alpha2SpecIntegrations creates a new V0alpha2SpecIntegrations object.
|
||||
func NewV0alpha2SpecIntegrations() *V0alpha2SpecIntegrations {
|
||||
return &V0alpha2SpecIntegrations{}
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
|
||||
"github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.TeamsIntegration": schema_pkg_apis_receiver_v0alpha2_TeamsIntegration(ref),
|
||||
"github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.TelegramIntegration": schema_pkg_apis_receiver_v0alpha2_TelegramIntegration(ref),
|
||||
"github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.ThreemaIntegration": schema_pkg_apis_receiver_v0alpha2_ThreemaIntegration(ref),
|
||||
"github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.V0alpha2SpecIntegrations": schema_pkg_apis_receiver_v0alpha2_V0alpha2SpecIntegrations(ref),
|
||||
"github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.VictoropsIntegration": schema_pkg_apis_receiver_v0alpha2_VictoropsIntegration(ref),
|
||||
"github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.WebexIntegration": schema_pkg_apis_receiver_v0alpha2_WebexIntegration(ref),
|
||||
"github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.WebhookIntegration": schema_pkg_apis_receiver_v0alpha2_WebhookIntegration(ref),
|
||||
@@ -1508,311 +1509,18 @@ func schema_pkg_apis_receiver_v0alpha2_Spec(ref common.ReferenceCallback) common
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"alertmanager": {
|
||||
"integrations": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.AlertmanagerIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"dingding": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.DingdingIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"discord": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.DiscordIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"email": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.EmailIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"googlechat": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.GooglechatIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"jira": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.JiraIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"kafka": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.KafkaIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"line": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.LineIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"mqtt": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.MqttIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"opsgenie": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.OpsgenieIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"pagerduty": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.PagerdutyIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"oncall": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.OnCallIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"pushover": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.PushoverIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"sensugo": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.SensugoIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"slack": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.SlackIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"sns": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.SnsIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"teams": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.TeamsIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"telegram": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.TelegramIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"threema": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.ThreemaIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"victorops": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.VictoropsIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"webhook": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.WebhookIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"wecom": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.WecomIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"webex": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.WebexIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.V0alpha2SpecIntegrations"),
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"title"},
|
||||
Required: []string{"title", "integrations"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.AlertmanagerIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.DingdingIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.DiscordIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.EmailIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.GooglechatIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.JiraIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.KafkaIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.LineIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.MqttIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.OnCallIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.OpsgenieIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.PagerdutyIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.PushoverIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.SensugoIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.SlackIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.SnsIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.TeamsIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.TelegramIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.ThreemaIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.VictoropsIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.WebexIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.WebhookIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.WecomIntegration"},
|
||||
"github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.V0alpha2SpecIntegrations"},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2131,6 +1839,319 @@ func schema_pkg_apis_receiver_v0alpha2_ThreemaIntegration(ref common.ReferenceCa
|
||||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_receiver_v0alpha2_V0alpha2SpecIntegrations(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"alertmanager": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.AlertmanagerIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"dingding": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.DingdingIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"discord": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.DiscordIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"email": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.EmailIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"googlechat": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.GooglechatIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"jira": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.JiraIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"kafka": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.KafkaIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"line": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.LineIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"mqtt": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.MqttIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"opsgenie": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.OpsgenieIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"pagerduty": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.PagerdutyIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"oncall": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.OnCallIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"pushover": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.PushoverIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"sensugo": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.SensugoIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"slack": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.SlackIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"sns": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.SnsIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"teams": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.TeamsIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"telegram": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.TelegramIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"threema": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.ThreemaIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"victorops": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.VictoropsIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"webhook": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.WebhookIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"wecom": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.WecomIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"webex": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.WebexIntegration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.AlertmanagerIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.DingdingIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.DiscordIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.EmailIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.GooglechatIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.JiraIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.KafkaIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.LineIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.MqttIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.OnCallIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.OpsgenieIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.PagerdutyIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.PushoverIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.SensugoIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.SlackIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.SnsIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.TeamsIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.TelegramIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.ThreemaIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.VictoropsIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.WebexIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.WebhookIntegration", "github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2.WecomIntegration"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_receiver_v0alpha2_VictoropsIntegration(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
|
||||
+23
-23
@@ -1,29 +1,29 @@
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,EmailIntegration,Addresses
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,JiraIntegration,Labels
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,OpsgenieIntegration,Responders
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,Spec,Alertmanager
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,Spec,Dingding
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,Spec,Discord
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,Spec,Email
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,Spec,Googlechat
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,Spec,Jira
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,Spec,Kafka
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,Spec,Line
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,Spec,Mqtt
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,Spec,Oncall
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,Spec,Opsgenie
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,Spec,Pagerduty
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,Spec,Pushover
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,Spec,Sensugo
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,Spec,Slack
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,Spec,Sns
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,Spec,Teams
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,Spec,Telegram
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,Spec,Threema
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,Spec,Victorops
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,Spec,Webex
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,Spec,Webhook
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,Spec,Wecom
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,V0alpha2SpecIntegrations,Alertmanager
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,V0alpha2SpecIntegrations,Dingding
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,V0alpha2SpecIntegrations,Discord
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,V0alpha2SpecIntegrations,Email
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,V0alpha2SpecIntegrations,Googlechat
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,V0alpha2SpecIntegrations,Jira
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,V0alpha2SpecIntegrations,Kafka
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,V0alpha2SpecIntegrations,Line
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,V0alpha2SpecIntegrations,Mqtt
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,V0alpha2SpecIntegrations,Oncall
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,V0alpha2SpecIntegrations,Opsgenie
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,V0alpha2SpecIntegrations,Pagerduty
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,V0alpha2SpecIntegrations,Pushover
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,V0alpha2SpecIntegrations,Sensugo
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,V0alpha2SpecIntegrations,Slack
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,V0alpha2SpecIntegrations,Sns
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,V0alpha2SpecIntegrations,Teams
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,V0alpha2SpecIntegrations,Telegram
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,V0alpha2SpecIntegrations,Threema
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,V0alpha2SpecIntegrations,Victorops
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,V0alpha2SpecIntegrations,Webex
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,V0alpha2SpecIntegrations,Webhook
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,V0alpha2SpecIntegrations,Wecom
|
||||
API rule violation: names_match,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,AlertmanagerIntegration,DisableResolveMessage
|
||||
API rule violation: names_match,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,DingdingIntegration,DisableResolveMessage
|
||||
API rule violation: names_match,github.com/grafana/grafana/apps/alerting/notifications/pkg/apis/receiver/v0alpha2,DiscordIntegration,AvatarUrl
|
||||
|
||||
@@ -11,6 +11,8 @@ import (
|
||||
"github.com/grafana/grafana-app-sdk/app"
|
||||
)
|
||||
|
||||
var ()
|
||||
|
||||
var appManifestData = app.ManifestData{
|
||||
AppName: "folder",
|
||||
Group: "folder.grafana.app",
|
||||
|
||||
@@ -9,7 +9,7 @@ import { resolve } from 'node:path';
|
||||
|
||||
// these snapshots are generated by running "go test pkg/tests/apis/openapi_test.go", see the README in the "openapi_snapshots" directory
|
||||
const OPENAPI_SCHEMA_LOCATION = resolve(
|
||||
'../../../pkg/tests/apis/openapi_snapshots/notifications.alerting.grafana.app-v0alpha1.json'
|
||||
'../../../pkg/tests/apis/openapi_snapshots/notifications.alerting.grafana.app-v0alpha2.json'
|
||||
);
|
||||
|
||||
export default {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,19 +1,9 @@
|
||||
import { fetchBaseQuery, TypedUseQueryHookResult } from '@reduxjs/toolkit/query/react';
|
||||
|
||||
import { config } from '@grafana/runtime';
|
||||
|
||||
import { alertingAPI, ListReceiverApiArg } from '../../api.gen';
|
||||
import { EnhancedListReceiverResponse } from '../types';
|
||||
import { alertingAPI } from '../../api.gen';
|
||||
|
||||
const { namespace } = config;
|
||||
|
||||
// this is a workaround for the fact that the generated types are not narrow enough
|
||||
type EnhancedHookResult = TypedUseQueryHookResult<
|
||||
EnhancedListReceiverResponse,
|
||||
ListReceiverApiArg,
|
||||
ReturnType<typeof fetchBaseQuery>
|
||||
>;
|
||||
|
||||
/**
|
||||
* useListContactPoints is a hook that fetches a list of contact points
|
||||
*
|
||||
@@ -23,7 +13,7 @@ type EnhancedHookResult = TypedUseQueryHookResult<
|
||||
* It automatically uses the configured namespace for the query.
|
||||
*/
|
||||
function useListContactPoints() {
|
||||
return alertingAPI.useListReceiverQuery<EnhancedHookResult>({ namespace });
|
||||
return alertingAPI.useListReceiverQuery({ namespace });
|
||||
}
|
||||
|
||||
export { useListContactPoints };
|
||||
|
||||
@@ -1,76 +1,6 @@
|
||||
/**
|
||||
* This file contains enhanced and type-narrowed versions of the types generated by the RTKQ codegen package.
|
||||
*/
|
||||
import { MergeDeep, MergeExclusive, OverrideProperties } from 'type-fest';
|
||||
import { ComGithubGrafanaGrafanaAppsAlertingNotificationsPkgApisReceiverV0Alpha2Receiver } from '../api.gen';
|
||||
|
||||
import {
|
||||
ComGithubGrafanaGrafanaAppsAlertingNotificationsPkgApisReceiverV0Alpha1Receiver as ContactPointV0Alpha1,
|
||||
ComGithubGrafanaGrafanaAppsAlertingNotificationsPkgApisReceiverV0Alpha1Integration as IntegrationV0Alpha1,
|
||||
ListReceiverApiResponse,
|
||||
} from '../api.gen';
|
||||
|
||||
type GenericIntegration = OverrideProperties<
|
||||
IntegrationV0Alpha1,
|
||||
{
|
||||
settings: Record<string, unknown>;
|
||||
}
|
||||
>;
|
||||
|
||||
// Based on https://github.com/grafana/alerting/blob/main/receivers/email/config.go#L20-L25
|
||||
type EmailIntegration = OverrideProperties<
|
||||
GenericIntegration,
|
||||
{
|
||||
type: 'email';
|
||||
settings: {
|
||||
singleEmail?: boolean;
|
||||
addresses: string;
|
||||
message?: string;
|
||||
subject?: string;
|
||||
};
|
||||
secureFields: never; // email doesn't have any secure fields
|
||||
}
|
||||
>;
|
||||
|
||||
// Based on https://github.com/grafana/alerting/blob/main/receivers/slack/config.go
|
||||
type SlackIntegration = OverrideProperties<
|
||||
GenericIntegration,
|
||||
{
|
||||
type: 'slack';
|
||||
settings: {
|
||||
endpointUrl?: string;
|
||||
url?: string;
|
||||
recipient?: string;
|
||||
text?: string;
|
||||
title?: string;
|
||||
username?: string;
|
||||
icon_emoji?: string;
|
||||
icon_url?: string;
|
||||
mentionChannel?: string;
|
||||
mentionUsers?: string; // comma separated string
|
||||
mentionGroups?: string; // comma separated string
|
||||
color?: string;
|
||||
};
|
||||
// secureFields is a union type that can be either a token or a URL but you can't have both
|
||||
secureFields: MergeExclusive<{ token: string }, { url: string }>;
|
||||
}
|
||||
>;
|
||||
|
||||
export type Integration = EmailIntegration | SlackIntegration | GenericIntegration;
|
||||
|
||||
// Enhanced version of ContactPoint with typed integrations
|
||||
// ⚠️ MergeDeep does not check if the property you are overriding exists in the base type and there is no "DeepOverrideProperties" helper
|
||||
export type ContactPoint = MergeDeep<
|
||||
ContactPointV0Alpha1,
|
||||
{
|
||||
spec: {
|
||||
integrations: Integration[];
|
||||
};
|
||||
}
|
||||
>;
|
||||
|
||||
export type EnhancedListReceiverResponse = OverrideProperties<
|
||||
ListReceiverApiResponse,
|
||||
{
|
||||
items: ContactPoint[];
|
||||
}
|
||||
>;
|
||||
export type ContactPoint = ComGithubGrafanaGrafanaAppsAlertingNotificationsPkgApisReceiverV0Alpha2Receiver;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { countBy, isEmpty } from 'lodash';
|
||||
import { isEmpty, mapValues } from 'lodash';
|
||||
|
||||
import { ContactPoint } from './types';
|
||||
|
||||
@@ -13,12 +13,15 @@ import { ContactPoint } from './types';
|
||||
* @returns A string description of the ContactPoint's integrations
|
||||
*/
|
||||
export function getContactPointDescription(contactPoint: ContactPoint): string {
|
||||
if (isEmpty(contactPoint.spec.integrations)) {
|
||||
const integrations = contactPoint.spec.integrations;
|
||||
|
||||
const isEmptyContactPoint = Object.values(integrations).every(isEmpty);
|
||||
if (isEmptyContactPoint) {
|
||||
return '<empty contact point>';
|
||||
}
|
||||
|
||||
// Count the occurrences of each integration type
|
||||
const integrationCounts = countBy(contactPoint.spec.integrations, (integration) => integration.type);
|
||||
const integrationCounts = mapValues(integrations, (integrations) => integrations?.length ?? 0);
|
||||
|
||||
const description = Object.entries(integrationCounts)
|
||||
.map(([type, count]) => {
|
||||
|
||||
@@ -148,161 +148,161 @@ func convertToDomainModel(apiModel *model.Receiver) (*ngmodels.Receiver, error)
|
||||
integration := make([]*ngmodels.Integration, 0, apiModel.Spec.IntegrationsCount())
|
||||
|
||||
var errs []error
|
||||
for _, i := range cp.Alertmanager {
|
||||
for _, i := range cp.Integrations.Alertmanager {
|
||||
el, err := marshallIntegration(j, "prometheus-alertmanager", i, i.DisableResolveMessage, i.Uid, cp.Title)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
integration = append(integration, el)
|
||||
}
|
||||
for _, i := range cp.Dingding {
|
||||
for _, i := range cp.Integrations.Dingding {
|
||||
el, err := marshallIntegration(j, "dingding", i, i.DisableResolveMessage, i.Uid, cp.Title)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
integration = append(integration, el)
|
||||
}
|
||||
for _, i := range cp.Discord {
|
||||
for _, i := range cp.Integrations.Discord {
|
||||
el, err := marshallIntegration(j, "discord", i, i.DisableResolveMessage, i.Uid, cp.Title)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
integration = append(integration, el)
|
||||
}
|
||||
for _, i := range cp.Email {
|
||||
for _, i := range cp.Integrations.Email {
|
||||
el, err := marshallIntegration(j, "email", i, i.DisableResolveMessage, i.Uid, cp.Title)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
integration = append(integration, el)
|
||||
}
|
||||
for _, i := range cp.Googlechat {
|
||||
for _, i := range cp.Integrations.Googlechat {
|
||||
el, err := marshallIntegration(j, "googlechat", i, i.DisableResolveMessage, i.Uid, cp.Title)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
integration = append(integration, el)
|
||||
}
|
||||
for _, i := range cp.Jira {
|
||||
for _, i := range cp.Integrations.Jira {
|
||||
el, err := marshallIntegration(j, "jira", i, i.DisableResolveMessage, i.Uid, cp.Title)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
integration = append(integration, el)
|
||||
}
|
||||
for _, i := range cp.Kafka {
|
||||
for _, i := range cp.Integrations.Kafka {
|
||||
el, err := marshallIntegration(j, "kafka", i, i.DisableResolveMessage, i.Uid, cp.Title)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
integration = append(integration, el)
|
||||
}
|
||||
for _, i := range cp.Line {
|
||||
for _, i := range cp.Integrations.Line {
|
||||
el, err := marshallIntegration(j, "line", i, i.DisableResolveMessage, i.Uid, cp.Title)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
integration = append(integration, el)
|
||||
}
|
||||
for _, i := range cp.Mqtt {
|
||||
for _, i := range cp.Integrations.Mqtt {
|
||||
el, err := marshallIntegration(j, "mqtt", i, i.DisableResolveMessage, i.Uid, cp.Title)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
integration = append(integration, el)
|
||||
}
|
||||
for _, i := range cp.Opsgenie {
|
||||
for _, i := range cp.Integrations.Opsgenie {
|
||||
el, err := marshallIntegration(j, "opsgenie", i, i.DisableResolveMessage, i.Uid, cp.Title)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
integration = append(integration, el)
|
||||
}
|
||||
for _, i := range cp.Pagerduty {
|
||||
for _, i := range cp.Integrations.Pagerduty {
|
||||
el, err := marshallIntegration(j, "pagerduty", i, i.DisableResolveMessage, i.Uid, cp.Title)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
integration = append(integration, el)
|
||||
}
|
||||
for _, i := range cp.Oncall {
|
||||
for _, i := range cp.Integrations.Oncall {
|
||||
el, err := marshallIntegration(j, "oncall", i, i.DisableResolveMessage, i.Uid, cp.Title)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
integration = append(integration, el)
|
||||
}
|
||||
for _, i := range cp.Pushover {
|
||||
for _, i := range cp.Integrations.Pushover {
|
||||
el, err := marshallIntegration(j, "pushover", i, i.DisableResolveMessage, i.Uid, cp.Title)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
integration = append(integration, el)
|
||||
}
|
||||
for _, i := range cp.Sensugo {
|
||||
for _, i := range cp.Integrations.Sensugo {
|
||||
el, err := marshallIntegration(j, "sensugo", i, i.DisableResolveMessage, i.Uid, cp.Title)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
integration = append(integration, el)
|
||||
}
|
||||
for _, i := range cp.Sns {
|
||||
for _, i := range cp.Integrations.Sns {
|
||||
el, err := marshallIntegration(j, "sns", i, i.DisableResolveMessage, i.Uid, cp.Title)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
integration = append(integration, el)
|
||||
}
|
||||
for _, i := range cp.Slack {
|
||||
for _, i := range cp.Integrations.Slack {
|
||||
el, err := marshallIntegration(j, "slack", i, i.DisableResolveMessage, i.Uid, cp.Title)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
integration = append(integration, el)
|
||||
}
|
||||
for _, i := range cp.Teams {
|
||||
for _, i := range cp.Integrations.Teams {
|
||||
el, err := marshallIntegration(j, "teams", i, i.DisableResolveMessage, i.Uid, cp.Title)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
integration = append(integration, el)
|
||||
}
|
||||
for _, i := range cp.Telegram {
|
||||
for _, i := range cp.Integrations.Telegram {
|
||||
el, err := marshallIntegration(j, "telegram", i, i.DisableResolveMessage, i.Uid, cp.Title)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
integration = append(integration, el)
|
||||
}
|
||||
for _, i := range cp.Threema {
|
||||
for _, i := range cp.Integrations.Threema {
|
||||
el, err := marshallIntegration(j, "threema", i, i.DisableResolveMessage, i.Uid, cp.Title)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
integration = append(integration, el)
|
||||
}
|
||||
for _, i := range cp.Victorops {
|
||||
for _, i := range cp.Integrations.Victorops {
|
||||
el, err := marshallIntegration(j, "victorops", i, i.DisableResolveMessage, i.Uid, cp.Title)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
integration = append(integration, el)
|
||||
}
|
||||
for _, i := range cp.Webhook {
|
||||
for _, i := range cp.Integrations.Webhook {
|
||||
el, err := marshallIntegration(j, "webhook", i, i.DisableResolveMessage, i.Uid, cp.Title)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
integration = append(integration, el)
|
||||
}
|
||||
for _, i := range cp.Wecom {
|
||||
for _, i := range cp.Integrations.Wecom {
|
||||
el, err := marshallIntegration(j, "wecom", i, i.DisableResolveMessage, i.Uid, cp.Title)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
integration = append(integration, el)
|
||||
}
|
||||
for _, i := range cp.Webex {
|
||||
for _, i := range cp.Integrations.Webex {
|
||||
el, err := marshallIntegration(j, "webex", i, i.DisableResolveMessage, i.Uid, cp.Title)
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
@@ -374,117 +374,117 @@ func parseIntegration(json jsoniter.API, result *model.Spec, integration *ngmode
|
||||
case "prometheus-alertmanager":
|
||||
integration := model.AlertmanagerIntegration{DisableResolveMessage: disable, Uid: util.Pointer(integration.UID)}
|
||||
if err = json.Unmarshal(data, &integration); err == nil {
|
||||
result.Alertmanager = append(result.Alertmanager, integration)
|
||||
result.Integrations.Alertmanager = append(result.Integrations.Alertmanager, integration)
|
||||
}
|
||||
case "dingding":
|
||||
integration := model.DingdingIntegration{DisableResolveMessage: disable, Uid: util.Pointer(integration.UID)}
|
||||
if err = json.Unmarshal(data, &integration); err == nil {
|
||||
result.Dingding = append(result.Dingding, integration)
|
||||
result.Integrations.Dingding = append(result.Integrations.Dingding, integration)
|
||||
}
|
||||
case "discord":
|
||||
integration := model.DiscordIntegration{DisableResolveMessage: disable, Uid: util.Pointer(integration.UID)}
|
||||
if err = json.Unmarshal(data, &integration); err == nil {
|
||||
result.Discord = append(result.Discord, integration)
|
||||
result.Integrations.Discord = append(result.Integrations.Discord, integration)
|
||||
}
|
||||
case "email":
|
||||
integration := model.EmailIntegration{DisableResolveMessage: disable, Uid: util.Pointer(integration.UID)}
|
||||
if err = json.Unmarshal(data, &integration); err == nil {
|
||||
result.Email = append(result.Email, integration)
|
||||
result.Integrations.Email = append(result.Integrations.Email, integration)
|
||||
}
|
||||
case "googlechat":
|
||||
integration := model.GooglechatIntegration{DisableResolveMessage: disable, Uid: util.Pointer(integration.UID)}
|
||||
if err = json.Unmarshal(data, &integration); err == nil {
|
||||
result.Googlechat = append(result.Googlechat, integration)
|
||||
result.Integrations.Googlechat = append(result.Integrations.Googlechat, integration)
|
||||
}
|
||||
case "jira":
|
||||
integration := model.JiraIntegration{DisableResolveMessage: disable, Uid: util.Pointer(integration.UID)}
|
||||
if err = json.Unmarshal(data, &integration); err == nil {
|
||||
result.Jira = append(result.Jira, integration)
|
||||
result.Integrations.Jira = append(result.Integrations.Jira, integration)
|
||||
}
|
||||
case "kafka":
|
||||
integration := model.KafkaIntegration{DisableResolveMessage: disable, Uid: util.Pointer(integration.UID)}
|
||||
if err = json.Unmarshal(data, &integration); err == nil {
|
||||
result.Kafka = append(result.Kafka, integration)
|
||||
result.Integrations.Kafka = append(result.Integrations.Kafka, integration)
|
||||
}
|
||||
case "line":
|
||||
integration := model.LineIntegration{DisableResolveMessage: disable, Uid: util.Pointer(integration.UID)}
|
||||
if err = json.Unmarshal(data, &integration); err == nil {
|
||||
result.Line = append(result.Line, integration)
|
||||
result.Integrations.Line = append(result.Integrations.Line, integration)
|
||||
}
|
||||
case "mqtt":
|
||||
integration := model.MqttIntegration{DisableResolveMessage: disable, Uid: util.Pointer(integration.UID)}
|
||||
if err = json.Unmarshal(data, &integration); err == nil {
|
||||
result.Mqtt = append(result.Mqtt, integration)
|
||||
result.Integrations.Mqtt = append(result.Integrations.Mqtt, integration)
|
||||
}
|
||||
case "opsgenie":
|
||||
integration := model.OpsgenieIntegration{DisableResolveMessage: disable, Uid: util.Pointer(integration.UID)}
|
||||
if err = json.Unmarshal(data, &integration); err == nil {
|
||||
result.Opsgenie = append(result.Opsgenie, integration)
|
||||
result.Integrations.Opsgenie = append(result.Integrations.Opsgenie, integration)
|
||||
}
|
||||
case "pagerduty":
|
||||
integration := model.PagerdutyIntegration{DisableResolveMessage: disable, Uid: util.Pointer(integration.UID)}
|
||||
if err = json.Unmarshal(data, &integration); err == nil {
|
||||
result.Pagerduty = append(result.Pagerduty, integration)
|
||||
result.Integrations.Pagerduty = append(result.Integrations.Pagerduty, integration)
|
||||
}
|
||||
case "oncall":
|
||||
integration := model.OnCallIntegration{DisableResolveMessage: disable, Uid: util.Pointer(integration.UID)}
|
||||
if err = json.Unmarshal(data, &integration); err == nil {
|
||||
result.Oncall = append(result.Oncall, integration)
|
||||
result.Integrations.Oncall = append(result.Integrations.Oncall, integration)
|
||||
}
|
||||
case "pushover":
|
||||
integration := model.PushoverIntegration{DisableResolveMessage: disable, Uid: util.Pointer(integration.UID)}
|
||||
if err = json.Unmarshal(data, &integration); err == nil {
|
||||
result.Pushover = append(result.Pushover, integration)
|
||||
result.Integrations.Pushover = append(result.Integrations.Pushover, integration)
|
||||
}
|
||||
case "sensugo":
|
||||
integration := model.SensugoIntegration{DisableResolveMessage: disable, Uid: util.Pointer(integration.UID)}
|
||||
if err = json.Unmarshal(data, &integration); err == nil {
|
||||
result.Sensugo = append(result.Sensugo, integration)
|
||||
result.Integrations.Sensugo = append(result.Integrations.Sensugo, integration)
|
||||
}
|
||||
case "sns":
|
||||
integration := model.SnsIntegration{DisableResolveMessage: disable, Uid: util.Pointer(integration.UID)}
|
||||
if err = json.Unmarshal(data, &integration); err == nil {
|
||||
result.Sns = append(result.Sns, integration)
|
||||
result.Integrations.Sns = append(result.Integrations.Sns, integration)
|
||||
}
|
||||
case "slack":
|
||||
integration := model.SlackIntegration{DisableResolveMessage: disable, Uid: util.Pointer(integration.UID)}
|
||||
if err = json.Unmarshal(data, &integration); err == nil {
|
||||
result.Slack = append(result.Slack, integration)
|
||||
result.Integrations.Slack = append(result.Integrations.Slack, integration)
|
||||
}
|
||||
case "teams":
|
||||
integration := model.TeamsIntegration{DisableResolveMessage: disable, Uid: util.Pointer(integration.UID)}
|
||||
if err = json.Unmarshal(data, &integration); err == nil {
|
||||
result.Teams = append(result.Teams, integration)
|
||||
result.Integrations.Teams = append(result.Integrations.Teams, integration)
|
||||
}
|
||||
case "telegram":
|
||||
integration := model.TelegramIntegration{DisableResolveMessage: disable, Uid: util.Pointer(integration.UID)}
|
||||
if err = json.Unmarshal(data, &integration); err == nil {
|
||||
result.Telegram = append(result.Telegram, integration)
|
||||
result.Integrations.Telegram = append(result.Integrations.Telegram, integration)
|
||||
}
|
||||
case "threema":
|
||||
integration := model.ThreemaIntegration{DisableResolveMessage: disable, Uid: util.Pointer(integration.UID)}
|
||||
if err = json.Unmarshal(data, &integration); err == nil {
|
||||
result.Threema = append(result.Threema, integration)
|
||||
result.Integrations.Threema = append(result.Integrations.Threema, integration)
|
||||
}
|
||||
case "victorops":
|
||||
integration := model.VictoropsIntegration{DisableResolveMessage: disable, Uid: util.Pointer(integration.UID)}
|
||||
if err = json.Unmarshal(data, &integration); err == nil {
|
||||
result.Victorops = append(result.Victorops, integration)
|
||||
result.Integrations.Victorops = append(result.Integrations.Victorops, integration)
|
||||
}
|
||||
case "webhook":
|
||||
integration := model.WebhookIntegration{DisableResolveMessage: disable, Uid: util.Pointer(integration.UID)}
|
||||
if err = json.Unmarshal(data, &integration); err == nil {
|
||||
result.Webhook = append(result.Webhook, integration)
|
||||
result.Integrations.Webhook = append(result.Integrations.Webhook, integration)
|
||||
}
|
||||
case "wecom":
|
||||
integration := model.WecomIntegration{DisableResolveMessage: disable, Uid: util.Pointer(integration.UID)}
|
||||
if err = json.Unmarshal(data, &integration); err == nil {
|
||||
result.Wecom = append(result.Wecom, integration)
|
||||
result.Integrations.Wecom = append(result.Integrations.Wecom, integration)
|
||||
}
|
||||
case "webex":
|
||||
integration := model.WebexIntegration{DisableResolveMessage: disable, Uid: util.Pointer(integration.UID)}
|
||||
if err = json.Unmarshal(data, &integration); err == nil {
|
||||
result.Webex = append(result.Webex, integration)
|
||||
result.Integrations.Webex = append(result.Integrations.Webex, integration)
|
||||
}
|
||||
default:
|
||||
err = fmt.Errorf("integration %s is not supported", integration.Config.Type)
|
||||
@@ -498,24 +498,6 @@ type contactPointsExtension struct {
|
||||
KeepSecret bool
|
||||
}
|
||||
|
||||
// CreateEncoder creates a custom encoder for MyInterface
|
||||
func (c *contactPointsExtension) CreateEncoder(typ reflect2.Type) jsoniter.ValEncoder {
|
||||
if typ == reflect2.TypeOfPtr((*model.Secret)(nil)).Elem() {
|
||||
return &SecretEncoder{}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// CreateDecoder creates a custom decoder for MyInterface
|
||||
func (c *contactPointsExtension) CreateDecoder(typ reflect2.Type) jsoniter.ValDecoder {
|
||||
if typ == reflect2.TypeOfPtr((*model.Secret)(nil)).Elem() {
|
||||
return &SecretDecoder{
|
||||
KeepSecret: c.KeepSecret,
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *contactPointsExtension) UpdateStructDescriptor(structDescriptor *jsoniter.StructDescriptor) {
|
||||
if structDescriptor.Type == reflect2.TypeOf(model.EmailIntegration{}) {
|
||||
bind := structDescriptor.GetField("Addresses")
|
||||
@@ -631,67 +613,3 @@ func (d *numberAsStringCodec) Decode(ptr unsafe.Pointer, iter *jsoniter.Iterator
|
||||
}
|
||||
*((*(*int64))(ptr)) = &value
|
||||
}
|
||||
|
||||
type SecretEncoder struct{}
|
||||
|
||||
func (encoder *SecretEncoder) IsEmpty(ptr unsafe.Pointer) bool {
|
||||
return *(*model.Secret)(ptr) == nil
|
||||
}
|
||||
|
||||
func (encoder *SecretEncoder) Encode(ptr unsafe.Pointer, stream *jsoniter.Stream) {
|
||||
val := *(*model.Secret)(ptr)
|
||||
if val == nil {
|
||||
stream.WriteNil()
|
||||
return
|
||||
}
|
||||
|
||||
switch v := val.(type) {
|
||||
case string:
|
||||
// If it's a raw string, write it as-is
|
||||
stream.WriteString(v)
|
||||
case model.SecretString:
|
||||
// If it's a SecretString, write it as a string
|
||||
stream.WriteString(string(v))
|
||||
case *model.RedactedSecret:
|
||||
// If it's a RedactedSecret (has "specified" field), write null
|
||||
stream.WriteNil()
|
||||
default:
|
||||
stream.Error = fmt.Errorf("unsupported Secret type: %T", val)
|
||||
}
|
||||
}
|
||||
|
||||
type SecretDecoder struct {
|
||||
KeepSecret bool
|
||||
}
|
||||
|
||||
func (decoder *SecretDecoder) Decode(ptr unsafe.Pointer, iter *jsoniter.Iterator) {
|
||||
// Peek at the next token to determine the JSON type
|
||||
switch iter.WhatIsNext() {
|
||||
case jsoniter.StringValue:
|
||||
// If it's a string, decode as SecretString
|
||||
str := iter.ReadString()
|
||||
if decoder.KeepSecret {
|
||||
*(*model.Secret)(ptr) = model.SecretString(str)
|
||||
return
|
||||
}
|
||||
*(*model.Secret)(ptr) = &model.RedactedSecret{
|
||||
Specified: len(str) > 0,
|
||||
}
|
||||
// case jsoniter.NilValue:
|
||||
// // If it's a string, decode as SecretString
|
||||
// _ = iter.ReadNil()
|
||||
// if !decoder.KeepSecret {
|
||||
// // If it's an object, decode as RedactedSecret
|
||||
// redacted := &model.RedactedSecret{
|
||||
// Specified: len(str) > 0,
|
||||
// }
|
||||
// iter.ReadVal(redacted)
|
||||
// if iter.Error != nil {
|
||||
// return
|
||||
// }
|
||||
// *(*model.Secret)(ptr) = redacted
|
||||
// }
|
||||
default:
|
||||
iter.Error = fmt.Errorf("invalid JSON type for Secret; expected string or object")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1740,11 +1740,6 @@
|
||||
}
|
||||
},
|
||||
"x-kubernetes-group-version-kind": [
|
||||
{
|
||||
"group": "advisor.grafana.app",
|
||||
"kind": "Check",
|
||||
"version": "__internal"
|
||||
},
|
||||
{
|
||||
"group": "advisor.grafana.app",
|
||||
"kind": "Check",
|
||||
@@ -1807,11 +1802,6 @@
|
||||
}
|
||||
},
|
||||
"x-kubernetes-group-version-kind": [
|
||||
{
|
||||
"group": "advisor.grafana.app",
|
||||
"kind": "CheckList",
|
||||
"version": "__internal"
|
||||
},
|
||||
{
|
||||
"group": "advisor.grafana.app",
|
||||
"kind": "CheckList",
|
||||
@@ -1953,11 +1943,6 @@
|
||||
}
|
||||
},
|
||||
"x-kubernetes-group-version-kind": [
|
||||
{
|
||||
"group": "advisor.grafana.app",
|
||||
"kind": "CheckType",
|
||||
"version": "__internal"
|
||||
},
|
||||
{
|
||||
"group": "advisor.grafana.app",
|
||||
"kind": "CheckType",
|
||||
@@ -2001,11 +1986,6 @@
|
||||
}
|
||||
},
|
||||
"x-kubernetes-group-version-kind": [
|
||||
{
|
||||
"group": "advisor.grafana.app",
|
||||
"kind": "CheckTypeList",
|
||||
"version": "__internal"
|
||||
},
|
||||
{
|
||||
"group": "advisor.grafana.app",
|
||||
"kind": "CheckTypeList",
|
||||
|
||||
@@ -1741,11 +1741,6 @@
|
||||
}
|
||||
},
|
||||
"x-kubernetes-group-version-kind": [
|
||||
{
|
||||
"group": "investigations.grafana.app",
|
||||
"kind": "Investigation",
|
||||
"version": "__internal"
|
||||
},
|
||||
{
|
||||
"group": "investigations.grafana.app",
|
||||
"kind": "Investigation",
|
||||
@@ -1892,11 +1887,6 @@
|
||||
}
|
||||
},
|
||||
"x-kubernetes-group-version-kind": [
|
||||
{
|
||||
"group": "investigations.grafana.app",
|
||||
"kind": "InvestigationIndex",
|
||||
"version": "__internal"
|
||||
},
|
||||
{
|
||||
"group": "investigations.grafana.app",
|
||||
"kind": "InvestigationIndex",
|
||||
@@ -2031,11 +2021,6 @@
|
||||
}
|
||||
},
|
||||
"x-kubernetes-group-version-kind": [
|
||||
{
|
||||
"group": "investigations.grafana.app",
|
||||
"kind": "InvestigationIndexList",
|
||||
"version": "__internal"
|
||||
},
|
||||
{
|
||||
"group": "investigations.grafana.app",
|
||||
"kind": "InvestigationIndexList",
|
||||
@@ -2218,11 +2203,6 @@
|
||||
}
|
||||
},
|
||||
"x-kubernetes-group-version-kind": [
|
||||
{
|
||||
"group": "investigations.grafana.app",
|
||||
"kind": "InvestigationList",
|
||||
"version": "__internal"
|
||||
},
|
||||
{
|
||||
"group": "investigations.grafana.app",
|
||||
"kind": "InvestigationList",
|
||||
|
||||
@@ -3433,11 +3433,6 @@
|
||||
}
|
||||
},
|
||||
"x-kubernetes-group-version-kind": [
|
||||
{
|
||||
"group": "notifications.alerting.grafana.app",
|
||||
"kind": "Receiver",
|
||||
"version": "__internal"
|
||||
},
|
||||
{
|
||||
"group": "notifications.alerting.grafana.app",
|
||||
"kind": "Receiver",
|
||||
@@ -3481,11 +3476,6 @@
|
||||
}
|
||||
},
|
||||
"x-kubernetes-group-version-kind": [
|
||||
{
|
||||
"group": "notifications.alerting.grafana.app",
|
||||
"kind": "ReceiverList",
|
||||
"version": "__internal"
|
||||
},
|
||||
{
|
||||
"group": "notifications.alerting.grafana.app",
|
||||
"kind": "ReceiverList",
|
||||
@@ -3724,11 +3714,6 @@
|
||||
}
|
||||
},
|
||||
"x-kubernetes-group-version-kind": [
|
||||
{
|
||||
"group": "notifications.alerting.grafana.app",
|
||||
"kind": "RoutingTree",
|
||||
"version": "__internal"
|
||||
},
|
||||
{
|
||||
"group": "notifications.alerting.grafana.app",
|
||||
"kind": "RoutingTree",
|
||||
@@ -3772,11 +3757,6 @@
|
||||
}
|
||||
},
|
||||
"x-kubernetes-group-version-kind": [
|
||||
{
|
||||
"group": "notifications.alerting.grafana.app",
|
||||
"kind": "RoutingTreeList",
|
||||
"version": "__internal"
|
||||
},
|
||||
{
|
||||
"group": "notifications.alerting.grafana.app",
|
||||
"kind": "RoutingTreeList",
|
||||
@@ -3980,11 +3960,6 @@
|
||||
}
|
||||
},
|
||||
"x-kubernetes-group-version-kind": [
|
||||
{
|
||||
"group": "notifications.alerting.grafana.app",
|
||||
"kind": "TemplateGroup",
|
||||
"version": "__internal"
|
||||
},
|
||||
{
|
||||
"group": "notifications.alerting.grafana.app",
|
||||
"kind": "TemplateGroup",
|
||||
@@ -4028,11 +4003,6 @@
|
||||
}
|
||||
},
|
||||
"x-kubernetes-group-version-kind": [
|
||||
{
|
||||
"group": "notifications.alerting.grafana.app",
|
||||
"kind": "TemplateGroupList",
|
||||
"version": "__internal"
|
||||
},
|
||||
{
|
||||
"group": "notifications.alerting.grafana.app",
|
||||
"kind": "TemplateGroupList",
|
||||
@@ -4208,11 +4178,6 @@
|
||||
}
|
||||
},
|
||||
"x-kubernetes-group-version-kind": [
|
||||
{
|
||||
"group": "notifications.alerting.grafana.app",
|
||||
"kind": "TimeInterval",
|
||||
"version": "__internal"
|
||||
},
|
||||
{
|
||||
"group": "notifications.alerting.grafana.app",
|
||||
"kind": "TimeInterval",
|
||||
@@ -4256,11 +4221,6 @@
|
||||
}
|
||||
},
|
||||
"x-kubernetes-group-version-kind": [
|
||||
{
|
||||
"group": "notifications.alerting.grafana.app",
|
||||
"kind": "TimeIntervalList",
|
||||
"version": "__internal"
|
||||
},
|
||||
{
|
||||
"group": "notifications.alerting.grafana.app",
|
||||
"kind": "TimeIntervalList",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -910,11 +910,6 @@
|
||||
}
|
||||
},
|
||||
"x-kubernetes-group-version-kind": [
|
||||
{
|
||||
"group": "playlist.grafana.app",
|
||||
"kind": "Playlist",
|
||||
"version": "__internal"
|
||||
},
|
||||
{
|
||||
"group": "playlist.grafana.app",
|
||||
"kind": "Playlist",
|
||||
@@ -977,11 +972,6 @@
|
||||
}
|
||||
},
|
||||
"x-kubernetes-group-version-kind": [
|
||||
{
|
||||
"group": "playlist.grafana.app",
|
||||
"kind": "PlaylistList",
|
||||
"version": "__internal"
|
||||
},
|
||||
{
|
||||
"group": "playlist.grafana.app",
|
||||
"kind": "PlaylistList",
|
||||
|
||||
@@ -96,6 +96,9 @@ func TestIntegrationOpenAPIs(t *testing.T) {
|
||||
}, {
|
||||
Group: "notifications.alerting.grafana.app",
|
||||
Version: "v0alpha1",
|
||||
}, {
|
||||
Group: "notifications.alerting.grafana.app",
|
||||
Version: "v0alpha2",
|
||||
}}
|
||||
for _, gv := range groups {
|
||||
VerifyOpenAPISnapshots(t, dir, gv, h)
|
||||
|
||||
Reference in New Issue
Block a user