Merge remote-tracking branch 'origin/v1.3' into v1.3

This commit is contained in:
Captain.B 2020-09-30 17:34:16 +08:00
commit 0a3a5e2ecc
11 changed files with 28 additions and 27 deletions

View File

@ -487,20 +487,18 @@ public class UserService {
/*修改当前用户用户密码*/
private User updateCurrentUserPwd(EditPassWordRequest request) {
if (SessionUtils.getUser() != null) {
User user = userMapper.selectByPrimaryKey(SessionUtils.getUser().getId());
String pwd = user.getPassword();
String prepwd = CodingUtil.md5(request.getPassword(), "utf-8");
String newped = request.getNewpassword();
if (StringUtils.isNotBlank(prepwd)) {
if (prepwd.trim().equals(pwd.trim())) {
user.setPassword(CodingUtil.md5(newped));
String oldPassword = CodingUtil.md5(request.getPassword(), "utf-8");
String newPassword = request.getNewpassword();
UserExample userExample = new UserExample();
userExample.createCriteria().andIdEqualTo(SessionUtils.getUser().getId()).andPasswordEqualTo(oldPassword);
List<User> users = userMapper.selectByExample(userExample);
if (!CollectionUtils.isEmpty(users)) {
User user = users.get(0);
user.setPassword(CodingUtil.md5(newPassword));
user.setUpdateTime(System.currentTimeMillis());
return user;
}
}
MSException.throwException(Translator.get("password_modification_failed"));
}
return null;
}
@ -512,8 +510,8 @@ public class UserService {
/*管理员修改用户密码*/
private User updateUserPwd(EditPassWordRequest request) {
User user = userMapper.selectByPrimaryKey(request.getId());
String newped = request.getNewpassword();
user.setPassword(CodingUtil.md5(newped));
String newPassword = request.getNewpassword();
user.setPassword(CodingUtil.md5(newPassword));
user.setUpdateTime(System.currentTimeMillis());
return user;
}

View File

@ -273,6 +273,8 @@ public class TestCaseService {
.map(TestCase::getName)
.collect(Collectors.toSet());
List<ExcelErrData<TestCaseExcelData>> errList = null;
if(multipartFile == null )
MSException.throwException(Translator.get("upload_fail"));
if (multipartFile.getOriginalFilename().endsWith(".xmind")) {
try {

View File

@ -3,7 +3,7 @@
<template v-slot:header>
<span class="title">{{$t('api_report.title')}}</span>
</template>
<el-table border :data="tableData" class="adjust-table table-content" @row-click="link">
<el-table border :data="tableData" class="adjust-table table-content" @row-click="link" height="300px">
<el-table-column prop="name" :label="$t('commons.name')" width="150" show-overflow-tooltip/>
<el-table-column width="250" :label="$t('commons.create_time')">
<template v-slot:default="scope">

View File

@ -3,7 +3,7 @@
<template v-slot:header>
<span class="title">{{$t('commons.test')}}</span>
</template>
<el-table border :data="tableData" class="adjust-table table-content" @row-click="link">
<el-table border :data="tableData" class="adjust-table table-content" @row-click="link" height="300px">
<el-table-column prop="name" :label="$t('commons.name')" width="150" show-overflow-tooltip/>
<el-table-column prop="projectName" :label="$t('load_test.project_name')" width="150" show-overflow-tooltip/>
<el-table-column width="250" :label="$t('commons.create_time')">

View File

@ -65,7 +65,6 @@ export default {
},
mounted() {
console.log(this.response.headers);
if (!this.response.headers) {
return;
}

View File

@ -1140,11 +1140,13 @@ class JMXGenerator {
let domain = request.environment.config.httpConfig.domain;
let validHosts = [];
hosts.forEach(item => {
if (item.domain != undefined && domain != undefined) {
let d = item.domain.trim().replace("http://", "").replace("https://", "");
if (item && d === domain.trim()) {
if (d === domain.trim()) {
item.domain = d; // 域名去掉协议
validHosts.push(item);
}
}
});
if (validHosts.length > 0) {
threadGroup.put(new DNSCacheManager(name, validHosts));

View File

@ -3,7 +3,7 @@
<template v-slot:header>
<span class="title">{{$t('api_report.title')}}</span>
</template>
<el-table border :data="tableData" class="adjust-table table-content" @row-click="link">
<el-table border :data="tableData" class="adjust-table table-content" @row-click="link" height="300px">
<el-table-column prop="name" :label="$t('commons.name')" width="150" show-overflow-tooltip/>
<el-table-column width="250" :label="$t('commons.create_time')">
<template v-slot:default="scope">

View File

@ -3,7 +3,7 @@
<template v-slot:header>
<span class="title">{{$t('commons.test')}}</span>
</template>
<el-table border :data="tableData" class="adjust-table table-content" @row-click="link">
<el-table border :data="tableData" class="adjust-table table-content" @row-click="link" height="300px">
<el-table-column prop="name" :label="$t('commons.name')" width="150" show-overflow-tooltip/>
<el-table-column prop="projectName" :label="$t('load_test.project_name')" width="150" show-overflow-tooltip/>
<el-table-column width="250" :label="$t('commons.create_time')">

View File

@ -5,7 +5,7 @@
border
:data="tableData"
@row-click="intoPlan"
v-loading="result.loading">
v-loading="result.loading" height="300px">
<el-table-column
prop="name"
fixed

View File

@ -14,7 +14,7 @@
border
:data="tableData"
@row-click="intoPlan"
v-loading="result.loading">
v-loading="result.loading" height="300px">
<el-table-column
prop="name"
fixed

View File

@ -8,7 +8,7 @@
class="adjust-table"
@row-click="editTestCase"
:data="tableData"
v-loading="result.loading">
v-loading="result.loading" height="300px">
<el-table-column
prop="name"