Merge branch 'dev' of github.com:fit2cloudrd/metersphere-server into dev
This commit is contained in:
commit
ca66c782d8
|
@ -46,7 +46,7 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-dialog :title="title" :visible.sync="createVisible">
|
<el-dialog :title="title" :visible.sync="createVisible">
|
||||||
<el-form :model="form" :rules="rules" ref="form" label-position="left" label-width="100px" size="small">
|
<el-form :model="form" :rules="rules" ref="form" label-position="right" label-width="100px" size="small">
|
||||||
<el-form-item :label="$t('commons.name')">
|
<el-form-item :label="$t('commons.name')">
|
||||||
<el-input v-model="form.name" autocomplete="off"></el-input>
|
<el-input v-model="form.name" autocomplete="off"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-dialog :title="$t('member.create')" :visible.sync="createVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
<el-dialog :title="$t('member.create')" :visible.sync="createVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
||||||
<el-form :model="form" ref="form" :rules="rules" label-position="left" label-width="100px" size="small">
|
<el-form :model="form" ref="form" :rules="rules" label-position="right" label-width="100px" size="small">
|
||||||
<el-form-item :label="$t('commons.member')" prop="userIds">
|
<el-form-item :label="$t('commons.member')" prop="userIds">
|
||||||
<el-select v-model="form.userIds" multiple :placeholder="$t('member.please_choose_member')" class="select-width">
|
<el-select v-model="form.userIds" multiple :placeholder="$t('member.please_choose_member')" class="select-width">
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog :title="$t('member.modify')" :visible.sync="updateVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
<el-dialog :title="$t('member.modify')" :visible.sync="updateVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
||||||
<el-form :model="form" label-position="left" label-width="100px" size="small" ref="updateUserForm">
|
<el-form :model="form" label-position="right" label-width="100px" size="small" ref="updateUserForm">
|
||||||
<el-form-item label="ID" prop="id">
|
<el-form-item label="ID" prop="id">
|
||||||
<el-input v-model="form.id" autocomplete="off" :disabled="true"/>
|
<el-input v-model="form.id" autocomplete="off" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-dialog :title="$t('workspace.create')" :visible.sync="createVisible" width="30%">
|
<el-dialog :title="$t('workspace.create')" :visible.sync="createVisible" width="30%">
|
||||||
<el-form :model="form" :rules="rules" ref="form" label-position="left" label-width="100px" size="small">
|
<el-form :model="form" :rules="rules" ref="form" label-position="right" label-width="100px" size="small">
|
||||||
<el-form-item :label="$t('commons.name')" prop="name">
|
<el-form-item :label="$t('commons.name')" prop="name">
|
||||||
<el-input v-model="form.name" autocomplete="off"/>
|
<el-input v-model="form.name" autocomplete="off"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -114,7 +114,7 @@
|
||||||
|
|
||||||
<!-- add workspace member dialog -->
|
<!-- add workspace member dialog -->
|
||||||
<el-dialog :title="$t('member.create')" :visible.sync="addMemberVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
<el-dialog :title="$t('member.create')" :visible.sync="addMemberVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
||||||
<el-form :model="memberForm" ref="form" :rules="wsMemberRule" label-position="left" label-width="100px" size="small">
|
<el-form :model="memberForm" ref="form" :rules="wsMemberRule" label-position="right" label-width="100px" size="small">
|
||||||
<el-form-item :label="$t('commons.member')" prop="userIds">
|
<el-form-item :label="$t('commons.member')" prop="userIds">
|
||||||
<el-select v-model="memberForm.userIds" multiple :placeholder="$t('member.please_choose_member')" class="select-width">
|
<el-select v-model="memberForm.userIds" multiple :placeholder="$t('member.please_choose_member')" class="select-width">
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -145,7 +145,7 @@
|
||||||
|
|
||||||
<!-- update workspace member dialog -->
|
<!-- update workspace member dialog -->
|
||||||
<el-dialog :title="$t('member.modify')" :visible.sync="updateMemberVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
<el-dialog :title="$t('member.modify')" :visible.sync="updateMemberVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
||||||
<el-form :model="memberForm" label-position="left" label-width="100px" size="small" ref="updateUserForm">
|
<el-form :model="memberForm" label-position="right" label-width="100px" size="small" ref="updateUserForm">
|
||||||
<el-form-item label="ID" prop="id">
|
<el-form-item label="ID" prop="id">
|
||||||
<el-input v-model="memberForm.id" autocomplete="off" :disabled="true"/>
|
<el-input v-model="memberForm.id" autocomplete="off" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<el-dialog :title="$t('member.modify_personal_info')" :visible.sync="updateVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
<el-dialog :title="$t('member.modify_personal_info')" :visible.sync="updateVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
||||||
<el-form :model="form" label-position="left" label-width="100px" size="small" :rules="rule" ref="updateUserForm">
|
<el-form :model="form" label-position="right" label-width="100px" size="small" :rules="rule" ref="updateUserForm">
|
||||||
<el-form-item label="ID" prop="id">
|
<el-form-item label="ID" prop="id">
|
||||||
<el-input v-model="form.id" autocomplete="off" :disabled="true"/>
|
<el-input v-model="form.id" autocomplete="off" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
|
@ -101,7 +101,7 @@
|
||||||
|
|
||||||
<!-- add organization form -->
|
<!-- add organization form -->
|
||||||
<el-dialog :title="$t('organization.create')" :visible.sync="createVisible" width="30%" @closed="closeFunc" :destroy-on-close="true">
|
<el-dialog :title="$t('organization.create')" :visible.sync="createVisible" width="30%" @closed="closeFunc" :destroy-on-close="true">
|
||||||
<el-form :model="form" label-position="left" label-width="100px" size="small" :rules="rule" ref="createOrganization">
|
<el-form :model="form" label-position="right" label-width="100px" size="small" :rules="rule" ref="createOrganization">
|
||||||
<el-form-item :label="$t('commons.name')" prop="name">
|
<el-form-item :label="$t('commons.name')" prop="name">
|
||||||
<el-input v-model="form.name" autocomplete="off"/>
|
<el-input v-model="form.name" autocomplete="off"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -116,7 +116,7 @@
|
||||||
|
|
||||||
<!-- update organization form -->
|
<!-- update organization form -->
|
||||||
<el-dialog :title="$t('organization.modify')" :visible.sync="updateVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
<el-dialog :title="$t('organization.modify')" :visible.sync="updateVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
||||||
<el-form :model="form" label-position="left" label-width="100px" size="small" :rules="rule" ref="updateOrganizationForm">
|
<el-form :model="form" label-position="right" label-width="100px" size="small" :rules="rule" ref="updateOrganizationForm">
|
||||||
<el-form-item :label="$t('commons.name')" prop="name">
|
<el-form-item :label="$t('commons.name')" prop="name">
|
||||||
<el-input v-model="form.name" autocomplete="off"/>
|
<el-input v-model="form.name" autocomplete="off"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -131,7 +131,7 @@
|
||||||
|
|
||||||
<!-- add organization member form -->
|
<!-- add organization member form -->
|
||||||
<el-dialog :title="$t('member.create')" :visible.sync="addMemberVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
<el-dialog :title="$t('member.create')" :visible.sync="addMemberVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
||||||
<el-form :model="memberForm" ref="form" :rules="orgMemberRule" label-position="left" label-width="100px" size="small">
|
<el-form :model="memberForm" ref="form" :rules="orgMemberRule" label-position="right" label-width="100px" size="small">
|
||||||
<el-form-item :label="$t('commons.member')" prop="userIds">
|
<el-form-item :label="$t('commons.member')" prop="userIds">
|
||||||
<el-select v-model="memberForm.userIds" multiple :placeholder="$t('member.please_choose_member')" class="select-width">
|
<el-select v-model="memberForm.userIds" multiple :placeholder="$t('member.please_choose_member')" class="select-width">
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -162,7 +162,7 @@
|
||||||
|
|
||||||
<!-- update organization member form -->
|
<!-- update organization member form -->
|
||||||
<el-dialog :title="$t('member.modify')" :visible.sync="updateMemberVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
<el-dialog :title="$t('member.modify')" :visible.sync="updateMemberVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
||||||
<el-form :model="memberForm" label-position="left" label-width="100px" size="small" ref="updateUserForm">
|
<el-form :model="memberForm" label-position="right" label-width="100px" size="small" ref="updateUserForm">
|
||||||
<el-form-item label="ID" prop="id">
|
<el-form-item label="ID" prop="id">
|
||||||
<el-input v-model="memberForm.id" autocomplete="off" :disabled="true"/>
|
<el-input v-model="memberForm.id" autocomplete="off" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
|
|
||||||
<!-- add workspace dialog -->
|
<!-- add workspace dialog -->
|
||||||
<el-dialog :title="$t('workspace.create')" :visible.sync="createVisible" width="30%">
|
<el-dialog :title="$t('workspace.create')" :visible.sync="createVisible" width="30%">
|
||||||
<el-form :model="form" :rules="rules" ref="form" label-position="left" label-width="100px" size="small">
|
<el-form :model="form" :rules="rules" ref="form" label-position="right" label-width="100px" size="small">
|
||||||
<el-form-item :label="$t('commons.name')" prop="name">
|
<el-form-item :label="$t('commons.name')" prop="name">
|
||||||
<el-input v-model="form.name" autocomplete="off"/>
|
<el-input v-model="form.name" autocomplete="off"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
|
|
||||||
<!-- update workspace dialog -->
|
<!-- update workspace dialog -->
|
||||||
<el-dialog :title="$t('workspace.update')" :visible.sync="updateVisible" width="30%">
|
<el-dialog :title="$t('workspace.update')" :visible.sync="updateVisible" width="30%">
|
||||||
<el-form :model="form" :rules="rules" ref="updateForm" label-position="left" label-width="100px" size="small">
|
<el-form :model="form" :rules="rules" ref="updateForm" label-position="right" label-width="100px" size="small">
|
||||||
<el-form-item :label="$t('commons.name')" prop="name">
|
<el-form-item :label="$t('commons.name')" prop="name">
|
||||||
<el-input v-model="form.name" autocomplete="off"/>
|
<el-input v-model="form.name" autocomplete="off"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -154,7 +154,7 @@
|
||||||
|
|
||||||
<!-- add workspace member dialog -->
|
<!-- add workspace member dialog -->
|
||||||
<el-dialog :title="$t('member.create')" :visible.sync="addMemberVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
<el-dialog :title="$t('member.create')" :visible.sync="addMemberVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
||||||
<el-form :model="memberForm" ref="form" :rules="wsMemberRule" label-position="left" label-width="100px" size="small">
|
<el-form :model="memberForm" ref="form" :rules="wsMemberRule" label-position="right" label-width="100px" size="small">
|
||||||
<el-form-item :label="$t('commons.member')" prop="userIds">
|
<el-form-item :label="$t('commons.member')" prop="userIds">
|
||||||
<el-select v-model="memberForm.userIds" multiple :placeholder="$t('member.please_choose_member')" class="select-width">
|
<el-select v-model="memberForm.userIds" multiple :placeholder="$t('member.please_choose_member')" class="select-width">
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -185,7 +185,7 @@
|
||||||
|
|
||||||
<!-- update workspace member dialog -->
|
<!-- update workspace member dialog -->
|
||||||
<el-dialog :title="$t('member.modify')" :visible.sync="updateMemberVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
<el-dialog :title="$t('member.modify')" :visible.sync="updateMemberVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
||||||
<el-form :model="memberForm" label-position="left" label-width="100px" size="small" ref="updateUserForm">
|
<el-form :model="memberForm" label-position="right" label-width="100px" size="small" ref="updateUserForm">
|
||||||
<el-form-item label="ID" prop="id">
|
<el-form-item label="ID" prop="id">
|
||||||
<el-input v-model="memberForm.id" autocomplete="off" :disabled="true"/>
|
<el-input v-model="memberForm.id" autocomplete="off" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
|
@ -70,7 +70,7 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-dialog title="创建资源池" :visible.sync="createVisible" width="70%" @closed="closeFunc" :destroy-on-close="true">
|
<el-dialog title="创建资源池" :visible.sync="createVisible" width="70%" @closed="closeFunc" :destroy-on-close="true">
|
||||||
<el-form :model="form" label-position="left" label-width="100px" size="small" :rules="rule"
|
<el-form :model="form" label-position="right" label-width="100px" size="small" :rules="rule"
|
||||||
ref="createTestResourcePoolForm">
|
ref="createTestResourcePoolForm">
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="名称" prop="name">
|
||||||
<el-input v-model="form.name" autocomplete="off"/>
|
<el-input v-model="form.name" autocomplete="off"/>
|
||||||
|
@ -85,46 +85,41 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div v-for="(item,index) in infoList " :key="index">
|
<div v-for="(item,index) in infoList " :key="index">
|
||||||
<div class="current-row" v-if="form.type === 'K8S'">
|
<div class="node-line" v-if="form.type === 'K8S'">
|
||||||
<div style="width: 35%;float: left">
|
<div class="k8s-master">
|
||||||
<label class="el-form-item__label">Master URL</label>
|
<el-col :span="11">
|
||||||
<div class="el-form-item__content" style="margin-left: 100px">
|
|
||||||
<input v-model="item.masterUrl" autocomplete="off" class="el-input__inner form-input"/>
|
</el-col>
|
||||||
</div>
|
<el-form-item prop="masterUrl" label="Master URL">
|
||||||
</div>
|
<el-input v-model="item.masterUrl" autocomplete="off"/>
|
||||||
<div style="width: 35%;float: left">
|
</el-form-item>
|
||||||
<label class="el-form-item__label" style="padding-left: 20px">Token</label>
|
|
||||||
<div class="el-form-item__content" style="margin-left: 100px">
|
|
||||||
<input v-model="item.token" autocomplete="off" class="el-input__inner form-input"/>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="k8s-token">
|
||||||
|
<el-form-item prop="token" label="Token">
|
||||||
|
<el-input v-model="item.token" show-password autocomplete="off"/>
|
||||||
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 30%;float: left">
|
<div style="width: 30%;float: left">
|
||||||
<label class="el-form-item__label" style="padding-left: 20px">最大并发数</label>
|
<el-form-item prop="maxConcurrency" label="最大并发数">
|
||||||
<div class="el-form-item__content" style="margin-left: 102px">
|
<el-input-number v-model="item.maxConcurrency" :min="1" :max="9999"></el-input-number>
|
||||||
<input v-model="item.maxConcurrency" autocomplete="off" type="number"
|
</el-form-item>
|
||||||
class="el-input__inner form-input"/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="node-line" v-if="form.type === 'NODE'">
|
||||||
|
<div style="width: 30%;float: left">
|
||||||
|
<el-form-item prop="ip" label="IP">
|
||||||
|
<el-input v-model="item.ip" autocomplete="off"/>
|
||||||
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="current-row" v-if="form.type === 'NODE'">
|
<div style="width: 30%;float: left">
|
||||||
<div style="width: 42%;float: left">
|
<el-form-item prop="port" label="Port">
|
||||||
<label class="el-form-item__label">IP</label>
|
<el-input-number v-model="item.port" :min="1" :max="9999"></el-input-number>
|
||||||
<div class="el-form-item__content" style="margin-left: 100px">
|
</el-form-item>
|
||||||
<input v-model="item.ip" autocomplete="off" class="el-input__inner form-input"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="width: 20%;float: left">
|
|
||||||
<label class="el-form-item__label" style="padding-left: 20px">port</label>
|
|
||||||
<div class="el-form-item__content" style="margin-left: 100px">
|
|
||||||
<input v-model="item.port" autocomplete="off" type="number" class="el-input__inner form-input"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="width: 20%;float: left">
|
|
||||||
<label class="el-form-item__label" style="padding-left: 20px">最大并发数</label>
|
|
||||||
<div class="el-form-item__content" style="margin-left: 102px">
|
|
||||||
<input v-model="item.maxConcurrency" autocomplete="off" type="number"
|
|
||||||
class="el-input__inner form-input"/>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div style="width: 30%;float: left">
|
||||||
|
<el-form-item prop="maxConcurrency" label="最大并发数">
|
||||||
|
<el-input-number v-model="item.maxConcurrency" :min="1" :max="9999"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="op">
|
<div class="op">
|
||||||
<span class="box">
|
<span class="box">
|
||||||
|
@ -149,7 +144,7 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog title="修改资源池" :visible.sync="updateVisible" width="70%" :destroy-on-close="true" @close="closeFunc">
|
<el-dialog title="修改资源池" :visible.sync="updateVisible" width="70%" :destroy-on-close="true" @close="closeFunc">
|
||||||
<el-form :model="form" label-position="left" label-width="100px" size="small" :rules="rule"
|
<el-form :model="form" label-position="right" label-width="100px" size="small" :rules="rule"
|
||||||
ref="updateTestResourcePoolForm">
|
ref="updateTestResourcePoolForm">
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="名称" prop="name">
|
||||||
<el-input v-model="form.name" autocomplete="off"/>
|
<el-input v-model="form.name" autocomplete="off"/>
|
||||||
|
@ -158,52 +153,44 @@
|
||||||
<el-input v-model="form.description" autocomplete="off"/>
|
<el-input v-model="form.description" autocomplete="off"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="资源类型" prop="type">
|
<el-form-item label="资源类型" prop="type">
|
||||||
<el-select v-model="form.type" placeholder="选择资源类型">
|
<el-select v-model="form.type" placeholder="选择资源类型" @change="changeResourceType()">
|
||||||
<el-option key="K8S" value="K8S" label="Kubernetes">Kubernetes</el-option>
|
<el-option key="K8S" value="K8S" label="Kubernetes">Kubernetes</el-option>
|
||||||
<el-option key="NODE" value="NODE" label="独立节点">独立节点</el-option>
|
<el-option key="NODE" value="NODE" label="独立节点">独立节点</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div v-for="(item,index) in infoList " :key="index">
|
<div v-for="(item,index) in infoList " :key="index">
|
||||||
<div class="current-row" v-if="form.type === 'K8S'">
|
<div class="node-line" v-if="form.type === 'K8S'">
|
||||||
<div style="width: 35%;float: left">
|
<div class="k8s-master">
|
||||||
<label class="el-form-item__label">Master URL</label>
|
<el-form-item prop="masterUrl" label="Master URL">
|
||||||
<div class="el-form-item__content" style="margin-left: 100px">
|
<el-input v-model="item.masterUrl" autocomplete="off"/>
|
||||||
<input v-model="item.masterUrl" autocomplete="off" class="el-input__inner form-input"/>
|
</el-form-item>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="width: 35%;float: left">
|
|
||||||
<label class="el-form-item__label" style="padding-left: 20px">Token</label>
|
|
||||||
<div class="el-form-item__content" style="margin-left: 100px">
|
|
||||||
<input v-model="item.token" autocomplete="off" class="el-input__inner form-input"/>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="k8s-token">
|
||||||
|
<el-form-item prop="password" label="Token" style="padding-left: 20px">
|
||||||
|
<el-input v-model="item.token" show-password autocomplete="off"/>
|
||||||
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 30%;float: left">
|
<div style="width: 30%;float: left">
|
||||||
<label class="el-form-item__label" style="padding-left: 20px">最大并发数</label>
|
<el-form-item prop="maxConcurrency" label="最大并发数" style="padding-left: 20px">
|
||||||
<div class="el-form-item__content" style="margin-left: 102px">
|
<el-input-number v-model="item.maxConcurrency" :min="1" :max="9999"></el-input-number>
|
||||||
<input v-model="item.maxConcurrency" autocomplete="off" type="number"
|
</el-form-item>
|
||||||
class="el-input__inner form-input"/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="node-line" v-if="form.type === 'NODE'">
|
||||||
|
<div style="width: 30%;float: left">
|
||||||
|
<el-form-item prop="ip" label="IP">
|
||||||
|
<el-input v-model="item.ip" autocomplete="off"/>
|
||||||
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="current-row" v-if="form.type === 'NODE'">
|
<div style="width: 30%;float: left">
|
||||||
<div style="width: 42%;float: left">
|
<el-form-item prop="port" label="Port" style="padding-left: 20px">
|
||||||
<label class="el-form-item__label">IP</label>
|
<el-input-number v-model="item.port" :min="1" :max="9999"></el-input-number>
|
||||||
<div class="el-form-item__content" style="margin-left: 100px">
|
</el-form-item>
|
||||||
<input v-model="item.ip" autocomplete="off" class="el-input__inner form-input"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="width: 20%;float: left">
|
|
||||||
<label class="el-form-item__label" style="padding-left: 20px">port</label>
|
|
||||||
<div class="el-form-item__content" style="margin-left: 100px">
|
|
||||||
<input v-model="item.port" autocomplete="off" type="number" class="el-input__inner form-input"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="width: 20%;float: left">
|
|
||||||
<label class="el-form-item__label" style="padding-left: 20px">最大并发数</label>
|
|
||||||
<div class="el-form-item__content" style="margin-left: 102px">
|
|
||||||
<input v-model="item.maxConcurrency" autocomplete="off" type="number"
|
|
||||||
class="el-input__inner form-input"/>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div style="width: 30%;float: left">
|
||||||
|
<el-form-item prop="maxConcurrency" label="最大并发数" style="padding-left: 20px">
|
||||||
|
<el-input-number v-model="item.maxConcurrency" :min="1" :max="9999"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="op">
|
<div class="op">
|
||||||
<span class="box">
|
<span class="box">
|
||||||
|
@ -264,6 +251,9 @@
|
||||||
],
|
],
|
||||||
description: [
|
description: [
|
||||||
{max: 60, message: '最大长度 60 个字符', trigger: 'blur'}
|
{max: 60, message: '最大长度 60 个字符', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
type: [
|
||||||
|
{required: true, message: '请选择资源类型', trigger: 'blur'}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -303,6 +293,28 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
validateResourceInfo() {
|
||||||
|
if (this.infoList.length <= 0) {
|
||||||
|
return {validate: false, msg: "资源池不能为空"}
|
||||||
|
}
|
||||||
|
|
||||||
|
let resultValidate = {validate: true, msg: "请完善数据"}
|
||||||
|
this.infoList.forEach(function (info) {
|
||||||
|
for (let key in info) {
|
||||||
|
if (info[key] != '0' && !info[key]) {
|
||||||
|
resultValidate.validate = false
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!info.maxConcurrency) {
|
||||||
|
resultValidate.validate = false
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return resultValidate;
|
||||||
|
},
|
||||||
buildPagePath(path) {
|
buildPagePath(path) {
|
||||||
return path + "/" + this.currentPage + "/" + this.pageSize;
|
return path + "/" + this.currentPage + "/" + this.pageSize;
|
||||||
},
|
},
|
||||||
|
@ -349,6 +361,8 @@
|
||||||
createTestResourcePool(createTestResourcePoolForm) {
|
createTestResourcePool(createTestResourcePoolForm) {
|
||||||
this.$refs[createTestResourcePoolForm].validate(valide => {
|
this.$refs[createTestResourcePoolForm].validate(valide => {
|
||||||
if (valide) {
|
if (valide) {
|
||||||
|
let vri = this.validateResourceInfo();
|
||||||
|
if (vri.validate) {
|
||||||
this.form.info = JSON.stringify(this.infoList);
|
this.form.info = JSON.stringify(this.infoList);
|
||||||
this.$post("/testresourcepool/add", this.form)
|
this.$post("/testresourcepool/add", this.form)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
@ -359,6 +373,14 @@
|
||||||
this.createVisible = false,
|
this.createVisible = false,
|
||||||
this.initTableData())
|
this.initTableData())
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
type: 'warning',
|
||||||
|
message: vri.msg
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -367,6 +389,8 @@
|
||||||
updateTestResourcePool(updateTestResourcePoolForm) {
|
updateTestResourcePool(updateTestResourcePoolForm) {
|
||||||
this.$refs[updateTestResourcePoolForm].validate(valide => {
|
this.$refs[updateTestResourcePoolForm].validate(valide => {
|
||||||
if (valide) {
|
if (valide) {
|
||||||
|
let vri = this.validateResourceInfo();
|
||||||
|
if (vri.validate) {
|
||||||
this.form.info = JSON.stringify(this.infoList);
|
this.form.info = JSON.stringify(this.infoList);
|
||||||
this.$post("/testresourcepool/update", this.form)
|
this.$post("/testresourcepool/update", this.form)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
@ -378,6 +402,13 @@
|
||||||
this.initTableData(),
|
this.initTableData(),
|
||||||
self.loading = false)
|
self.loading = false)
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
type: 'warning',
|
||||||
|
message: vri.msg
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -414,12 +445,29 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.op {
|
.op {
|
||||||
line-height: 40px;
|
|
||||||
float: left;
|
float: left;
|
||||||
width: 16%;
|
width: 10%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box {
|
.box {
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.k8s-master {
|
||||||
|
width: 34%;
|
||||||
|
float: left
|
||||||
|
}
|
||||||
|
|
||||||
|
.k8s-token {
|
||||||
|
width: 36%;
|
||||||
|
float: left
|
||||||
|
}
|
||||||
|
|
||||||
|
.k8s-token .el-form-item__label {
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.node-line {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-dialog :title="$t('user.create')" :visible.sync="createVisible" width="30%" @closed="closeFunc" :destroy-on-close="true">
|
<el-dialog :title="$t('user.create')" :visible.sync="createVisible" width="30%" @closed="closeFunc" :destroy-on-close="true">
|
||||||
<el-form :model="form" label-position="left" label-width="100px" size="small" :rules="rule" ref="createUserForm">
|
<el-form :model="form" label-position="right" label-width="100px" size="small" :rules="rule" ref="createUserForm">
|
||||||
<el-form-item label="ID" prop="id">
|
<el-form-item label="ID" prop="id">
|
||||||
<el-input v-model="form.id" autocomplete="off"/>
|
<el-input v-model="form.id" autocomplete="off"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog :title="$t('user.modify')" :visible.sync="updateVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
<el-dialog :title="$t('user.modify')" :visible.sync="updateVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
||||||
<el-form :model="form" label-position="left" label-width="100px" size="small" :rules="rule" ref="updateUserForm">
|
<el-form :model="form" label-position="right" label-width="100px" size="small" :rules="rule" ref="updateUserForm">
|
||||||
<el-form-item label="ID" prop="id">
|
<el-form-item label="ID" prop="id">
|
||||||
<el-input v-model="form.id" autocomplete="off" :disabled="true"/>
|
<el-input v-model="form.id" autocomplete="off" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-dialog title="添加成员" :visible.sync="createVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
<el-dialog title="添加成员" :visible.sync="createVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
||||||
<el-form :model="form" ref="form" :rules="rules" label-position="left" label-width="100px" size="small">
|
<el-form :model="form" ref="form" :rules="rules" label-position="right" label-width="100px" size="small">
|
||||||
<el-form-item label="成员" prop="userIds">
|
<el-form-item label="成员" prop="userIds">
|
||||||
<el-select v-model="form.userIds" multiple :placeholder="$t('member.please_choose_member')" class="select-width">
|
<el-select v-model="form.userIds" multiple :placeholder="$t('member.please_choose_member')" class="select-width">
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -80,7 +80,7 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog title="修改成员" :visible.sync="updateVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
<el-dialog title="修改成员" :visible.sync="updateVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
||||||
<el-form :model="form" label-position="left" label-width="100px" size="small" ref="updateUserForm">
|
<el-form :model="form" label-position="right" label-width="100px" size="small" ref="updateUserForm">
|
||||||
<el-form-item label="ID" prop="id">
|
<el-form-item label="ID" prop="id">
|
||||||
<el-input v-model="form.id" autocomplete="off" :disabled="true"/>
|
<el-input v-model="form.id" autocomplete="off" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
Loading…
Reference in New Issue