|
@@ -13,7 +13,7 @@ const logger = loggerFactory('growi:SlackBotSettings');
|
|
|
|
|
|
|
|
const CustomBotWithProxySettings = (props) => {
|
|
const CustomBotWithProxySettings = (props) => {
|
|
|
const {
|
|
const {
|
|
|
- appContainer, slackAppIntegrations, proxyServerUri, connectionStatuses,
|
|
|
|
|
|
|
+ appContainer, slackAppIntegrations, proxyServerUri, onClickAddSlackWorkspaceBtn, connectionStatuses,
|
|
|
} = props;
|
|
} = props;
|
|
|
const [newProxyServerUri, setNewProxyServerUri] = useState();
|
|
const [newProxyServerUri, setNewProxyServerUri] = useState();
|
|
|
const [integrationIdToDelete, setIntegrationIdToDelete] = useState(null);
|
|
const [integrationIdToDelete, setIntegrationIdToDelete] = useState(null);
|
|
@@ -37,7 +37,9 @@ const CustomBotWithProxySettings = (props) => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const addSlackAppIntegrationHandler = async() => {
|
|
const addSlackAppIntegrationHandler = async() => {
|
|
|
- // TODO GW-6067 implement
|
|
|
|
|
|
|
+ if (onClickAddSlackWorkspaceBtn != null) {
|
|
|
|
|
+ onClickAddSlackWorkspaceBtn();
|
|
|
|
|
+ }
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const deleteSlackAppIntegrationHandler = async() => {
|
|
const deleteSlackAppIntegrationHandler = async() => {
|
|
@@ -55,8 +57,7 @@ const CustomBotWithProxySettings = (props) => {
|
|
|
|
|
|
|
|
const generateAccessTokens = async() => {
|
|
const generateAccessTokens = async() => {
|
|
|
try {
|
|
try {
|
|
|
- // GW-6068 set new value after this
|
|
|
|
|
- await appContainer.apiv3.put('/slack-integration-settings/access-tokens');
|
|
|
|
|
|
|
+ // TODO: imprement regenerating tokens by GW-6068
|
|
|
}
|
|
}
|
|
|
catch (err) {
|
|
catch (err) {
|
|
|
toastError(err);
|
|
toastError(err);
|
|
@@ -172,6 +173,7 @@ CustomBotWithProxySettings.propTypes = {
|
|
|
appContainer: PropTypes.instanceOf(AppContainer).isRequired,
|
|
appContainer: PropTypes.instanceOf(AppContainer).isRequired,
|
|
|
slackAppIntegrations: PropTypes.array,
|
|
slackAppIntegrations: PropTypes.array,
|
|
|
proxyServerUri: PropTypes.string,
|
|
proxyServerUri: PropTypes.string,
|
|
|
|
|
+ onClickAddSlackWorkspaceBtn: PropTypes.func,
|
|
|
fetchSlackIntegrationData: PropTypes.func,
|
|
fetchSlackIntegrationData: PropTypes.func,
|
|
|
connectionStatuses: PropTypes.object,
|
|
connectionStatuses: PropTypes.object,
|
|
|
};
|
|
};
|