fix: 隐藏容器集群操作
parent
2d310224c8
commit
4db64f287b
|
@ -1,91 +0,0 @@
|
||||||
<template>
|
|
||||||
<div>
|
|
||||||
<el-dialog title="新增集群" width="40%" :close-on-click-modal="false" v-if="addData.dialog" :visible.sync="addData.dialog">
|
|
||||||
<cb-form :model="addData.data" ref="data">
|
|
||||||
<el-row :gutter="10">
|
|
||||||
<el-col :span="24">
|
|
||||||
<cb-form-item label="地域:" prop="region" validate="required" required-message="请选择地域">
|
|
||||||
<el-select v-model="addData.data.region" filterable>
|
|
||||||
<el-option v-for="(item, index) in regions" :key="index" :label="item.regionName" :value="item.alias"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</cb-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</cb-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="ghost" @click.native="addData.dialog = false">取消</el-button>
|
|
||||||
<el-button type="primary" @click.native="ok">确定</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
/* global $ */
|
|
||||||
import { modifyInstance, getTKERegions } from 'views/resource/ctstack/services/tke.js'
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
addData: {
|
|
||||||
type: Object,
|
|
||||||
default: function () {
|
|
||||||
return {
|
|
||||||
data: {
|
|
||||||
name: '',
|
|
||||||
vendorId: -1
|
|
||||||
},
|
|
||||||
dialog: false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
vendorId: {
|
|
||||||
type: Number,
|
|
||||||
default: 0
|
|
||||||
},
|
|
||||||
platformObject: {
|
|
||||||
type: Object,
|
|
||||||
default() {
|
|
||||||
return {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
regions: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getRegionList() {
|
|
||||||
this.regions = []
|
|
||||||
getTKERegions({
|
|
||||||
vendorId: this.vendorId
|
|
||||||
}).then(data => {
|
|
||||||
if (data.success) {
|
|
||||||
this.regions = data.data.regionInstanceSet
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
ok() {
|
|
||||||
this.$refs.data.validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
const param = {
|
|
||||||
id: this.addData.data.id,
|
|
||||||
newName: this.addData.data.name
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {},
|
|
||||||
watch: {
|
|
||||||
'addData.dialog': {
|
|
||||||
handler(newVal, oldVal) {
|
|
||||||
if (newVal) {
|
|
||||||
this.getRegionList()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
deep: true,
|
|
||||||
immediate: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
|
@ -30,11 +30,11 @@
|
||||||
<service ref="serviceTable" v-if="serviceVisible" :vendorId="platformObject.vendorId" :clusterInfo="clusterInfo" @close="closeService"></service>
|
<service ref="serviceTable" v-if="serviceVisible" :vendorId="platformObject.vendorId" :clusterInfo="clusterInfo" @close="closeService"></service>
|
||||||
<modify-cluster :add-data="modifyClusterData" :vendor-id="platformObject.vendorId" v-if="modifyClusterData.dialog"></modify-cluster>
|
<modify-cluster :add-data="modifyClusterData" :vendor-id="platformObject.vendorId" v-if="modifyClusterData.dialog"></modify-cluster>
|
||||||
<delete-cluster :data="deleteClusterData" :vendor-id="platformObject.vendorId" v-if="deleteClusterData.dialog" :clusterInfo="clusterInfo"></delete-cluster>
|
<delete-cluster :data="deleteClusterData" :vendor-id="platformObject.vendorId" v-if="deleteClusterData.dialog" :clusterInfo="clusterInfo"></delete-cluster>
|
||||||
<add-cluster :add-data="addClusterData" :vendor-id="platformObject.vendorId" :platform-object="platformObject" v-if="addClusterData.dialog"></add-cluster>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
// 整个 container 都是从 TCE 复制过来, 有不需要的暂时不删除
|
||||||
import bind from './bind.vue'
|
import bind from './bind.vue'
|
||||||
import { getClusterList } from 'views/resource/ctstack/services/tke.js'
|
import { getClusterList } from 'views/resource/ctstack/services/tke.js'
|
||||||
import { removeFloatIp, detailFloatIp } from 'views/resource/ctstack/services/floatips.js'
|
import { removeFloatIp, detailFloatIp } from 'views/resource/ctstack/services/floatips.js'
|
||||||
|
@ -42,9 +42,8 @@ import { getRegion } from 'views/resource/ctstack/services/regions.js'
|
||||||
import service from './service/index.vue'
|
import service from './service/index.vue'
|
||||||
import modifyCluster from './modifyCluster.vue'
|
import modifyCluster from './modifyCluster.vue'
|
||||||
import deleteCluster from './deleteCluster.vue'
|
import deleteCluster from './deleteCluster.vue'
|
||||||
import addCluster from './addCluster.vue'
|
|
||||||
import webSocket from '@cmp/cmp-common/mixins/getGlobalSocket'
|
import webSocket from '@cmp/cmp-common/mixins/getGlobalSocket'
|
||||||
import detail from './detail'
|
import detail from './detail.vue'
|
||||||
import AssignTenant from 'views/platform/assign/index.vue'
|
import AssignTenant from 'views/platform/assign/index.vue'
|
||||||
const Clustercolumns = [
|
const Clustercolumns = [
|
||||||
{
|
{
|
||||||
|
@ -111,7 +110,6 @@ export default {
|
||||||
service,
|
service,
|
||||||
modifyCluster,
|
modifyCluster,
|
||||||
deleteCluster,
|
deleteCluster,
|
||||||
addCluster,
|
|
||||||
detail,
|
detail,
|
||||||
AssignTenant
|
AssignTenant
|
||||||
},
|
},
|
||||||
|
@ -156,10 +154,6 @@ export default {
|
||||||
dialog: false,
|
dialog: false,
|
||||||
data: {}
|
data: {}
|
||||||
},
|
},
|
||||||
addClusterData: {
|
|
||||||
dialog: false,
|
|
||||||
data: {}
|
|
||||||
},
|
|
||||||
deleteClusterData: {
|
deleteClusterData: {
|
||||||
dialog: false,
|
dialog: false,
|
||||||
data: {}
|
data: {}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
</template>
|
</template>
|
||||||
</cb-advance-table>
|
</cb-advance-table>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-top: 20px; padding-ledt: 10px">
|
<div style="padding-top: 20px; padding-left: 10px">
|
||||||
<el-checkbox disabled checked>销毁按量计费的节点(销毁后不可恢复,请谨慎操作,并提前备份好数据)</el-checkbox>
|
<el-checkbox disabled checked>销毁按量计费的节点(销毁后不可恢复,请谨慎操作,并提前备份好数据)</el-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
|
|
|
@ -48,13 +48,13 @@
|
||||||
<el-tab-pane label="节点管理" name="instance">
|
<el-tab-pane label="节点管理" name="instance">
|
||||||
<instance :detail="detail"></instance>
|
<instance :detail="detail"></instance>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="伸缩组" name="2">
|
<el-tab-pane label="伸缩组" name="2" v-if="false">
|
||||||
<flexible :clusterInfo="detail" :vendor-id="detail.vendorId"></flexible>
|
<flexible :clusterInfo="detail" :vendor-id="detail.vendorId"></flexible>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="地域列表" name="3">
|
<el-tab-pane label="地域列表" name="3" v-if="false">
|
||||||
<region :detail="detail" :platform-object="platformObject"></region>
|
<region :detail="detail" :platform-object="platformObject"></region>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="密钥信息" name="4">
|
<el-tab-pane label="密钥信息" name="4" v-if="false">
|
||||||
<key :detail="detail"></key>
|
<key :detail="detail"></key>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import cluster from './cluster.vue'
|
import cluster from './cluster.vue'
|
||||||
// 从 TCE 复制过来
|
// 整个 container 都是从 TCE 复制过来, 有不需要的暂时不删除
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
platformObject: {
|
platformObject: {
|
||||||
|
|
|
@ -94,15 +94,15 @@ const columns = [
|
||||||
{
|
{
|
||||||
label: '创建时间',
|
label: '创建时间',
|
||||||
prop: 'createTime'
|
prop: 'createTime'
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '操作',
|
|
||||||
prop: 'id',
|
|
||||||
width: '200px',
|
|
||||||
disabled: true,
|
|
||||||
showOverflowTooltip: false,
|
|
||||||
scopedSlots: { customRender: 'operate' }
|
|
||||||
}
|
}
|
||||||
|
// {
|
||||||
|
// label: '操作',
|
||||||
|
// prop: 'id',
|
||||||
|
// width: '200px',
|
||||||
|
// disabled: true,
|
||||||
|
// showOverflowTooltip: false,
|
||||||
|
// scopedSlots: { customRender: 'operate' }
|
||||||
|
// }
|
||||||
]
|
]
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -13,7 +13,6 @@ export default {
|
||||||
ctstackFloatIp: () => import('views/resource/ctstack/page/floatIp/index.vue'),
|
ctstackFloatIp: () => import('views/resource/ctstack/page/floatIp/index.vue'),
|
||||||
ctstackSnapshot: () => import('views/resource/ctstack/page/snapshot/index.vue'),
|
ctstackSnapshot: () => import('views/resource/ctstack/page/snapshot/index.vue'),
|
||||||
ctstackContainer: () => import('views/resource/ctstack/page/container/index.vue'),
|
ctstackContainer: () => import('views/resource/ctstack/page/container/index.vue'),
|
||||||
ctstackClusterAdd: () => import('views/resource/ctstack/page/container/addCluster.vue'),
|
|
||||||
ctstackCreateCluster: () => import('views/resource/ctstack/page/container/creatCluster/index.vue'),
|
ctstackCreateCluster: () => import('views/resource/ctstack/page/container/creatCluster/index.vue'),
|
||||||
ctstackInstanceAdd: () => import('views/resource/ctstack/page/container/instance/create/index.vue'),
|
ctstackInstanceAdd: () => import('views/resource/ctstack/page/container/instance/create/index.vue'),
|
||||||
ctstackAddBareMetal: () => import('views/resource/ctstack/page/bareMetal/addBareMetal.vue'),
|
ctstackAddBareMetal: () => import('views/resource/ctstack/page/bareMetal/addBareMetal.vue'),
|
||||||
|
|
Loading…
Reference in New Issue