Skip to content

Commit

Permalink
fix: coding-17334,coding-#17335,coding-#17337 (#1193)
Browse files Browse the repository at this point in the history
* fix: Function name modification

* fix: coding-17334,coding-#17335,coding-#17337

---------

Co-authored-by: xuzl <guox@MacBook-Pro-For-Xuzl.local>
Co-authored-by: songyg <94501396+RainBondsongyg@users.noreply.github.com>
  • Loading branch information
3 people committed Mar 22, 2023
1 parent 4bd90ed commit ed1b262
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/DrawerGateWayAPI/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ class DrawerForm extends PureComponent {
<Drawer
title={editInfo ? formatMessage({ id: 'teamGateway.DrawerGateWayAPI.edit' }) : formatMessage({ id: 'teamGateway.DrawerGateWayAPI.add' })}
placement="right"
width={650}
width={700}
closable={false}
onClose={onClose}
visible={this.props.visible}
Expand Down
9 changes: 7 additions & 2 deletions src/components/GatewayApi/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,15 +252,15 @@ export default class index extends PureComponent {
team_name: globalUtil.getCurrTeamName(),
name: values.name,
app_id: values.app_id,
delVisible: false
},
callback: data => {
if (data) {
notification.success({
message: formatMessage({id:'notification.success.delete'})
});
this.setState({
loading:false
loading:false,
delVisible: false
},()=>{
if (appID) {
this.handleGateWayAPI(appID);
Expand All @@ -269,6 +269,11 @@ export default class index extends PureComponent {
}
})
}
},
handleError: err =>{
this.setState({
delVisible: false
})
}
});
};
Expand Down
4 changes: 2 additions & 2 deletions src/models/gateWay.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/GateWay/license.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<PageHeaderLayout
title={formatMessage({ id: 'teamGateway.certificate.title' })}
Expand Down
5 changes: 3 additions & 2 deletions src/services/gateWay.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,15 +456,16 @@ export async function editDetailGateWayApi(params, handleError) {
}

/** 删除 GateWayApi 详情 */
export async function deleteGateWayApi(params) {
export async function deleteGateWayApi(params, handleError) {
return request(
`${apiconfig.baseUrl}/console/teams/${params.team_name}/gateway-http-route`,
{
method: 'DELETE',
params: {
name: params.name,
region_app_id: params.app_id
}
},
handleError
}
);
}

0 comments on commit ed1b262

Please sign in to comment.