diff --git a/src/components/ListTable/formatters/ActionsFormatter.vue b/src/components/ListTable/formatters/ActionsFormatter.vue
index 616345917..290a9e75b 100644
--- a/src/components/ListTable/formatters/ActionsFormatter.vue
+++ b/src/components/ListTable/formatters/ActionsFormatter.vue
@@ -92,7 +92,7 @@ export default {
colActions: colActions,
defaultActions: defaultActions,
extraActions: colActions.extraActions,
- moreActionsTitle: colActions.moreActionsTitle
+ moreActionsTitle: colActions.moreActionsTitle || this.$t('common.More')
}
},
computed: {
diff --git a/src/i18n/langs/cn.json b/src/i18n/langs/cn.json
index ef57ced7e..9edbaae4e 100644
--- a/src/i18n/langs/cn.json
+++ b/src/i18n/langs/cn.json
@@ -29,6 +29,8 @@
"": ""
},
"assets": {
+ "PasswordWithoutSpecialCharHelpText": "不能包含特殊字符",
+ "GatewayProtocolHelpText": "SSH网关,支持代理SSH,RDP和VNC",
"FullName": "全称",
"Key": "键",
"NodeInformation": "节点信息",
@@ -416,10 +418,10 @@
"DatabaseAppPermissionDetail": "数据库授权详情",
"DatabaseAppPermissionUpdate": "更新数据库授权规则",
"DatabaseAppUpdate": "",
- "DomainCreate": "创建网关",
- "DomainDetail": "域名详情",
- "DomainList": "网关列表",
- "DomainUpdate": "更新网关",
+ "DomainCreate": "创建网域",
+ "DomainDetail": "网域详情",
+ "DomainList": "网域列表",
+ "DomainUpdate": "更新网域",
"FileManager": "文件管理",
"FtpLog": "FTP日志",
"GatewayCreate": "创建网关",
diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json
index 926765a9a..f6b919efb 100644
--- a/src/i18n/langs/en.json
+++ b/src/i18n/langs/en.json
@@ -29,6 +29,8 @@
"": ""
},
"assets": {
+ "PasswordWithoutSpecialCharHelpText": "Password can't has special chars ",
+ "GatewayProtocolHelpText": "SSH protocol gateway, support proxy SSH, RDP, VNC",
"FullName": "Full name",
"Key": "Key",
"NodeInformation": "Node information",
diff --git a/src/layout/components/GenericCreateUpdateForm/index.vue b/src/layout/components/GenericCreateUpdateForm/index.vue
index 992437205..a64a02cf7 100644
--- a/src/layout/components/GenericCreateUpdateForm/index.vue
+++ b/src/layout/components/GenericCreateUpdateForm/index.vue
@@ -87,6 +87,12 @@ export default {
}
}
},
+ getNextRoute: {
+ type: Function,
+ default(res, method) {
+ return method === 'post' ? this.createSuccessNextRoute : this.updateSuccessNextRoute
+ }
+ },
getUrl: {
type: Function,
default: function() {
@@ -136,12 +142,16 @@ export default {
defaultOnSubmit(validValues) {
const performSubmit = this.performSubmit || this.defaultPerformSubmit
const msg = this.method === 'post' ? this.createSuccessMsg : this.updateSuccessMsg
- const route = this.method === 'post' ? this.createSuccessNextRoute : this.updateSuccessNextRoute
+ const event = this.method === 'post' ? 'createSuccess' : 'updateSuccess'
this.isSubmitting = true
- performSubmit(validValues).then(() => {
+ performSubmit(validValues).then((res) => {
+ const route = this.getNextRoute(res, this.method)
+ this.$emit(event, res)
+ this.$emit('submitSuccess', res)
this.$message.success(msg)
- this.$router.push(route)
+ setTimeout(() => this.$router.push(route), 100)
}).catch(error => {
+ this.$emit('submitError', error)
const response = error.response
const data = response.data
if (response.status === 400) {
diff --git a/src/router/assets.js b/src/router/assets.js
index 6f684da10..124fcea1a 100644
--- a/src/router/assets.js
+++ b/src/router/assets.js
@@ -55,14 +55,14 @@ export default [
hidden: true
},
{
- path: 'domains/:domainid/gateway/create',
+ path: 'gateways/create',
name: 'GatewayCreate',
component: () => import('@/views/assets/Domain/DomainDetail/GatewayCreateUpdate.vue'),
meta: { title: i18n.t('route.GatewayCreate'), activeMenu: '/assets/domains' },
hidden: true
},
{
- path: 'domains/gateway/:id/create',
+ path: 'gateways/:id/update',
name: 'GatewayUpdate',
component: () => import('@/views/assets/Domain/DomainDetail/GatewayCreateUpdate.vue'),
meta: { title: i18n.t('route.GatewayUpdate'), activeMenu: '/assets/domains' },
diff --git a/src/views/assets/Domain/DomainDetail/GatewayCreateUpdate.vue b/src/views/assets/Domain/DomainDetail/GatewayCreateUpdate.vue
index b405af42b..d0feed735 100644
--- a/src/views/assets/Domain/DomainDetail/GatewayCreateUpdate.vue
+++ b/src/views/assets/Domain/DomainDetail/GatewayCreateUpdate.vue
@@ -4,14 +4,14 @@
:initial="initial"
:fields-meta="fieldsMeta"
:url="url"
- :create-success-next-route="createSuccessNextRoute"
- :update-success-next-route="updateSuccessNextRoute"
+ :get-next-route="getNextRoute"
/>
diff --git a/src/views/assets/Domain/DomainDetail/GatewayList.vue b/src/views/assets/Domain/DomainDetail/GatewayList.vue
index 2d2a45171..73d272df4 100644
--- a/src/views/assets/Domain/DomainDetail/GatewayList.vue
+++ b/src/views/assets/Domain/DomainDetail/GatewayList.vue
@@ -3,7 +3,6 @@