summaryrefslogtreecommitdiffstats
path: root/webapp/components/backstage
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/backstage')
-rw-r--r--webapp/components/backstage/installed_commands.jsx15
-rw-r--r--webapp/components/backstage/installed_incoming_webhooks.jsx15
-rw-r--r--webapp/components/backstage/installed_outgoing_webhooks.jsx15
3 files changed, 30 insertions, 15 deletions
diff --git a/webapp/components/backstage/installed_commands.jsx b/webapp/components/backstage/installed_commands.jsx
index 71373e077..df1f56687 100644
--- a/webapp/components/backstage/installed_commands.jsx
+++ b/webapp/components/backstage/installed_commands.jsx
@@ -5,6 +5,7 @@ import React from 'react';
import * as AsyncClient from 'utils/async_client.jsx';
import IntegrationStore from 'stores/integration_store.jsx';
+import TeamStore from 'stores/team_store.jsx';
import * as Utils from 'utils/utils.jsx';
import {FormattedMessage} from 'react-intl';
@@ -20,16 +21,18 @@ export default class InstalledCommands extends React.Component {
this.regenCommandToken = this.regenCommandToken.bind(this);
this.deleteCommand = this.deleteCommand.bind(this);
+ const teamId = TeamStore.getCurrentId();
+
this.state = {
- commands: IntegrationStore.getCommands(),
- loading: !IntegrationStore.hasReceivedCommands()
+ commands: IntegrationStore.getCommands(teamId),
+ loading: !IntegrationStore.hasReceivedCommands(teamId)
};
}
componentDidMount() {
IntegrationStore.addChangeListener(this.handleIntegrationChange);
- if (window.mm_config.EnableCommands === 'true' && this.state.loading) {
+ if (window.mm_config.EnableCommands === 'true') {
AsyncClient.listTeamCommands();
}
}
@@ -39,9 +42,11 @@ export default class InstalledCommands extends React.Component {
}
handleIntegrationChange() {
+ const teamId = TeamStore.getCurrentId();
+
this.setState({
- commands: IntegrationStore.getCommands(),
- loading: !IntegrationStore.hasReceivedCommands()
+ commands: IntegrationStore.getCommands(teamId),
+ loading: !IntegrationStore.hasReceivedCommands(teamId)
});
}
diff --git a/webapp/components/backstage/installed_incoming_webhooks.jsx b/webapp/components/backstage/installed_incoming_webhooks.jsx
index 389f65919..0a38a6ab5 100644
--- a/webapp/components/backstage/installed_incoming_webhooks.jsx
+++ b/webapp/components/backstage/installed_incoming_webhooks.jsx
@@ -5,6 +5,7 @@ import React from 'react';
import * as AsyncClient from 'utils/async_client.jsx';
import IntegrationStore from 'stores/integration_store.jsx';
+import TeamStore from 'stores/team_store.jsx';
import * as Utils from 'utils/utils.jsx';
import {FormattedMessage} from 'react-intl';
@@ -19,16 +20,18 @@ export default class InstalledIncomingWebhooks extends React.Component {
this.deleteIncomingWebhook = this.deleteIncomingWebhook.bind(this);
+ const teamId = TeamStore.getCurrentId();
+
this.state = {
- incomingWebhooks: IntegrationStore.getIncomingWebhooks(),
- loading: !IntegrationStore.hasReceivedIncomingWebhooks()
+ incomingWebhooks: IntegrationStore.getIncomingWebhooks(teamId),
+ loading: !IntegrationStore.hasReceivedIncomingWebhooks(teamId)
};
}
componentDidMount() {
IntegrationStore.addChangeListener(this.handleIntegrationChange);
- if (window.mm_config.EnableIncomingWebhooks === 'true' && this.state.loading) {
+ if (window.mm_config.EnableIncomingWebhooks === 'true') {
AsyncClient.listIncomingHooks();
}
}
@@ -38,9 +41,11 @@ export default class InstalledIncomingWebhooks extends React.Component {
}
handleIntegrationChange() {
+ const teamId = TeamStore.getCurrentId();
+
this.setState({
- incomingWebhooks: IntegrationStore.getIncomingWebhooks(),
- loading: !IntegrationStore.hasReceivedIncomingWebhooks()
+ incomingWebhooks: IntegrationStore.getIncomingWebhooks(teamId),
+ loading: !IntegrationStore.hasReceivedIncomingWebhooks(teamId)
});
}
diff --git a/webapp/components/backstage/installed_outgoing_webhooks.jsx b/webapp/components/backstage/installed_outgoing_webhooks.jsx
index e0817fda8..b79bc3530 100644
--- a/webapp/components/backstage/installed_outgoing_webhooks.jsx
+++ b/webapp/components/backstage/installed_outgoing_webhooks.jsx
@@ -5,6 +5,7 @@ import React from 'react';
import * as AsyncClient from 'utils/async_client.jsx';
import IntegrationStore from 'stores/integration_store.jsx';
+import TeamStore from 'stores/team_store.jsx';
import * as Utils from 'utils/utils.jsx';
import {FormattedMessage} from 'react-intl';
@@ -20,16 +21,18 @@ export default class InstalledOutgoingWebhooks extends React.Component {
this.regenOutgoingWebhookToken = this.regenOutgoingWebhookToken.bind(this);
this.deleteOutgoingWebhook = this.deleteOutgoingWebhook.bind(this);
+ const teamId = TeamStore.getCurrentId();
+
this.state = {
- outgoingWebhooks: IntegrationStore.getOutgoingWebhooks(),
- loading: !IntegrationStore.hasReceivedOutgoingWebhooks()
+ outgoingWebhooks: IntegrationStore.getOutgoingWebhooks(teamId),
+ loading: !IntegrationStore.hasReceivedOutgoingWebhooks(teamId)
};
}
componentDidMount() {
IntegrationStore.addChangeListener(this.handleIntegrationChange);
- if (window.mm_config.EnableOutgoingWebhooks === 'true' && this.state.loading) {
+ if (window.mm_config.EnableOutgoingWebhooks === 'true') {
AsyncClient.listOutgoingHooks();
}
}
@@ -39,9 +42,11 @@ export default class InstalledOutgoingWebhooks extends React.Component {
}
handleIntegrationChange() {
+ const teamId = TeamStore.getCurrentId();
+
this.setState({
- outgoingWebhooks: IntegrationStore.getOutgoingWebhooks(),
- loading: !IntegrationStore.hasReceivedOutgoingWebhooks()
+ outgoingWebhooks: IntegrationStore.getOutgoingWebhooks(teamId),
+ loading: !IntegrationStore.hasReceivedOutgoingWebhooks(teamId)
});
}