refactor: k8s 环境指定namespace

This commit is contained in:
Captain.B 2020-12-30 10:34:17 +08:00
parent 9be10ec291
commit 4cf7c06f07
2 changed files with 23 additions and 4 deletions

@ -1 +1 @@
Subproject commit f27d1609d77f7d6c988d37d709466e844d350e17
Subproject commit 6f082f93de680139816f95349fc95cf538784c20

View File

@ -66,7 +66,7 @@
</el-form-item>
<el-form-item :label="$t('test_resource_pool.type')" prop="type">
<el-select v-model="form.type" :placeholder="$t('test_resource_pool.select_pool_type')"
@change="changeResourceType()">
@change="changeResourceType(form.type)">
<el-option key="NODE" value="NODE" label="Node">Node</el-option>
<el-option key="K8S" value="K8S" label="Kubernetes" v-xpack>Kubernetes</el-option>
</el-select>
@ -89,6 +89,14 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item label="Namespace"
:rules="requiredRules">
<el-input v-model="item.namespace" type="text"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item :label="$t('test_resource_pool.max_threads')"
@ -205,9 +213,20 @@ export default {
this.total = data.itemCount;
})
},
changeResourceType() {
changeResourceType(type) {
this.infoList = [];
this.infoList.push({})
let info = {};
if (type === 'NODE') {
info.ip = '';
info.port = '8082';
}
if (type === 'K8S') {
info.masterUrl = '';
info.token = '';
info.namespace = '';
}
info.maxConcurrency = 100;
this.infoList.push(info);
},
addResourceInfo() {