diff --git a/grafana-plugin/src/containers/SlackInstructions/SlackInstructions.tsx b/grafana-plugin/src/containers/SlackInstructions/SlackInstructions.tsx index 9b4638f1..e4465c0e 100644 --- a/grafana-plugin/src/containers/SlackInstructions/SlackInstructions.tsx +++ b/grafana-plugin/src/containers/SlackInstructions/SlackInstructions.tsx @@ -23,7 +23,7 @@ const SlackInstructions: FC = observer((props) => { - You can manage incidents in your Slack workspace. + You can manage alert groups in your Slack workspace. Before start you need to connect your Slack bot to Grafana OnCall. For bot creating instructions and additional information please read{' '} 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 27d44d37..e64d750d 100644 --- a/grafana-plugin/src/containers/UserSettings/parts/tabs/SlackTab/SlackTab.tsx +++ b/grafana-plugin/src/containers/UserSettings/parts/tabs/SlackTab/SlackTab.tsx @@ -25,7 +25,7 @@ export const SlackTab = () => { - Personal Slack connection will allow you to manage incidents in your connected team Internal Slack + Personal Slack connection will allow you to manage alert grouops in your connected team Internal Slack workspace. To setup personal Slack click the button below, choose workspace and click Allow. 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 52bc5fe4..b06f8418 100644 --- a/grafana-plugin/src/containers/UserSettings/parts/tabs/TelegramInfo/TelegramInfo.tsx +++ b/grafana-plugin/src/containers/UserSettings/parts/tabs/TelegramInfo/TelegramInfo.tsx @@ -82,7 +82,7 @@ const TelegramInfo = observer((props: TelegramInfoProps) => { - You can manage incidents in your team Telegram channel or from personal direct messages. + You can manage alert groups in your team Telegram channel or from personal direct messages. To connect channel setup Telegram environment first, which includes connection to your bot and host URL. diff --git a/grafana-plugin/src/pages/chat-ops/parts/tabs/SlackSettings/SlackSettings.tsx b/grafana-plugin/src/pages/chat-ops/parts/tabs/SlackSettings/SlackSettings.tsx index b03905bd..92fac740 100644 --- a/grafana-plugin/src/pages/chat-ops/parts/tabs/SlackSettings/SlackSettings.tsx +++ b/grafana-plugin/src/pages/chat-ops/parts/tabs/SlackSettings/SlackSettings.tsx @@ -36,8 +36,9 @@ class SlackSettings extends Component { }; componentDidMount() { - this.getSlackLiveSettings(); - this.update(); + this.getSlackLiveSettings().then(() => { + this.update(); + }); } handleOpenSlackInstructions = () => { @@ -54,14 +55,14 @@ class SlackSettings extends Component { getSlackLiveSettings = async () => { const { store } = this.props; - const slackClientOAUTH = await store.globalSettingStore.getGlobalSettingItemByName('SLACK_CLIENT_OAUTH_ID'); - const slackClientOAUTHSecret = await store.globalSettingStore.getGlobalSettingItemByName( - 'SLACK_CLIENT_OAUTH_SECRET' + const results = await store.globalSettingStore.getAll(); + + const slackClientOAUTH = results.find((element: { name: string }) => element.name === 'SLACK_CLIENT_OAUTH_ID'); + const slackClientOAUTHSecret = results.find( + (element: { name: string }) => element.name === 'SLACK_CLIENT_OAUTH_SECRET' ); - const slackRedirectHost = await store.globalSettingStore.getGlobalSettingItemByName( - 'SLACK_INSTALL_RETURN_REDIRECT_HOST' - ); - const slackSigningSecret = await store.globalSettingStore.getGlobalSettingItemByName('SLACK_SIGNING_SECRET'); + const slackRedirectHost = results.find((element: { name: string }) => element.name === 'SLACK_CLIENT_OAUTH_ID'); + const slackSigningSecret = results.find((element: { name: string }) => element.name === 'SLACK_SIGNING_SECRET'); if ( slackClientOAUTH?.error || @@ -221,6 +222,7 @@ class SlackSettings extends Component { const { store } = this.props; const { showENVVariablesButton } = this.state; const isLiveSettingAvailable = store.hasFeature(AppFeature.LiveSettings) && showENVVariablesButton; + return ( Connect Slack workspace @@ -230,11 +232,11 @@ class SlackSettings extends Component { - Slack connection will allow you to manage incidents in your team Slack workspace. + Slack connection will allow you to manage alert groups in your team Slack workspace. After a basic workspace connection your team members need to connect their personal Slack accounts in - order to be allowed to manage incidents. + order to be allowed to manage alert groups. {isLiveSettingAvailable && ( diff --git a/grafana-plugin/src/pages/chat-ops/parts/tabs/TelegramSettings/TelegramSettings.tsx b/grafana-plugin/src/pages/chat-ops/parts/tabs/TelegramSettings/TelegramSettings.tsx index 1bb0ce37..d4215b35 100644 --- a/grafana-plugin/src/pages/chat-ops/parts/tabs/TelegramSettings/TelegramSettings.tsx +++ b/grafana-plugin/src/pages/chat-ops/parts/tabs/TelegramSettings/TelegramSettings.tsx @@ -57,7 +57,7 @@ class TelegramSettings extends Component { - You can manage incidents in your team Telegram channel or from personal direct messages.{' '} + You can manage alert groups in your team Telegram channel or from personal direct messages.{' '} @@ -92,7 +92,7 @@ class TelegramSettings extends Component { - You can manage incidents in your team Telegram channel or from personal direct messages.{' '} + You can manage alert groups in your team Telegram channel or from personal direct messages.{' '} More details in{' '} @@ -109,7 +109,7 @@ class TelegramSettings extends Component {
  • discuss alerts in comments
  • notifications to users accounts will be served as links to the main channel
  • - Make sure your team connects Telegram in their OnCall user profiles too or they cannot manage incidents. + Make sure your team connects Telegram in their OnCall user profiles too or they cannot manage alert groups.