From 638735a37cc2cf4c51b406a77c79b3103a4bbfd7 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Fri, 28 May 2021 03:29:12 -0400 Subject: [PATCH] Clarify that Threema Gateway Alerts support only Basic IDs (#34828) (#34871) Threema Gateway supports two types of IDs: Basic IDs (where the encryption is managed by the API server) and End-to-End IDs (where the keys are managed by the user). This plugin currently does not support End-to-End IDs (since it's much more complex to implement, because the encryption needs to happen locally). Add a few clarifications to the UI. Co-authored-by: Arve Knudsen (cherry picked from commit 83a83de10a5aec679c9b8bfbe6d4246c01ceeaf3) Co-authored-by: Danilo Bargen --- pkg/services/alerting/notifiers/threema.go | 4 ++-- pkg/services/ngalert/notifier/available_channels.go | 4 ++-- pkg/tests/api/alerting/api_available_channel_test.go | 4 ++-- .../app/features/alerting/unified/mocks/grafana-notifiers.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/services/alerting/notifiers/threema.go b/pkg/services/alerting/notifiers/threema.go index 7cce463bb65..8b63c0bc183 100644 --- a/pkg/services/alerting/notifiers/threema.go +++ b/pkg/services/alerting/notifiers/threema.go @@ -19,7 +19,7 @@ func init() { alerting.RegisterNotifier(&alerting.NotifierPlugin{ Type: "threema", Name: "Threema Gateway", - Description: "Sends notifications to Threema using the Threema Gateway", + Description: "Sends notifications to Threema using Threema Gateway (Basic IDs)", Heading: "Threema Gateway settings", Info: "Notifications can be configured for any Threema Gateway ID of type \"Basic\". End-to-End IDs are not currently supported." + "The Threema Gateway ID can be set up at https://gateway.threema.ch/.", @@ -30,7 +30,7 @@ func init() { Element: alerting.ElementTypeInput, InputType: alerting.InputTypeText, Placeholder: "*3MAGWID", - Description: "Your 8 character Threema Gateway ID (starting with a *).", + Description: "Your 8 character Threema Gateway Basic ID (starting with a *).", PropertyName: "gateway_id", Required: true, ValidationRule: "\\*[0-9A-Z]{7}", diff --git a/pkg/services/ngalert/notifier/available_channels.go b/pkg/services/ngalert/notifier/available_channels.go index 6fbbb6962b3..8f82177e8c5 100644 --- a/pkg/services/ngalert/notifier/available_channels.go +++ b/pkg/services/ngalert/notifier/available_channels.go @@ -725,7 +725,7 @@ func GetAvailableNotifiers() []*alerting.NotifierPlugin { { Type: "threema", Name: "Threema Gateway", - Description: "Sends notifications to Threema using the Threema Gateway", + Description: "Sends notifications to Threema using Threema Gateway (Basic IDs)", Heading: "Threema Gateway settings", Info: "Notifications can be configured for any Threema Gateway ID of type \"Basic\". End-to-End IDs are not currently supported." + "The Threema Gateway ID can be set up at https://gateway.threema.ch/.", @@ -735,7 +735,7 @@ func GetAvailableNotifiers() []*alerting.NotifierPlugin { Element: alerting.ElementTypeInput, InputType: alerting.InputTypeText, Placeholder: "*3MAGWID", - Description: "Your 8 character Threema Gateway ID (starting with a *).", + Description: "Your 8 character Threema Gateway Basic ID (starting with a *).", PropertyName: "gateway_id", Required: true, ValidationRule: "\\*[0-9A-Z]{7}", diff --git a/pkg/tests/api/alerting/api_available_channel_test.go b/pkg/tests/api/alerting/api_available_channel_test.go index 57e225d3f85..6f730854247 100644 --- a/pkg/tests/api/alerting/api_available_channel_test.go +++ b/pkg/tests/api/alerting/api_available_channel_test.go @@ -1442,14 +1442,14 @@ var expAvailableChannelJsonOutput = ` "type": "threema", "name": "Threema Gateway", "heading": "Threema Gateway settings", - "description": "Sends notifications to Threema using the Threema Gateway", + "description": "Sends notifications to Threema using Threema Gateway (Basic IDs)", "info": "Notifications can be configured for any Threema Gateway ID of type \"Basic\". End-to-End IDs are not currently supported.The Threema Gateway ID can be set up at https://gateway.threema.ch/.", "options": [ { "element": "input", "inputType": "text", "label": "Gateway ID", - "description": "Your 8 character Threema Gateway ID (starting with a *).", + "description": "Your 8 character Threema Gateway Basic ID (starting with a *).", "placeholder": "*3MAGWID", "propertyName": "gateway_id", "selectOptions": null, diff --git a/public/app/features/alerting/unified/mocks/grafana-notifiers.ts b/public/app/features/alerting/unified/mocks/grafana-notifiers.ts index cd7a8cf781a..8bac7507d4a 100644 --- a/public/app/features/alerting/unified/mocks/grafana-notifiers.ts +++ b/public/app/features/alerting/unified/mocks/grafana-notifiers.ts @@ -308,7 +308,7 @@ export const grafanaNotifiersMock: NotifierDTO[] = [ type: 'threema', name: 'Threema Gateway', heading: 'Threema Gateway settings', - description: 'Sends notifications to Threema using the Threema Gateway', + description: 'Sends notifications to Threema using Threema Gateway (Basic IDs)', info: 'Notifications can be configured for any Threema Gateway ID of type "Basic". End-to-End IDs are not currently supported.The Threema Gateway ID can be set up at https://gateway.threema.ch/.', options: [ @@ -316,7 +316,7 @@ export const grafanaNotifiersMock: NotifierDTO[] = [ element: 'input', inputType: 'text', label: 'Gateway ID', - description: 'Your 8 character Threema Gateway ID (starting with a *).', + description: 'Your 8 character Threema Gateway Basic ID (starting with a *).', placeholder: '*3MAGWID', propertyName: 'gateway_id', selectOptions: null,