This commit is contained in:
ann 2023-06-16 16:20:10 +08:00
parent 109e553446
commit 3ed61a2a08
2 changed files with 25 additions and 21 deletions

View File

@ -82,7 +82,7 @@ export const constantRoutes = [
{
path: '/',
hidden: true,
redirect: '/monitorSelect'
redirect: '/monitorSelectBk'
},
{
path: '/monitorSelect',

View File

@ -117,29 +117,33 @@ export default {
},
methods: {
submitInfoEdit() {
const data = {
'templateId': '1',
'clusterName': this.editInfoForm.clusterName,
'namespace': {
'apiVersion': 'v1',
'kind': 'Namespace',
'metadata': {
'name': this.editInfoForm.ns_name,
'annotations': {
'kubesphere.io/creator': 'admin',
'kubesphere.io/description': this.editInfoForm.describe,
'kubesphere.io/alias-name': this.editInfoForm.alias
},
'labels': {
'jcce': 'true'
this.$refs.editInfoForm.validate((valid) => {
if (valid) {
const data = {
'templateId': '1',
'clusterName': this.editInfoForm.clusterName,
'namespace': {
'apiVersion': 'v1',
'kind': 'Namespace',
'metadata': {
'name': this.editInfoForm.ns_name,
'annotations': {
'kubesphere.io/creator': 'admin',
'kubesphere.io/description': this.editInfoForm.describe,
'kubesphere.io/alias-name': this.editInfoForm.alias
},
'labels': {
'jcce': 'true'
}
}
}
}
postNamespace(data).then(res => {
this.$message.success('创建成功')
this.createFormVisible = false
this.$emit('getList')
})
}
}
postNamespace(data).then(res => {
this.$message.success('创建成功')
this.createFormVisible = false
this.$emit('getList')
})
}
}