0 ? -310 : 255,
width: 350,
left: 'calc(50% - 175px)',
display: isVisible ? 'flex' : 'none',
flexDirection: 'column',
gap: '1rem',
+ bottom: '15vh',
+ zIndex: 110,
}}
onClick={(e) => e.stopPropagation()}
>
@@ -206,15 +234,44 @@ function CreateNote({
{slackChannelsOptions.length > 0 ? (
-
-
+
+
setSlack(!useSlack)}>
+
+ Send to slack?
+
+
+ {useSlack && (
+
+
+
+ )}
+
+ ) : null}
+
+ {teamsChannelsOptions.length > 0 ? (
+
+
setTeams(!useTeams)}>
+
+ Send to teams?
+
+
+ {useTeams && (
+
+
+
+ )}
) : null}
@@ -232,19 +289,17 @@ function CreateNote({
}
export default connect(
- (state) => {
+ (state: any) => {
const {
isVisible,
time = 0,
isEdit,
note: editNote,
- // @ts-ignore
} = state.getIn(['sessions', 'createNoteTooltip']);
- // @ts-ignore
const slackChannels = state.getIn(['slack', 'list']);
- // @ts-ignore
+ const teamsChannels = state.getIn(['teams', 'list']);
const sessionId = state.getIn(['sessions', 'current', 'sessionId']);
- return { isVisible, time, sessionId, isEdit, editNote, slackChannels };
+ return { isVisible, time, sessionId, isEdit, editNote, slackChannels, teamsChannels };
},
- { setCreateNoteTooltip, addNote, updateNote, fetchSlack }
+ { setCreateNoteTooltip, addNote, updateNote, fetchSlack, fetchTeams }
)(CreateNote);
diff --git a/frontend/app/components/Session_/Player/Controls/components/styles.module.css b/frontend/app/components/Session_/Player/Controls/components/styles.module.css
index 2a34e1129..ff59d92e3 100644
--- a/frontend/app/components/Session_/Player/Controls/components/styles.module.css
+++ b/frontend/app/components/Session_/Player/Controls/components/styles.module.css
@@ -25,14 +25,13 @@
}
.noteTooltip {
- position: absolute;
+ position: fixed;
padding: 1rem;
border-radius: 0.25rem;
transition-property: all;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 150ms;
background: #F5F5F5;
- top: -35px;
color: black;
cursor: default;
box-shadow: 0 4px 20px 4px rgb(0 20 60 / 10%), 0 4px 80px -8px rgb(0 20 60 / 20%);
diff --git a/frontend/app/components/shared/IntegrateSlackButton/IntegrateSlackButton.js b/frontend/app/components/shared/IntegrateSlackButton/IntegrateSlackButton.js
index e75c4f7f5..2d4bd51b2 100644
--- a/frontend/app/components/shared/IntegrateSlackButton/IntegrateSlackButton.js
+++ b/frontend/app/components/shared/IntegrateSlackButton/IntegrateSlackButton.js
@@ -1,26 +1,29 @@
import React from 'react'
import { connect } from 'react-redux'
-import { IconButton } from 'UI'
+import { Button, Icon } from 'UI'
import { CLIENT_TABS, client as clientRoute } from 'App/routes';
import { withRouter } from 'react-router-dom';
-function IntegrateSlackButton({ history, tenantId }) {
+function IntegrateSlackTeamsButton({ history, tenantId }) {
const gotoPreferencesIntegrations = () => {
history.push(clientRoute(CLIENT_TABS.INTEGRATIONS));
}
return (
-
+ >
+
+
+
+ Integrate Slack/MS Teams
+
)
}
export default withRouter(connect(state => ({
tenantId: state.getIn([ 'user', 'account', 'tenantId' ]),
-}))(IntegrateSlackButton))
+}))(IntegrateSlackTeamsButton))
diff --git a/frontend/app/components/shared/SharePopup/SharePopup.js b/frontend/app/components/shared/SharePopup/SharePopup.js
index 4c75df64b..8b07340b4 100644
--- a/frontend/app/components/shared/SharePopup/SharePopup.js
+++ b/frontend/app/components/shared/SharePopup/SharePopup.js
@@ -1,45 +1,68 @@
import React from 'react';
import { connect } from 'react-redux';
import { toast } from 'react-toastify';
-import withRequest from 'HOCs/withRequest';
import { Icon, Button, Popover } from 'UI';
import styles from './sharePopup.module.css';
import IntegrateSlackButton from '../IntegrateSlackButton/IntegrateSlackButton';
import SessionCopyLink from './SessionCopyLink';
import Select from 'Shared/Select';
import cn from 'classnames';
-import { fetchList } from 'Duck/integrations/slack';
+import { fetchList as fetchSlack, sendSlackMsg } from 'Duck/integrations/slack';
+import { fetchList as fetchTeams, sendMsTeamsMsg } from 'Duck/integrations/teams';
@connect(
(state) => ({
+ sessionId: state.getIn(['sessions', 'current', 'sessionId']),
channels: state.getIn(['slack', 'list']),
+ msTeamsChannels: state.getIn(['teams', 'list']),
tenantId: state.getIn(['user', 'account', 'tenantId']),
}),
- { fetchList }
+ { fetchSlack, fetchTeams, sendSlackMsg, sendMsTeamsMsg }
)
-@withRequest({
- endpoint: ({ id, entity }, integrationId) =>
- `/integrations/slack/notify/${integrationId}/${entity}/${id}`,
- method: 'POST',
-})
export default class SharePopup extends React.PureComponent {
state = {
comment: '',
isOpen: false,
channelId: this.props.channels.getIn([0, 'webhookId']),
+ teamsChannel: this.props.msTeamsChannels.getIn([0, 'webhookId']),
+ loading: false,
};
componentDidMount() {
if (this.props.channels.size === 0) {
- this.props.fetchList();
+ this.props.fetchSlack();
+ }
+ if (this.props.msTeamsChannels.size === 0) {
+ this.props.fetchTeams();
}
}
editMessage = (e) => this.setState({ comment: e.target.value });
- share = () =>
- this.props
- .request({ comment: this.state.comment }, this.state.channelId)
- .then(this.handleSuccess);
+ shareToSlack = () => {
+ this.setState({ loading: true }, () => {
+ this.props
+ .sendSlackMsg({
+ integrationId: this.state.channelId,
+ entity: 'sessions',
+ entityId: this.props.sessionId,
+ data: { comment: this.state.comment },
+ })
+ .then(() => this.handleSuccess('Slack'));
+ });
+ };
+
+ shareToMSTeams = () => {
+ this.setState({ loading: true }, () => {
+ this.props
+ .sendMsTeamsMsg({
+ integrationId: this.state.teamsChannel,
+ entity: 'sessions',
+ entityId: this.props.sessionId,
+ data: { comment: this.state.comment },
+ })
+ .then(() => this.handleSuccess('MS Teams'));
+ });
+ };
handleOpen = () => {
setTimeout(function () {
@@ -51,22 +74,28 @@ export default class SharePopup extends React.PureComponent {
this.setState({ comment: '' });
};
- handleSuccess = () => {
- this.setState({ isOpen: false, comment: '' });
- toast.success('Sent to Slack.');
+ handleSuccess = (endpoint) => {
+ this.setState({ isOpen: false, comment: '', loading: false });
+ toast.success(`Sent to ${endpoint}.`);
};
- changeChannel = ({ value }) => this.setState({ channelId: value.value });
+ changeSlackChannel = ({ value }) => this.setState({ channelId: value.value });
+
+ changeTeamsChannel = ({ value }) => this.setState({ teamsChannel: value.value });
onClickHandler = () => {
this.setState({ isOpen: true });
};
render() {
- const { trigger, loading, channels, showCopyLink = false } = this.props;
- const { comment, channelId, isOpen } = this.state;
+ const { trigger, channels, msTeamsChannels, showCopyLink = false } = this.props;
+ const { comment, channelId, teamsChannel, loading } = this.state;
- const options = channels
+ const slackOptions = channels
+ .map(({ webhookId, name }) => ({ value: webhookId, label: name }))
+ .toJS();
+
+ const msTeamsOptions = msTeamsChannels
.map(({ webhookId, name }) => ({ value: webhookId, label: name }))
.toJS();
@@ -75,20 +104,11 @@ export default class SharePopup extends React.PureComponent {
render={() => (
-
Share this session link to Slack
+
+ Share this session link to Slack/MS Teams
+
- {options.length === 0 ? (
- <>
-
-
-
- {showCopyLink && (
-
-
-
- )}
- >
- ) : (
+ {slackOptions.length > 0 || msTeamsOptions.length > 0 ? (
-
-
-
-
-
-
+ {slackOptions.length > 0 && (
+ <>
+
Share to slack
+
+
+ {this.state.channelId && (
+
+ )}
+
+ >
+ )}
+ {msTeamsOptions.length > 0 && (
+ <>
+
Share to MS Teams
+
+
+ {this.state.teamsChannel && (
+
+ )}
+
+ >
+ )}
+ ) : (
+ <>
+
+
+
+ {showCopyLink && (
+
+
+
+ )}
+ >
)}
)}
diff --git a/frontend/app/components/shared/SharePopup/sharePopup.module.css b/frontend/app/components/shared/SharePopup/sharePopup.module.css
index b1d3a580c..d4f64d626 100644
--- a/frontend/app/components/shared/SharePopup/sharePopup.module.css
+++ b/frontend/app/components/shared/SharePopup/sharePopup.module.css
@@ -39,14 +39,9 @@
}
.footer {
- /* display: flex; */
- /* align-items: center; */
- /* justify-content: space-between; */
- /* padding: 10px 0; */
border-top: solid thin $gray-light;
- margin: 0 -14px;
+ margin: 0 -8px;
padding: 0 14px;
- /* border-bottom: solid thin $gray-light; */
}
textarea {
diff --git a/frontend/app/components/ui/Message/Message.js b/frontend/app/components/ui/Message/Message.js
index f8417c25f..6819e2ea6 100644
--- a/frontend/app/components/ui/Message/Message.js
+++ b/frontend/app/components/ui/Message/Message.js
@@ -12,7 +12,7 @@ const Message = ({
inline = false,
success = false,
info = true,
- text,
+ text = undefined,
}) =>
visible || !hidden ? (
diff --git a/frontend/app/components/ui/SVG.tsx b/frontend/app/components/ui/SVG.tsx
index a04c041a7..a941421c6 100644
--- a/frontend/app/components/ui/SVG.tsx
+++ b/frontend/app/components/ui/SVG.tsx
@@ -1,7 +1,7 @@
import React from 'react';
-export type IconNames = 'alarm-clock' | 'alarm-plus' | 'all-sessions' | 'analytics' | 'anchor' | 'arrow-alt-square-right' | 'arrow-bar-left' | 'arrow-clockwise' | 'arrow-down-short' | 'arrow-down' | 'arrow-repeat' | 'arrow-right-short' | 'arrow-square-left' | 'arrow-square-right' | 'arrow-up-short' | 'arrow-up' | 'arrows-angle-extend' | 'avatar/icn_bear' | 'avatar/icn_beaver' | 'avatar/icn_bird' | 'avatar/icn_bison' | 'avatar/icn_camel' | 'avatar/icn_chameleon' | 'avatar/icn_deer' | 'avatar/icn_dog' | 'avatar/icn_dolphin' | 'avatar/icn_elephant' | 'avatar/icn_fish' | 'avatar/icn_fox' | 'avatar/icn_gorilla' | 'avatar/icn_hippo' | 'avatar/icn_horse' | 'avatar/icn_hyena' | 'avatar/icn_kangaroo' | 'avatar/icn_lemur' | 'avatar/icn_mammel' | 'avatar/icn_monkey' | 'avatar/icn_moose' | 'avatar/icn_panda' | 'avatar/icn_penguin' | 'avatar/icn_porcupine' | 'avatar/icn_quail' | 'avatar/icn_rabbit' | 'avatar/icn_rhino' | 'avatar/icn_sea_horse' | 'avatar/icn_sheep' | 'avatar/icn_snake' | 'avatar/icn_squirrel' | 'avatar/icn_tapir' | 'avatar/icn_turtle' | 'avatar/icn_vulture' | 'avatar/icn_wild1' | 'avatar/icn_wild_bore' | 'ban' | 'bar-chart-line' | 'bar-pencil' | 'bell-fill' | 'bell-plus' | 'bell-slash' | 'bell' | 'binoculars' | 'book' | 'browser/browser' | 'browser/chrome' | 'browser/edge' | 'browser/electron' | 'browser/facebook' | 'browser/firefox' | 'browser/ie' | 'browser/opera' | 'browser/safari' | 'bullhorn' | 'business-time' | 'calendar-alt' | 'calendar-check' | 'calendar-day' | 'calendar' | 'call' | 'camera-alt' | 'camera-video-off' | 'camera-video' | 'camera' | 'caret-down-fill' | 'caret-left-fill' | 'caret-right-fill' | 'caret-up-fill' | 'chat-dots' | 'chat-right-text' | 'chat-square-quote' | 'check-circle-fill' | 'check-circle' | 'check' | 'chevron-double-left' | 'chevron-double-right' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'circle-fill' | 'circle' | 'clipboard-list-check' | 'clock' | 'close' | 'cloud-fog2-fill' | 'code' | 'cog' | 'cogs' | 'collection' | 'columns-gap-filled' | 'columns-gap' | 'console/error' | 'console/exception' | 'console/info' | 'console/warning' | 'console' | 'controller' | 'cookies' | 'copy' | 'credit-card-front' | 'cubes' | 'dash' | 'dashboard-icn' | 'desktop' | 'device' | 'diagram-3' | 'dizzy' | 'door-closed' | 'doublecheck' | 'download' | 'drag' | 'edit' | 'ellipsis-v' | 'enter' | 'envelope' | 'errors-icon' | 'event/click' | 'event/clickrage' | 'event/code' | 'event/i-cursor' | 'event/input' | 'event/link' | 'event/location' | 'event/resize' | 'event/view' | 'exclamation-circle' | 'expand-wide' | 'explosion' | 'external-link-alt' | 'eye-slash-fill' | 'eye-slash' | 'eye' | 'fetch' | 'file-code' | 'file-medical-alt' | 'file-pdf' | 'file' | 'filter' | 'filters/arrow-return-right' | 'filters/browser' | 'filters/click' | 'filters/clickrage' | 'filters/code' | 'filters/console' | 'filters/country' | 'filters/cpu-load' | 'filters/custom' | 'filters/device' | 'filters/dom-complete' | 'filters/duration' | 'filters/error' | 'filters/fetch-failed' | 'filters/fetch' | 'filters/file-code' | 'filters/graphql' | 'filters/i-cursor' | 'filters/input' | 'filters/lcpt' | 'filters/link' | 'filters/location' | 'filters/memory-load' | 'filters/metadata' | 'filters/os' | 'filters/perfromance-network-request' | 'filters/platform' | 'filters/referrer' | 'filters/resize' | 'filters/rev-id' | 'filters/state-action' | 'filters/ttfb' | 'filters/user-alt' | 'filters/userid' | 'filters/view' | 'flag-na' | 'folder-plus' | 'folder2' | 'fullscreen' | 'funnel/cpu-fill' | 'funnel/cpu' | 'funnel/dizzy' | 'funnel/emoji-angry-fill' | 'funnel/emoji-angry' | 'funnel/emoji-dizzy-fill' | 'funnel/exclamation-circle-fill' | 'funnel/exclamation-circle' | 'funnel/file-earmark-break-fill' | 'funnel/file-earmark-break' | 'funnel/file-earmark-minus-fill' | 'funnel/file-earmark-minus' | 'funnel/file-medical-alt' | 'funnel/file-x' | 'funnel/hdd-fill' | 'funnel/hourglass-top' | 'funnel/image-fill' | 'funnel/image' | 'funnel/microchip' | 'funnel/mouse' | 'funnel/patch-exclamation-fill' | 'funnel/sd-card' | 'funnel-fill' | 'funnel-new' | 'funnel' | 'gear-fill' | 'gear' | 'geo-alt-fill-custom' | 'github' | 'graph-up-arrow' | 'graph-up' | 'grid-3x3' | 'grid-check' | 'grid-horizontal' | 'grip-horizontal' | 'hash' | 'hdd-stack' | 'headset' | 'heart-rate' | 'high-engagement' | 'history' | 'hourglass-start' | 'id-card' | 'image' | 'info-circle-fill' | 'info-circle' | 'info-square' | 'info' | 'inspect' | 'integrations/assist' | 'integrations/bugsnag-text' | 'integrations/bugsnag' | 'integrations/cloudwatch-text' | 'integrations/cloudwatch' | 'integrations/datadog' | 'integrations/elasticsearch-text' | 'integrations/elasticsearch' | 'integrations/github' | 'integrations/graphql' | 'integrations/jira-text' | 'integrations/jira' | 'integrations/mobx' | 'integrations/newrelic-text' | 'integrations/newrelic' | 'integrations/ngrx' | 'integrations/openreplay-text' | 'integrations/openreplay' | 'integrations/redux' | 'integrations/rollbar-text' | 'integrations/rollbar' | 'integrations/segment' | 'integrations/sentry-text' | 'integrations/sentry' | 'integrations/slack-bw' | 'integrations/slack' | 'integrations/stackdriver' | 'integrations/sumologic-text' | 'integrations/sumologic' | 'integrations/teams' | 'integrations/vuejs' | 'journal-code' | 'layer-group' | 'lightbulb-on' | 'lightbulb' | 'link-45deg' | 'list-alt' | 'list-arrow' | 'list-ul' | 'list' | 'lock-alt' | 'magic' | 'map-marker-alt' | 'memory' | 'mic-mute' | 'mic' | 'minus' | 'mobile' | 'mouse-alt' | 'network' | 'next1' | 'no-dashboard' | 'no-metrics-chart' | 'no-metrics' | 'os/android' | 'os/chrome_os' | 'os/fedora' | 'os/ios' | 'os/linux' | 'os/mac_os_x' | 'os/other' | 'os/ubuntu' | 'os/windows' | 'os' | 'pause-fill' | 'pause' | 'pdf-download' | 'pencil-stop' | 'pencil' | 'percent' | 'performance-icon' | 'person-fill' | 'person' | 'pie-chart-fill' | 'pin-fill' | 'play-circle-light' | 'play-circle' | 'play-fill-new' | 'play-fill' | 'play-hover' | 'play' | 'plus-circle' | 'plus' | 'prev1' | 'puzzle-piece' | 'puzzle' | 'question-circle' | 'question-lg' | 'quote-left' | 'quote-right' | 'quotes' | 'record-circle' | 'redo-back' | 'redo' | 'remote-control' | 'replay-10' | 'resources-icon' | 'safe-fill' | 'safe' | 'sandglass' | 'search' | 'search_notification' | 'server' | 'share-alt' | 'shield-lock' | 'signup' | 'skip-forward-fill' | 'skip-forward' | 'slack' | 'slash-circle' | 'sliders' | 'social/slack' | 'social/trello' | 'spinner' | 'star-solid' | 'star' | 'step-forward' | 'stop-record-circle' | 'stopwatch' | 'store' | 'sync-alt' | 'table-new' | 'table' | 'tablet-android' | 'tachometer-slow' | 'tachometer-slowest' | 'tags' | 'team-funnel' | 'telephone-fill' | 'telephone' | 'text-paragraph' | 'tools' | 'trash' | 'turtle' | 'user-alt' | 'user-circle' | 'user-friends' | 'users' | 'vendors/graphql' | 'vendors/mobx' | 'vendors/ngrx' | 'vendors/redux' | 'vendors/vuex' | 'web-vitals' | 'wifi' | 'window-alt' | 'window-restore' | 'window-x' | 'window' | 'zoom-in';
+export type IconNames = 'alarm-clock' | 'alarm-plus' | 'all-sessions' | 'analytics' | 'anchor' | 'arrow-alt-square-right' | 'arrow-bar-left' | 'arrow-clockwise' | 'arrow-down-short' | 'arrow-down' | 'arrow-repeat' | 'arrow-right-short' | 'arrow-square-left' | 'arrow-square-right' | 'arrow-up-short' | 'arrow-up' | 'arrows-angle-extend' | 'avatar/icn_bear' | 'avatar/icn_beaver' | 'avatar/icn_bird' | 'avatar/icn_bison' | 'avatar/icn_camel' | 'avatar/icn_chameleon' | 'avatar/icn_deer' | 'avatar/icn_dog' | 'avatar/icn_dolphin' | 'avatar/icn_elephant' | 'avatar/icn_fish' | 'avatar/icn_fox' | 'avatar/icn_gorilla' | 'avatar/icn_hippo' | 'avatar/icn_horse' | 'avatar/icn_hyena' | 'avatar/icn_kangaroo' | 'avatar/icn_lemur' | 'avatar/icn_mammel' | 'avatar/icn_monkey' | 'avatar/icn_moose' | 'avatar/icn_panda' | 'avatar/icn_penguin' | 'avatar/icn_porcupine' | 'avatar/icn_quail' | 'avatar/icn_rabbit' | 'avatar/icn_rhino' | 'avatar/icn_sea_horse' | 'avatar/icn_sheep' | 'avatar/icn_snake' | 'avatar/icn_squirrel' | 'avatar/icn_tapir' | 'avatar/icn_turtle' | 'avatar/icn_vulture' | 'avatar/icn_wild1' | 'avatar/icn_wild_bore' | 'ban' | 'bar-chart-line' | 'bar-pencil' | 'bell-fill' | 'bell-plus' | 'bell-slash' | 'bell' | 'binoculars' | 'book' | 'browser/browser' | 'browser/chrome' | 'browser/edge' | 'browser/electron' | 'browser/facebook' | 'browser/firefox' | 'browser/ie' | 'browser/opera' | 'browser/safari' | 'bullhorn' | 'business-time' | 'calendar-alt' | 'calendar-check' | 'calendar-day' | 'calendar' | 'call' | 'camera-alt' | 'camera-video-off' | 'camera-video' | 'camera' | 'caret-down-fill' | 'caret-left-fill' | 'caret-right-fill' | 'caret-up-fill' | 'chat-dots' | 'chat-right-text' | 'chat-square-quote' | 'check-circle-fill' | 'check-circle' | 'check' | 'chevron-double-left' | 'chevron-double-right' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'circle-fill' | 'circle' | 'clipboard-list-check' | 'clock' | 'close' | 'cloud-fog2-fill' | 'code' | 'cog' | 'cogs' | 'collection' | 'columns-gap-filled' | 'columns-gap' | 'console/error' | 'console/exception' | 'console/info' | 'console/warning' | 'console' | 'controller' | 'cookies' | 'copy' | 'credit-card-front' | 'cubes' | 'dash' | 'dashboard-icn' | 'desktop' | 'device' | 'diagram-3' | 'dizzy' | 'door-closed' | 'doublecheck' | 'download' | 'drag' | 'edit' | 'ellipsis-v' | 'enter' | 'envelope' | 'errors-icon' | 'event/click' | 'event/clickrage' | 'event/code' | 'event/i-cursor' | 'event/input' | 'event/link' | 'event/location' | 'event/resize' | 'event/view' | 'exclamation-circle' | 'expand-wide' | 'explosion' | 'external-link-alt' | 'eye-slash-fill' | 'eye-slash' | 'eye' | 'fetch' | 'file-code' | 'file-medical-alt' | 'file-pdf' | 'file' | 'filter' | 'filters/arrow-return-right' | 'filters/browser' | 'filters/click' | 'filters/clickrage' | 'filters/code' | 'filters/console' | 'filters/country' | 'filters/cpu-load' | 'filters/custom' | 'filters/device' | 'filters/dom-complete' | 'filters/duration' | 'filters/error' | 'filters/fetch-failed' | 'filters/fetch' | 'filters/file-code' | 'filters/graphql' | 'filters/i-cursor' | 'filters/input' | 'filters/lcpt' | 'filters/link' | 'filters/location' | 'filters/memory-load' | 'filters/metadata' | 'filters/os' | 'filters/perfromance-network-request' | 'filters/platform' | 'filters/referrer' | 'filters/resize' | 'filters/rev-id' | 'filters/state-action' | 'filters/ttfb' | 'filters/user-alt' | 'filters/userid' | 'filters/view' | 'flag-na' | 'folder-plus' | 'folder2' | 'fullscreen' | 'funnel/cpu-fill' | 'funnel/cpu' | 'funnel/dizzy' | 'funnel/emoji-angry-fill' | 'funnel/emoji-angry' | 'funnel/emoji-dizzy-fill' | 'funnel/exclamation-circle-fill' | 'funnel/exclamation-circle' | 'funnel/file-earmark-break-fill' | 'funnel/file-earmark-break' | 'funnel/file-earmark-minus-fill' | 'funnel/file-earmark-minus' | 'funnel/file-medical-alt' | 'funnel/file-x' | 'funnel/hdd-fill' | 'funnel/hourglass-top' | 'funnel/image-fill' | 'funnel/image' | 'funnel/microchip' | 'funnel/mouse' | 'funnel/patch-exclamation-fill' | 'funnel/sd-card' | 'funnel-fill' | 'funnel-new' | 'funnel' | 'gear-fill' | 'gear' | 'geo-alt-fill-custom' | 'github' | 'graph-up-arrow' | 'graph-up' | 'grid-3x3' | 'grid-check' | 'grid-horizontal' | 'grip-horizontal' | 'hash' | 'hdd-stack' | 'headset' | 'heart-rate' | 'high-engagement' | 'history' | 'hourglass-start' | 'id-card' | 'image' | 'info-circle-fill' | 'info-circle' | 'info-square' | 'info' | 'inspect' | 'integrations/assist' | 'integrations/bugsnag-text' | 'integrations/bugsnag' | 'integrations/cloudwatch-text' | 'integrations/cloudwatch' | 'integrations/datadog' | 'integrations/elasticsearch-text' | 'integrations/elasticsearch' | 'integrations/github' | 'integrations/graphql' | 'integrations/jira-text' | 'integrations/jira' | 'integrations/mobx' | 'integrations/newrelic-text' | 'integrations/newrelic' | 'integrations/ngrx' | 'integrations/openreplay-text' | 'integrations/openreplay' | 'integrations/redux' | 'integrations/rollbar-text' | 'integrations/rollbar' | 'integrations/segment' | 'integrations/sentry-text' | 'integrations/sentry' | 'integrations/slack-bw' | 'integrations/slack' | 'integrations/stackdriver' | 'integrations/sumologic-text' | 'integrations/sumologic' | 'integrations/teams-white' | 'integrations/teams' | 'integrations/vuejs' | 'journal-code' | 'layer-group' | 'lightbulb-on' | 'lightbulb' | 'link-45deg' | 'list-alt' | 'list-arrow' | 'list-ul' | 'list' | 'lock-alt' | 'magic' | 'map-marker-alt' | 'memory' | 'mic-mute' | 'mic' | 'minus' | 'mobile' | 'mouse-alt' | 'network' | 'next1' | 'no-dashboard' | 'no-metrics-chart' | 'no-metrics' | 'os/android' | 'os/chrome_os' | 'os/fedora' | 'os/ios' | 'os/linux' | 'os/mac_os_x' | 'os/other' | 'os/ubuntu' | 'os/windows' | 'os' | 'pause-fill' | 'pause' | 'pdf-download' | 'pencil-stop' | 'pencil' | 'percent' | 'performance-icon' | 'person-fill' | 'person' | 'pie-chart-fill' | 'pin-fill' | 'play-circle-light' | 'play-circle' | 'play-fill-new' | 'play-fill' | 'play-hover' | 'play' | 'plus-circle' | 'plus' | 'prev1' | 'puzzle-piece' | 'puzzle' | 'question-circle' | 'question-lg' | 'quote-left' | 'quote-right' | 'quotes' | 'record-circle' | 'redo-back' | 'redo' | 'remote-control' | 'replay-10' | 'resources-icon' | 'safe-fill' | 'safe' | 'sandglass' | 'search' | 'search_notification' | 'server' | 'share-alt' | 'shield-lock' | 'signup' | 'skip-forward-fill' | 'skip-forward' | 'slack' | 'slash-circle' | 'sliders' | 'social/slack' | 'social/trello' | 'spinner' | 'star-solid' | 'star' | 'step-forward' | 'stop-record-circle' | 'stopwatch' | 'store' | 'sync-alt' | 'table-new' | 'table' | 'tablet-android' | 'tachometer-slow' | 'tachometer-slowest' | 'tags' | 'team-funnel' | 'telephone-fill' | 'telephone' | 'text-paragraph' | 'tools' | 'trash' | 'turtle' | 'user-alt' | 'user-circle' | 'user-friends' | 'users' | 'vendors/graphql' | 'vendors/mobx' | 'vendors/ngrx' | 'vendors/redux' | 'vendors/vuex' | 'web-vitals' | 'wifi' | 'window-alt' | 'window-restore' | 'window-x' | 'window' | 'zoom-in';
interface Props {
name: IconNames;
@@ -289,6 +289,7 @@ const SVG = (props: Props) => {
case 'integrations/stackdriver': return
;
case 'integrations/sumologic-text': return
;
case 'integrations/sumologic': return
;
+ case 'integrations/teams-white': return
;
case 'integrations/teams': return
;
case 'integrations/vuejs': return
;
case 'journal-code': return
;
diff --git a/frontend/app/duck/integrations/slack.js b/frontend/app/duck/integrations/slack.js
index 192bdd0cf..b8c4102a7 100644
--- a/frontend/app/duck/integrations/slack.js
+++ b/frontend/app/duck/integrations/slack.js
@@ -7,6 +7,7 @@ const SAVE = new RequestTypes('slack/SAVE');
const UPDATE = new RequestTypes('slack/UPDATE');
const REMOVE = new RequestTypes('slack/REMOVE');
const FETCH_LIST = new RequestTypes('slack/FETCH_LIST');
+const SEND_MSG = new RequestTypes('slack/SEND_MSG');
const EDIT = 'slack/EDIT';
const INIT = 'slack/INIT';
const idKey = 'webhookId';
@@ -61,7 +62,7 @@ export function save(instance) {
export function update(instance) {
return {
types: UPDATE.toArray(),
- call: (client) => client.put(`/integrations/slack/${instance.webhookId}`, instance.toData()),
+ call: (client) => client.post(`/integrations/slack/${instance.webhookId}`, instance.toData()),
};
}
@@ -86,3 +87,12 @@ export function remove(id) {
id,
};
}
+
+// https://api.openreplay.com/5587/integrations/slack/notify/315/sessions/7856803626558104
+//
+export function sendSlackMsg({ integrationId, entity, entityId, data }) {
+ return {
+ types: SEND_MSG.toArray(),
+ call: (client) => client.post(`/integrations/slack/notify/${integrationId}/${entity}/${entityId}`, data)
+ }
+}
diff --git a/frontend/app/duck/integrations/teams.js b/frontend/app/duck/integrations/teams.js
index 9d9add27a..c4158f52b 100644
--- a/frontend/app/duck/integrations/teams.js
+++ b/frontend/app/duck/integrations/teams.js
@@ -7,6 +7,8 @@ const SAVE = new RequestTypes('msteams/SAVE');
const UPDATE = new RequestTypes('msteams/UPDATE');
const REMOVE = new RequestTypes('msteams/REMOVE');
const FETCH_LIST = new RequestTypes('msteams/FETCH_LIST');
+const SEND_MSG = new RequestTypes('msteams/SEND_MSG');
+
const EDIT = 'msteams/EDIT';
const INIT = 'msteams/INIT';
const idKey = 'webhookId';
@@ -86,3 +88,12 @@ export function remove(id) {
id,
};
}
+
+// https://api.openreplay.com/5587/integrations/msteams/notify/315/sessions/7856803626558104
+//
+export function sendMsTeamsMsg({ integrationId, entity, entityId, data }) {
+ return {
+ types: SEND_MSG.toArray(),
+ call: (client) => client.post(`/integrations/msteams/notify/${integrationId}/${entity}/${entityId}`, data)
+ }
+}
diff --git a/frontend/app/mstore/notesStore.ts b/frontend/app/mstore/notesStore.ts
index 8e1db4aa7..1cb041049 100644
--- a/frontend/app/mstore/notesStore.ts
+++ b/frontend/app/mstore/notesStore.ts
@@ -130,4 +130,13 @@ export default class NotesStore {
console.error(e)
}
}
+
+ async sendMsTeamsNotification(noteId: string, webhook: string) {
+ try {
+ const resp = await notesService.sendMsTeamsNotification(noteId, webhook)
+ return resp
+ } catch (e) {
+ console.error(e)
+ }
+ }
}
diff --git a/frontend/app/services/NotesService.ts b/frontend/app/services/NotesService.ts
index dc4ed28b3..97534973e 100644
--- a/frontend/app/services/NotesService.ts
+++ b/frontend/app/services/NotesService.ts
@@ -119,4 +119,15 @@ export default class NotesService {
}
})
}
+
+ sendMsTeamsNotification(noteId: string, webhook: string) {
+ return this.client.get(`/notes/${noteId}/msteams/${webhook}`)
+ .then(r => {
+ if (r.ok) {
+ return r.json().then(r => r.data)
+ } else {
+ throw new Error('Error sending slack notif: ' + r.status)
+ }
+ })
+ }
}
diff --git a/frontend/app/svg/icons/integrations/teams-white.svg b/frontend/app/svg/icons/integrations/teams-white.svg
new file mode 100644
index 000000000..039205d76
--- /dev/null
+++ b/frontend/app/svg/icons/integrations/teams-white.svg
@@ -0,0 +1,4 @@
+