Skip to content

Commit

Permalink
fix isChatOpsConfigured fn
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim Mordasov committed Jan 2, 2024
1 parent f05f3ac commit fa531a6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AppFeature } from 'state/features';

import { TemplateBlock, commonTemplatesToRender } from './IntegrationCommonTemplatesList.config';

let additionalTemplatesToRender: TemplateBlock[] = [
const additionalTemplatesToRender: TemplateBlock[] = [
{
name: 'MS Teams',
contents: [
Expand Down
5 changes: 2 additions & 3 deletions grafana-plugin/src/containers/UserSettings/parts/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import Block from 'components/GBlock/Block';
import MobileAppConnection from 'containers/MobileAppConnection/MobileAppConnection';
import { UserSettingsTab } from 'containers/UserSettings/UserSettings.types';
import { SlackTab } from 'containers/UserSettings/parts/tabs//SlackTab/SlackTab';
import CloudPhoneSettings from 'containers/UserSettings/parts/tabs/CloudPhoneSettings/CloudPhoneSettings';
import MSTeamsInfo from 'containers/UserSettings/parts/tabs/MSTeamsInfo/MSTeamsInfo';
import { NotificationSettingsTab } from 'containers/UserSettings/parts/tabs/NotificationSettingsTab';
import PhoneVerification from 'containers/UserSettings/parts/tabs/PhoneVerification/PhoneVerification';
import TelegramInfo from 'containers/UserSettings/parts/tabs/TelegramInfo/TelegramInfo';
Expand All @@ -16,9 +18,6 @@ import { User } from 'models/user/user.types';
import { AppFeature } from 'state/features';
import { useStore } from 'state/useStore';

import CloudPhoneSettings from './tabs/CloudPhoneSettings/CloudPhoneSettings';
import MSTeamsInfo from './tabs/MSTeamsInfo/MSTeamsInfo';

import styles from 'containers/UserSettings/parts/index.module.css';

const cx = cn.bind(styles);
Expand Down
6 changes: 5 additions & 1 deletion grafana-plugin/src/pages/settings/tabs/ChatOps/ChatOps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ class ChatOpsPage extends React.Component<ChatOpsProps, ChatOpsState> {

isChatOpsConfigured(): boolean {
const { store } = this.props;
return store.hasFeature(AppFeature.Slack) || store.hasFeature(AppFeature.Telegram);
return (
store.hasFeature(AppFeature.Slack) ||
store.hasFeature(AppFeature.Telegram) ||
store.hasFeature(AppFeature.MsTeams)
);
}

handleChatopsTabChange(tab: ChatOpsTab) {
Expand Down

0 comments on commit fa531a6

Please sign in to comment.