Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
9e4a38015c
|
@ -1,47 +0,0 @@
|
||||||
package io.metersphere.service;
|
|
||||||
|
|
||||||
import io.metersphere.base.domain.SystemParameter;
|
|
||||||
import io.metersphere.base.domain.SystemParameterExample;
|
|
||||||
import io.metersphere.base.mapper.SystemParameterMapper;
|
|
||||||
import io.metersphere.commons.constants.ParamConstants;
|
|
||||||
import io.metersphere.commons.utils.EncryptUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public class RegistryParamService {
|
|
||||||
@Resource
|
|
||||||
private SystemParameterMapper parameterMapper;
|
|
||||||
|
|
||||||
public List<SystemParameter> getRegistry(String type) {
|
|
||||||
List<SystemParameter> paramList = this.getParamList(type);
|
|
||||||
for (SystemParameter parameter : paramList) {
|
|
||||||
if (StringUtils.equalsIgnoreCase(ParamConstants.Type.PASSWORD.getValue(), parameter.getType())) {
|
|
||||||
parameter.setParamValue(EncryptUtils.aesDecrypt(parameter.getParamValue()).toString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
paramList.sort(Comparator.comparingInt(SystemParameter::getSort));
|
|
||||||
return paramList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateRegistry(List<SystemParameter> parameters) {
|
|
||||||
for (SystemParameter parameter : parameters) {
|
|
||||||
if (StringUtils.equalsIgnoreCase(ParamConstants.Type.PASSWORD.getValue(), parameter.getType())) {
|
|
||||||
parameter.setParamValue(EncryptUtils.aesEncrypt(parameter.getParamValue()).toString());
|
|
||||||
}
|
|
||||||
parameterMapper.updateByPrimaryKey(parameter);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<SystemParameter> getParamList(String type) {
|
|
||||||
SystemParameterExample example = new SystemParameterExample();
|
|
||||||
example.createCriteria().andParamKeyLike(type + "%");
|
|
||||||
return parameterMapper.selectByExample(example);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -104,14 +104,14 @@
|
||||||
<el-input-number v-model="item.maxConcurrency" :min="1" :max="9999"></el-input-number>
|
<el-input-number v-model="item.maxConcurrency" :min="1" :max="9999"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :offset="2" :span="2">
|
||||||
<span class="box">
|
<span class="box">
|
||||||
<el-button @click="addResourceInfo()" type="primary" size="mini" circle>
|
<el-button @click="addResourceInfo()" type="success" size="mini" circle>
|
||||||
<font-awesome-icon :icon="['fas', 'plus']"/>
|
<font-awesome-icon :icon="['fas', 'plus']"/>
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
<span class="box">
|
<span class="box">
|
||||||
<el-button @click="removeResourceInfo(index)" type="primary" size="mini" circle>
|
<el-button @click="removeResourceInfo(index)" type="danger" size="mini" circle>
|
||||||
<font-awesome-icon :icon="['fas', 'minus']"/>
|
<font-awesome-icon :icon="['fas', 'minus']"/>
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
|
@ -187,14 +187,14 @@
|
||||||
<el-input-number v-model="item.maxConcurrency" :min="1" :max="9999"></el-input-number>
|
<el-input-number v-model="item.maxConcurrency" :min="1" :max="9999"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :offset="2" :span="2">
|
||||||
<span class="box">
|
<span class="box">
|
||||||
<el-button @click="addResourceInfo()" type="primary" size="mini" circle>
|
<el-button @click="addResourceInfo()" type="success" size="mini" circle>
|
||||||
<font-awesome-icon :icon="['fas', 'plus']"/>
|
<font-awesome-icon :icon="['fas', 'plus']"/>
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
<span class="box">
|
<span class="box">
|
||||||
<el-button @click="removeResourceInfo(index)" type="primary" size="mini" circle>
|
<el-button @click="removeResourceInfo(index)" type="danger" size="mini" circle>
|
||||||
<font-awesome-icon :icon="['fas', 'minus']"/>
|
<font-awesome-icon :icon="['fas', 'minus']"/>
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
ref="nodeTree"/>
|
ref="nodeTree"/>
|
||||||
</el-aside>
|
</el-aside>
|
||||||
|
|
||||||
<el-main class="test-case-list">
|
<el-main>
|
||||||
<test-case-list
|
<test-case-list
|
||||||
:current-project="currentProject"
|
:current-project="currentProject"
|
||||||
:select-node-ids="selectNodeIds"
|
:select-node-ids="selectNodeIds"
|
||||||
|
@ -226,7 +226,7 @@
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
.test-case-list {
|
.el-main {
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
|
|
||||||
<div>
|
<div class="card-container">
|
||||||
<el-card class="table-card" v-loading="result.loading">
|
<el-card class="card-content" v-loading="result.loading">
|
||||||
<template v-slot:header>
|
<template v-slot:header>
|
||||||
|
|
||||||
<ms-table-header :condition.sync="condition" @search="initTableData"
|
<ms-table-header :condition.sync="condition" @search="initTableData"
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
</el-aside>
|
</el-aside>
|
||||||
|
|
||||||
<el-main>
|
<el-main>
|
||||||
<test-plan-test-case-list
|
<test-plan-test-case-list class="table-list"
|
||||||
@openTestCaseRelevanceDialog="openTestCaseRelevanceDialog"
|
@openTestCaseRelevanceDialog="openTestCaseRelevanceDialog"
|
||||||
@refresh="refresh"
|
@refresh="refresh"
|
||||||
:plan-id="planId"
|
:plan-id="planId"
|
||||||
|
|
|
@ -1,125 +1,127 @@
|
||||||
<template>
|
<template>
|
||||||
<el-card class="table-card" v-loading="result.loading">
|
<div class="card-container">
|
||||||
<template v-slot:header>
|
<el-card class="card-content" v-loading="result.loading">
|
||||||
<ms-table-header :condition.sync="condition" @search="initTableData" :show-create="false">
|
<template v-slot:header>
|
||||||
<template v-slot:title>
|
<ms-table-header :condition.sync="condition" @search="initTableData" :show-create="false">
|
||||||
<node-breadcrumb class="table-title" :nodes="selectParentNodes" @refresh="refresh"/>
|
<template v-slot:title>
|
||||||
</template>
|
<node-breadcrumb class="table-title" :nodes="selectParentNodes" @refresh="refresh"/>
|
||||||
<template v-slot:button>
|
</template>
|
||||||
<ms-table-button v-if="!showMyTestCase" icon="el-icon-s-custom" :content="$t('test_track.plan_view.my_case')" @click="searchMyTestCase"/>
|
<template v-slot:button>
|
||||||
<ms-table-button v-if="showMyTestCase" icon="el-icon-files" :content="$t('test_track.plan_view.all_case')" @click="searchMyTestCase"/>
|
<ms-table-button v-if="!showMyTestCase" icon="el-icon-s-custom" :content="$t('test_track.plan_view.my_case')" @click="searchMyTestCase"/>
|
||||||
<ms-table-button icon="el-icon-connection" :content="$t('test_track.plan_view.relevance_test_case')" @click="$emit('openTestCaseRelevanceDialog')"/>
|
<ms-table-button v-if="showMyTestCase" icon="el-icon-files" :content="$t('test_track.plan_view.all_case')" @click="searchMyTestCase"/>
|
||||||
<ms-table-button icon="el-icon-edit-outline" :content="$t('test_track.plan_view.change_execution_results')" @click="handleBatch('status')"/>
|
<ms-table-button icon="el-icon-connection" :content="$t('test_track.plan_view.relevance_test_case')" @click="$emit('openTestCaseRelevanceDialog')"/>
|
||||||
<ms-table-button icon="el-icon-user" :content="$t('test_track.plan_view.change_executor')" @click="handleBatch('executor')"/>
|
<ms-table-button icon="el-icon-edit-outline" :content="$t('test_track.plan_view.change_execution_results')" @click="handleBatch('status')"/>
|
||||||
<ms-table-button v-if="!testPlan.reportId" icon="el-icon-document" :content="$t('创建测试报告')" @click="openTestReport"/>
|
<ms-table-button icon="el-icon-user" :content="$t('test_track.plan_view.change_executor')" @click="handleBatch('executor')"/>
|
||||||
<ms-table-button v-if="testPlan.reportId" icon="el-icon-document" :content="$t('查看测试报告')" @click="openReport"/>
|
<ms-table-button v-if="!testPlan.reportId" icon="el-icon-document" :content="$t('创建测试报告')" @click="openTestReport"/>
|
||||||
</template>
|
<ms-table-button v-if="testPlan.reportId" icon="el-icon-document" :content="$t('查看测试报告')" @click="openReport"/>
|
||||||
</ms-table-header>
|
</template>
|
||||||
</template>
|
</ms-table-header>
|
||||||
|
</template>
|
||||||
|
|
||||||
<executor-edit ref="executorEdit" :select-ids="selectIds" @refresh="initTableData"/>
|
<executor-edit ref="executorEdit" :select-ids="selectIds" @refresh="initTableData"/>
|
||||||
<status-edit ref="statusEdit" :select-ids="selectIds" @refresh="initTableData"/>
|
<status-edit ref="statusEdit" :select-ids="selectIds" @refresh="initTableData"/>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
@select-all="handleSelectAll"
|
@select-all="handleSelectAll"
|
||||||
@filter-change="filter"
|
@filter-change="filter"
|
||||||
@sort-change="sort"
|
@sort-change="sort"
|
||||||
@select="handleSelectionChange"
|
@select="handleSelectionChange"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:data="tableData">
|
:data="tableData">
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="selection"></el-table-column>
|
type="selection"></el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="name"
|
prop="name"
|
||||||
:label="$t('commons.name')"
|
:label="$t('commons.name')"
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="priority"
|
prop="priority"
|
||||||
:filters="priorityFilters"
|
:filters="priorityFilters"
|
||||||
column-key="priority"
|
column-key="priority"
|
||||||
:label="$t('test_track.case.priority')">
|
:label="$t('test_track.case.priority')">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<priority-table-item :value="scope.row.priority" ref="priority"/>
|
<priority-table-item :value="scope.row.priority" ref="priority"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="type"
|
prop="type"
|
||||||
:filters="typeFilters"
|
:filters="typeFilters"
|
||||||
column-key="type"
|
column-key="type"
|
||||||
:label="$t('test_track.case.type')"
|
:label="$t('test_track.case.type')"
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<type-table-item :value="scope.row.type"/>
|
<type-table-item :value="scope.row.type"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="method"
|
prop="method"
|
||||||
:filters="methodFilters"
|
:filters="methodFilters"
|
||||||
column-key="method"
|
column-key="method"
|
||||||
:label="$t('test_track.case.method')"
|
:label="$t('test_track.case.method')"
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<method-table-item :value="scope.row.method"/>
|
<method-table-item :value="scope.row.method"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="nodePath"
|
prop="nodePath"
|
||||||
:label="$t('test_track.case.module')"
|
:label="$t('test_track.case.module')"
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="executorName"
|
prop="executorName"
|
||||||
:label="$t('test_track.plan_view.executor')">
|
:label="$t('test_track.plan_view.executor')">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="status"
|
prop="status"
|
||||||
:filters="statusFilters"
|
:filters="statusFilters"
|
||||||
column-key="status"
|
column-key="status"
|
||||||
:label="$t('test_track.plan_view.execute_result')">
|
:label="$t('test_track.plan_view.execute_result')">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<status-table-item :value="scope.row.status"/>
|
<status-table-item :value="scope.row.status"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
sortable
|
sortable
|
||||||
prop="updateTime"
|
prop="updateTime"
|
||||||
:label="$t('commons.update_time')"
|
:label="$t('commons.update_time')"
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<span>{{ scope.row.updateTime | timestampFormatDate }}</span>
|
<span>{{ scope.row.updateTime | timestampFormatDate }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:label="$t('commons.operating')">
|
:label="$t('commons.operating')">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<ms-table-operator-button :tip="$t('commons.edit')" icon="el-icon-edit" @exec="handleEdit(scope.row)" />
|
<ms-table-operator-button :tip="$t('commons.edit')" icon="el-icon-edit" @exec="handleEdit(scope.row)" />
|
||||||
<ms-table-operator-button :tip="$t('test_track.plan_view.cancel_relevance')" icon="el-icon-unlock" type="danger" @exec="handleDelete(scope.row)"/>
|
<ms-table-operator-button :tip="$t('test_track.plan_view.cancel_relevance')" icon="el-icon-unlock" type="danger" @exec="handleDelete(scope.row)"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<ms-table-pagination :change="search" :current-page.sync="currentPage" :page-size.sync="pageSize"
|
<ms-table-pagination :change="search" :current-page.sync="currentPage" :page-size.sync="pageSize"
|
||||||
:total="total"/>
|
:total="total"/>
|
||||||
|
|
||||||
<test-plan-test-case-edit
|
<test-plan-test-case-edit
|
||||||
ref="testPlanTestCaseEdit"
|
ref="testPlanTestCaseEdit"
|
||||||
:search-param="condition"
|
:search-param="condition"
|
||||||
@refresh="initTableData"
|
@refresh="initTableData"
|
||||||
@refreshTable="search"/>
|
@refreshTable="search"/>
|
||||||
|
|
||||||
<test-report-template-list @openReport="openReport" :plan-id="planId" ref="testReporTtemplateList"/>
|
<test-report-template-list @openReport="openReport" :plan-id="planId" ref="testReporTtemplateList"/>
|
||||||
<test-case-report-view :plan-id="planId" ref="testCaseReportView"/>
|
<test-case-report-view :plan-id="planId" ref="testCaseReportView"/>
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -339,5 +341,4 @@
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
width: 240px;
|
width: 240px;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
.main-content {
|
.main-content {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
@ -33,6 +34,15 @@ body {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card-container {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-content {
|
||||||
|
width: 100%;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
.table-card > .el-card__body {
|
.table-card > .el-card__body {
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue