diff --git a/src/components/DrawerGateWayAPI/index.js b/src/components/DrawerGateWayAPI/index.js index cef3a6a1e..0de94082c 100644 --- a/src/components/DrawerGateWayAPI/index.js +++ b/src/components/DrawerGateWayAPI/index.js @@ -371,7 +371,7 @@ class DrawerForm extends PureComponent { { if (data) { @@ -260,7 +259,8 @@ export default class index extends PureComponent { message: formatMessage({id:'notification.success.delete'}) }); this.setState({ - loading:false + loading:false, + delVisible: false },()=>{ if (appID) { this.handleGateWayAPI(appID); @@ -269,6 +269,11 @@ export default class index extends PureComponent { } }) } + }, + handleError: err =>{ + this.setState({ + delVisible: false + }) } }); }; diff --git a/src/models/gateWay.js b/src/models/gateWay.js index aba3d9151..709cff146 100644 --- a/src/models/gateWay.js +++ b/src/models/gateWay.js @@ -246,8 +246,8 @@ export default { callback(response) } }, - *deleteGateWayApi({ callback, payload }, { call }) { - const response = yield call(deleteGateWayApi, payload); + *deleteGateWayApi({ callback, payload, handleError }, { call }) { + const response = yield call(deleteGateWayApi, payload, handleError ); if (callback) { callback(response) } diff --git a/src/pages/GateWay/license.js b/src/pages/GateWay/license.js index 7acc4d300..2ecdc4330 100644 --- a/src/pages/GateWay/license.js +++ b/src/pages/GateWay/license.js @@ -418,7 +418,7 @@ class Control extends Component { currentRegionName ); breadcrumbList.push({ title: formatMessage({ id: 'teamGateway.strategy.manage' }) }); - const str = ` allowedRoutes:\n namespaces:\n from: All\n name: https\n port: 443\n protocol: HTTPS\n tls:\n certificateRefs:\n - group: ''\n kind: Secret\n name: ${name}\n mode: Terminate\n` + const str = ` - allowedRoutes:\n namespaces:\n from: All\n name: https\n port: 443\n protocol: HTTPS\n tls:\n certificateRefs:\n - group: ''\n kind: Secret\n name: ${name}\n mode: Terminate\n` return (