From 8467199d94b399d2a7aad2e3372c070a173c83cb Mon Sep 17 00:00:00 2001 From: Rares Mardare <40542072+teodosii@users.noreply.github.com> Date: Mon, 16 Jan 2023 11:20:31 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20Telegram=20link=20+=20add=20remaining=20l?= =?UTF-8?q?inks=20target=3D"=5Fblank"=20and=20rel=3D"nore=E2=80=A6=20(#113?= =?UTF-8?q?5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # What this PR does Fix Telegram link + add remaining links `target="_blank"` --- .../containers/SlackInstructions/SlackInstructions.tsx | 5 +++-- .../TelegramIntegrationButton.tsx | 8 ++++++-- .../UserSettings/parts/tabs/SlackTab/SlackTab.tsx | 3 ++- .../UserSettings/parts/tabs/TelegramInfo/TelegramInfo.tsx | 3 ++- .../tabs/ChatOps/tabs/SlackSettings/SlackSettings.tsx | 3 ++- .../ChatOps/tabs/TelegramSettings/TelegramSettings.tsx | 5 +++-- grafana-plugin/src/utils/consts.ts | 3 +++ 7 files changed, 21 insertions(+), 9 deletions(-) diff --git a/grafana-plugin/src/containers/SlackInstructions/SlackInstructions.tsx b/grafana-plugin/src/containers/SlackInstructions/SlackInstructions.tsx index edd7a21b..8b3f8cfa 100644 --- a/grafana-plugin/src/containers/SlackInstructions/SlackInstructions.tsx +++ b/grafana-plugin/src/containers/SlackInstructions/SlackInstructions.tsx @@ -7,6 +7,7 @@ import { observer } from 'mobx-react'; import Block from 'components/GBlock/Block'; import Text from 'components/Text/Text'; import { SlackNewIcon } from 'icons'; +import { DOCS_SLACK_SETUP } from 'utils/consts'; import styles from './SlackInstructions.module.css'; @@ -27,7 +28,7 @@ const SlackInstructions: FC = observer(() => { Before start you need to connect your Slack bot to Grafana OnCall. For bot creating instructions and additional information please read{' '} - + our documentation {' '} @@ -36,7 +37,7 @@ const SlackInstructions: FC = observer(() => { Setup environment Create OnCall Slack bot using{' '} - + our instructions {' '} and fill out app credentials below. diff --git a/grafana-plugin/src/containers/TelegramIntegrationButton/TelegramIntegrationButton.tsx b/grafana-plugin/src/containers/TelegramIntegrationButton/TelegramIntegrationButton.tsx index 7aa709cc..1d1494cb 100644 --- a/grafana-plugin/src/containers/TelegramIntegrationButton/TelegramIntegrationButton.tsx +++ b/grafana-plugin/src/containers/TelegramIntegrationButton/TelegramIntegrationButton.tsx @@ -110,8 +110,12 @@ const TelegramModal = (props: TelegramModalProps) => { Discussion to find and add your group.{' '} - 4. Go to {botLink} to add the OnCall bot to your contacts. Then add the bot to your - channel as an Admin and allow it to Post Messages. + 4. Go to{' '} + + {botLink} + {' '} + to add the OnCall bot to your contacts. Then add the bot to your channel as an{' '} + Admin and allow it to Post Messages. 5. Add the bot to the discussion group. diff --git a/grafana-plugin/src/containers/UserSettings/parts/tabs/SlackTab/SlackTab.tsx b/grafana-plugin/src/containers/UserSettings/parts/tabs/SlackTab/SlackTab.tsx index 7b7db75a..2b980004 100644 --- a/grafana-plugin/src/containers/UserSettings/parts/tabs/SlackTab/SlackTab.tsx +++ b/grafana-plugin/src/containers/UserSettings/parts/tabs/SlackTab/SlackTab.tsx @@ -7,6 +7,7 @@ import Block from 'components/GBlock/Block'; import Text from 'components/Text/Text'; import { SlackNewIcon } from 'icons'; import { useStore } from 'state/useStore'; +import { DOCS_SLACK_SETUP } from 'utils/consts'; import styles from './SlackTab.module.css'; @@ -32,7 +33,7 @@ export const SlackTab = () => { More details in{' '} - + our documentation diff --git a/grafana-plugin/src/containers/UserSettings/parts/tabs/TelegramInfo/TelegramInfo.tsx b/grafana-plugin/src/containers/UserSettings/parts/tabs/TelegramInfo/TelegramInfo.tsx index 24376d0b..f68672ac 100644 --- a/grafana-plugin/src/containers/UserSettings/parts/tabs/TelegramInfo/TelegramInfo.tsx +++ b/grafana-plugin/src/containers/UserSettings/parts/tabs/TelegramInfo/TelegramInfo.tsx @@ -12,6 +12,7 @@ import { TelegramColorIcon } from 'icons'; import { AppFeature } from 'state/features'; import { useStore } from 'state/useStore'; import { openNotification } from 'utils'; +import { DOCS_TELEGRAM_SETUP } from 'utils/consts'; import styles from './TelegramInfo.module.css'; @@ -82,7 +83,7 @@ const TelegramInfo = observer((_props: TelegramInfoProps) => { More details in{' '} - + our documentation diff --git a/grafana-plugin/src/pages/settings/tabs/ChatOps/tabs/SlackSettings/SlackSettings.tsx b/grafana-plugin/src/pages/settings/tabs/ChatOps/tabs/SlackSettings/SlackSettings.tsx index 392acfb3..558e7a94 100644 --- a/grafana-plugin/src/pages/settings/tabs/ChatOps/tabs/SlackSettings/SlackSettings.tsx +++ b/grafana-plugin/src/pages/settings/tabs/ChatOps/tabs/SlackSettings/SlackSettings.tsx @@ -18,6 +18,7 @@ import { AppFeature } from 'state/features'; import { WithStoreProps } from 'state/types'; import { withMobXProviderContext } from 'state/withStore'; import { UserActions } from 'utils/authorization'; +import { DOCS_SLACK_SETUP } from 'utils/consts'; import styles from './SlackSettings.module.css'; @@ -246,7 +247,7 @@ class SlackSettings extends Component { {isLiveSettingAvailable && ( For bot creating instructions and additional information please read{' '} - + our documentation diff --git a/grafana-plugin/src/pages/settings/tabs/ChatOps/tabs/TelegramSettings/TelegramSettings.tsx b/grafana-plugin/src/pages/settings/tabs/ChatOps/tabs/TelegramSettings/TelegramSettings.tsx index c6eb5dc5..707a58af 100644 --- a/grafana-plugin/src/pages/settings/tabs/ChatOps/tabs/TelegramSettings/TelegramSettings.tsx +++ b/grafana-plugin/src/pages/settings/tabs/ChatOps/tabs/TelegramSettings/TelegramSettings.tsx @@ -15,6 +15,7 @@ import { TelegramChannel } from 'models/telegram_channel/telegram_channel.types' import { AppFeature } from 'state/features'; import { WithStoreProps } from 'state/types'; import { withMobXProviderContext } from 'state/withStore'; +import { DOCS_TELEGRAM_SETUP } from 'utils/consts'; import styles from './TelegramSettings.module.css'; @@ -63,7 +64,7 @@ class TelegramSettings extends Component { More details in{' '} - + our documentation @@ -94,7 +95,7 @@ class TelegramSettings extends Component { More details in{' '} - + our documentation diff --git a/grafana-plugin/src/utils/consts.ts b/grafana-plugin/src/utils/consts.ts index 18071482..66479c6e 100644 --- a/grafana-plugin/src/utils/consts.ts +++ b/grafana-plugin/src/utils/consts.ts @@ -25,3 +25,6 @@ export const FARO_ENDPOINT_OPS = 'https://faro-collector-prod-us-central-0.grafana.net/collect/40ccaafad6b71aa90fc53c3b0a1adb31'; export const FARO_ENDPOINT_PROD = 'https://faro-collector-prod-us-central-0.grafana.net/collect/03a11ed03c3af04dcfc3be9755f2b053'; + +export const DOCS_SLACK_SETUP = 'https://grafana.com/docs/grafana-cloud/oncall/open-source/#slack-setup'; +export const DOCS_TELEGRAM_SETUP = 'https://grafana.com/docs/grafana-cloud/oncall/chat-options/configure-telegram/';