Skip to content

Commit

Permalink
fix(cosnole): when create ingress use apply (tkestack#2023)
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-hnny committed Jul 20, 2022
1 parent 76dced2 commit 0563821
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,15 @@ export class ResourceActionPanel extends React.Component<RootProps, ResouceActio

/** action for create button */
private _handleClickForCreate() {
const { route } = this.props,
const {
route,
subRoot: { resourceName }
} = this.props,
urlParams = router.resolve(route);
router.navigate(Object.assign({}, urlParams, { mode: 'create' }), route.queries);

// 使用yaml创建的资源导航到apply
const mode = ['ingress'].includes(resourceName) ? 'apply' : 'create';
router.navigate(Object.assign({}, urlParams, { mode }), route.queries);
}

/** 生成命名空间选择列表 */
Expand Down

0 comments on commit 0563821

Please sign in to comment.