Merge remote-tracking branch 'origin/master' into master

This commit is contained in:
Captain.B 2020-11-24 10:50:23 +08:00
commit b013b8b790
30 changed files with 233 additions and 76 deletions

View File

@ -25,7 +25,10 @@ import io.metersphere.i18n.Translator;
import io.metersphere.job.sechedule.ApiTestJob;
import io.metersphere.notice.service.MailService;
import io.metersphere.notice.service.NoticeService;
import io.metersphere.service.*;
import io.metersphere.service.FileService;
import io.metersphere.service.QuotaService;
import io.metersphere.service.ScheduleService;
import io.metersphere.service.UserService;
import io.metersphere.track.service.TestCaseService;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.constants.CommonConstants;
@ -66,6 +69,7 @@ public class APITestService {
@Resource
private NoticeService noticeService;
private static final String BODY_FILE_DIR = "/opt/metersphere/data/body";
public List<APITestResult> list(QueryAPITestRequest request) {

View File

@ -9,4 +9,5 @@ import java.util.List;
public interface ExtWorkspaceMapper {
List<WorkspaceDTO> getWorkspaceWithOrg(@Param("request") WorkspaceRequest request);
List<String> getWorkspaceIdsByOrgId(@Param("orgId") String orgId);
}

View File

@ -13,4 +13,9 @@
order by w.update_time desc
</select>
<select id="getWorkspaceIdsByOrgId" resultType="java.lang.String">
select id from workspace
where organization_id = #{orgId}
</select>
</mapper>

View File

@ -3,6 +3,7 @@ package io.metersphere.controller;
import com.alibaba.fastjson.JSONObject;
import io.metersphere.base.domain.User;
import io.metersphere.commons.utils.SessionUtils;
import io.metersphere.controller.handler.annotation.NoResultHolder;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@ -34,6 +35,26 @@ public class TestController {
return jsonObject;
}
@NoResultHolder
@GetMapping(value = "/xml")
public String getXmlString() {
return "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" +
"\n" +
"<bookstore>\n" +
"\n" +
"<book>\n" +
" <title lang=\"eng\">Harry Potter</title>\n" +
" <price>29.99</price>\n" +
"</book>\n" +
"\n" +
"<book>\n" +
" <title lang=\"eng\">Learning XML</title>\n" +
" <price>39.95</price>\n" +
"</book>\n" +
"\n" +
"</bookstore>";
}
@GetMapping(value = "/{str}")
public Object getString(@PathVariable String str) throws InterruptedException {
if (StringUtils.equals("error", str)) {

View File

@ -2,6 +2,7 @@ package io.metersphere.controller.handler;
import com.alibaba.fastjson.JSON;
import io.metersphere.controller.ResultHolder;
import io.metersphere.controller.handler.annotation.NoResultHolder;
import org.springframework.core.MethodParameter;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
@ -30,6 +31,10 @@ public class ResultResponseBodyAdvice implements ResponseBodyAdvice<Object> {
return null;
}
if (methodParameter.hasMethodAnnotation(NoResultHolder.class)) {
return o;
}
if (!(o instanceof ResultHolder)) {
if (o instanceof String) {
return JSON.toJSONString(ResultHolder.success(o));

View File

@ -0,0 +1,15 @@
package io.metersphere.controller.handler.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Documented
@Inherited
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface NoResultHolder {
}

View File

@ -19,6 +19,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@Service
@Transactional(propagation = Propagation.NOT_SUPPORTED)
@ -57,7 +58,9 @@ public class DingTaskService {
list.forEach(u -> {
phoneList.add(u.getPhone());
});
at.setAtMobiles(phoneList);
LogUtil.info("收件人地址" + phoneList);
List<String> phoneLists = phoneList.stream().distinct().collect(Collectors.toList());
at.setAtMobiles(phoneLists);
request.setAt(at);
OapiRobotSendResponse response = null;
try {

View File

@ -37,6 +37,7 @@ import javax.mail.internet.MimeMessage;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@Service
@Transactional(propagation = Propagation.NOT_SUPPORTED)
@ -111,8 +112,9 @@ public class MailService {
list.forEach(u -> {
emails.add(u.getEmail());
});
users = emails.toArray(new String[0]);
LogUtil.info("收件人地址"+users);
List<String> email = emails.stream().distinct().collect(Collectors.toList());
users = email.toArray(new String[0]);
LogUtil.info("收件人地址" + users);
helper.setText(getContent(Template, context), true);
helper.setTo(users);
try {
@ -144,9 +146,10 @@ public class MailService {
}
public void sendCommentNotice(MessageDetail messageDetail, List<String> userIds, SaveCommentRequest request, TestCaseWithBLOBs testCaseWithBLOBs, String eventType) {
User user = userMapper.selectByPrimaryKey(testCaseWithBLOBs.getMaintainer());
BaseSystemConfigDTO baseSystemConfigDTO = systemParameterService.getBaseInfo();
Map<String, String> context = new HashMap<>();
context.put("maintainer", testCaseWithBLOBs.getMaintainer());
context.put("maintainer", user.getName());
context.put("testCaseName", testCaseWithBLOBs.getName());
context.put("description", request.getDescription());
context.put("url", baseSystemConfigDTO.getUrl());
@ -184,7 +187,9 @@ public class MailService {
list.forEach(u -> {
emails.add(u.getEmail());
});
users = emails.toArray(new String[0]);
List<String> email = emails.stream().distinct().collect(Collectors.toList());
users = email.toArray(new String[0]);
LogUtil.info("收件人地址" + users);
helper.setText(getContent(Template, context), true);
helper.setTo(users);
if (users.length > 0) {
@ -245,7 +250,9 @@ public class MailService {
list.forEach(u -> {
emails.add(u.getEmail());
});
users = emails.toArray(new String[0]);
List<String> email = emails.stream().distinct().collect(Collectors.toList());
users = email.toArray(new String[0]);
LogUtil.info("收件人地址" + users);
helper.setText(getContent(Template, context), true);
helper.setTo(users);
javaMailSender.send(mimeMessage);
@ -280,7 +287,9 @@ public class MailService {
list.forEach(u -> {
emails.add(u.getEmail());
});
users = emails.toArray(new String[0]);
List<String> email = emails.stream().distinct().collect(Collectors.toList());
users = email.toArray(new String[0]);
LogUtil.info("收件人地址" + users);
helper.setText(getContent(Template, context), true);
helper.setTo(users);
javaMailSender.send(mimeMessage);
@ -385,7 +394,7 @@ public class MailService {
if (StringUtils.isNotBlank(context.get(k))) {
template = RegExUtils.replaceAll(template, "\\$\\{" + k + "}", context.get(k));
} else {
template = RegExUtils.replaceAll(template, "\\$\\{" + k + "}", "");
template = RegExUtils.replaceAll(template, "\\$\\{" + k + "}", "未设置");
}
}
}

View File

@ -5,8 +5,10 @@ import io.metersphere.base.domain.MessageTaskExample;
import io.metersphere.base.mapper.MessageTaskMapper;
import io.metersphere.base.mapper.ext.ExtMessageMapper;
import io.metersphere.commons.constants.NoticeConstants;
import io.metersphere.commons.exception.MSException;
import io.metersphere.commons.user.SessionUser;
import io.metersphere.commons.utils.SessionUtils;
import io.metersphere.i18n.Translator;
import io.metersphere.notice.controller.request.MessageRequest;
import io.metersphere.notice.domain.MessageDetail;
import io.metersphere.notice.domain.MessageSettingDetail;
@ -49,6 +51,7 @@ public class NoticeService {
long time = System.currentTimeMillis();
String identification = UUID.randomUUID().toString();
list.getUserIds().forEach(m -> {
checkUserIdExist(m, list);
MessageTask message = new MessageTask();
message.setId(UUID.randomUUID().toString());
message.setEvent(list.getEvent());
@ -57,7 +60,7 @@ public class NoticeService {
message.setType(list.getType());
message.setWebhook(list.getWebhook());
message.setIdentification(identification);
message.setIsSet(list.getIsSet());
message.setIsSet(false);
message.setOrganizationId(orgId);
message.setTestId(list.getTestId());
message.setCreateTime(time);
@ -65,6 +68,14 @@ public class NoticeService {
});
}
private void checkUserIdExist(String userId, MessageDetail list) {
MessageTaskExample example = new MessageTaskExample();
example.createCriteria().andUserIdEqualTo(userId).andEventEqualTo(list.getEvent()).andTypeEqualTo(list.getType()).andTaskTypeEqualTo(list.getTaskType()).andWebhookEqualTo(list.getWebhook());
if (messageTaskMapper.countByExample(example) > 0) {
MSException.throwException(Translator.get("message_task_already_exists"));
}
}
public List<MessageDetail> searchMessageSchedule(String testId) {
List<MessageTask> messageTaskLists = extMessageMapper.searchMessageByTestId(testId);
List<MessageDetail> scheduleMessageTask = new ArrayList<>();
@ -116,10 +127,14 @@ public class NoticeService {
messageDetail.setUserIds(new ArrayList<String>(userIds));
MessageDetailList.add(messageDetail);
});
List<MessageDetail> jenkinsTask = MessageDetailList.stream().filter(a -> a.getTaskType().equals(NoticeConstants.JENKINS_TASK)).sorted(Comparator.comparing(MessageDetail::getCreateTime, Comparator.nullsLast(Long::compareTo)).reversed()).collect(Collectors.toList());
List<MessageDetail> testCasePlanTask = MessageDetailList.stream().filter(a -> a.getTaskType().equals(NoticeConstants.TEST_PLAN_TASK)).sorted(Comparator.comparing(MessageDetail::getCreateTime, Comparator.nullsLast(Long::compareTo)).reversed()).collect(Collectors.toList());
List<MessageDetail> reviewTask = MessageDetailList.stream().filter(a -> a.getTaskType().equals(NoticeConstants.REVIEW_TASK)).sorted(Comparator.comparing(MessageDetail::getCreateTime, Comparator.nullsLast(Long::compareTo)).reversed()).collect(Collectors.toList());
List<MessageDetail> defectTask = MessageDetailList.stream().filter(a -> a.getTaskType().equals(NoticeConstants.DEFECT_TASK)).sorted(Comparator.comparing(MessageDetail::getCreateTime, Comparator.nullsLast(Long::compareTo)).reversed()).collect(Collectors.toList());
List<MessageDetail> jenkinsTask = (MessageDetailList.stream().filter(a -> a.getTaskType().equals(NoticeConstants.JENKINS_TASK)).sorted(Comparator.comparing(
MessageDetail::getCreateTime, Comparator.nullsLast(Long::compareTo)).reversed()).collect(Collectors.toList())).stream().distinct().collect(Collectors.toList());
List<MessageDetail> testCasePlanTask = (MessageDetailList.stream().filter(a -> a.getTaskType().equals(NoticeConstants.TEST_PLAN_TASK)).sorted(Comparator.comparing(
MessageDetail::getCreateTime, Comparator.nullsLast(Long::compareTo)).reversed()).collect(Collectors.toList())).stream().distinct().collect(Collectors.toList());
List<MessageDetail> reviewTask = (MessageDetailList.stream().filter(a -> a.getTaskType().equals(NoticeConstants.REVIEW_TASK)).sorted(Comparator.comparing(
MessageDetail::getCreateTime, Comparator.nullsLast(Long::compareTo)).reversed()).collect(Collectors.toList())).stream().distinct().collect(Collectors.toList());
List<MessageDetail> defectTask = (MessageDetailList.stream().filter(a -> a.getTaskType().equals(NoticeConstants.DEFECT_TASK)).sorted(Comparator.comparing(
MessageDetail::getCreateTime, Comparator.nullsLast(Long::compareTo)).reversed()).collect(Collectors.toList())).stream().distinct().collect(Collectors.toList());
messageSettingDetail.setJenkinsTask(jenkinsTask);
messageSettingDetail.setTestCasePlanTask(testCasePlanTask);
messageSettingDetail.setReviewTask(reviewTask);

View File

@ -18,6 +18,7 @@ import javax.annotation.Resource;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@Service
@Transactional(propagation = Propagation.NOT_SUPPORTED)
@ -50,7 +51,9 @@ public class WxChatTaskService {
list.forEach(u -> {
phoneList.add(u.getPhone());
});
mentionedMobileList.addAll(phoneList);
LogUtil.info("收件人地址" + phoneList);
List<String> phoneLists = phoneList.stream().distinct().collect(Collectors.toList());
mentionedMobileList.addAll(phoneLists);
message.setMentionedMobileList(mentionedMobileList);
try {
SendResult result = WxChatbotClient.send(Webhook, message);

View File

@ -435,8 +435,12 @@ public class UserService {
}
public void delOrganizationMember(String organizationId, String userId) {
List<String> resourceIds = workspaceService.getWorkspaceIdsOrgId(organizationId);
resourceIds.add(organizationId);
UserRoleExample userRoleExample = new UserRoleExample();
userRoleExample.createCriteria().andRoleIdLike("%org%").andUserIdEqualTo(userId).andSourceIdEqualTo(organizationId);
userRoleExample.createCriteria().andUserIdEqualTo(userId).andSourceIdIn(resourceIds);
User user = userMapper.selectByPrimaryKey(userId);
if (StringUtils.equals(organizationId, user.getLastOrganizationId())) {

View File

@ -202,6 +202,10 @@ public class WorkspaceService {
return resultWorkspaceList;
}
public List<String> getWorkspaceIdsOrgId(String orgId) {
return extWorkspaceMapper.getWorkspaceIdsByOrgId(orgId);
}
public void updateWorkspaceMember(WorkspaceMemberDTO memberDTO) {
String workspaceId = memberDTO.getWorkspaceId();
String userId = memberDTO.getId();

View File

@ -3,8 +3,10 @@ package io.metersphere.track.service;
import io.metersphere.base.domain.TestCaseComment;
import io.metersphere.base.domain.TestCaseCommentExample;
import io.metersphere.base.domain.TestCaseWithBLOBs;
import io.metersphere.base.domain.User;
import io.metersphere.base.mapper.TestCaseCommentMapper;
import io.metersphere.base.mapper.TestCaseMapper;
import io.metersphere.base.mapper.UserMapper;
import io.metersphere.base.mapper.ext.ExtTestCaseCommentMapper;
import io.metersphere.commons.constants.NoticeConstants;
import io.metersphere.commons.exception.MSException;
@ -48,7 +50,8 @@ public class TestCaseCommentService {
private NoticeService noticeService;
@Resource
private ExtTestCaseCommentMapper extTestCaseCommentMapper;
@Resource
private UserMapper userMapper;
public void saveComment(SaveCommentRequest request) {
TestCaseComment testCaseComment = new TestCaseComment();
@ -97,6 +100,7 @@ public class TestCaseCommentService {
}
private String getReviewContext(TestCaseComment testCaseComment, TestCaseWithBLOBs testCaseWithBLOBs) {
User user = userMapper.selectByPrimaryKey(testCaseComment.getAuthor());
Long startTime = testCaseComment.getCreateTime();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String start = null;
@ -105,7 +109,7 @@ public class TestCaseCommentService {
start = sdf.format(new Date(Long.parseLong(sTime)));
}
String context = "";
context = "测试评审任务通知:" + testCaseComment.getAuthor() + "" + start + "" + "'" + testCaseWithBLOBs.getName() + "'" + "添加评论:" + testCaseComment.getDescription();
context = "测试评审任务通知:" + user.getName() + "" + start + "" + "'" + testCaseWithBLOBs.getName() + "'" + "添加评论:" + testCaseComment.getDescription();
return context;
}

View File

@ -572,10 +572,14 @@ public class TestCaseReviewService {
String eTime = String.valueOf(endTime);
if (!sTime.equals("null")) {
start = sdf.format(new Date(Long.parseLong(sTime)));
} else {
start = "未设置";
}
String end = null;
if (!eTime.equals("null")) {
end = sdf.format(new Date(Long.parseLong(eTime)));
} else {
start = "未设置";
}
String context = "";
if (StringUtils.equals(NoticeConstants.CREATE, type)) {

View File

@ -547,13 +547,13 @@ public class TestPlanService {
if (!sTime.equals("null")) {
start = sdf.format(new Date(Long.parseLong(sTime)));
} else {
start = "";
start = "未设置";
}
String end = null;
if (!eTime.equals("null")) {
end = sdf.format(new Date(Long.parseLong(eTime)));
} else {
end = "";
end = "未设置";
}
String context = "";
if (StringUtils.equals(NoticeConstants.CREATE, type)) {

View File

@ -170,6 +170,7 @@ test_plan_notification=Test plan notification
task_defect_notification=Task defect notification
task_notification_jenkins=Jenkins Task notification
task_notification=Result notification
message_task_already_exists=Task recipient already exists

View File

@ -170,4 +170,5 @@ upload_content_is_null=导入内容为空
test_plan_notification=测试计划通知
task_defect_notification=缺陷任务通知
task_notification_jenkins=jenkins任务通知
task_notification=任务通知
task_notification=任务通知
message_task_already_exists=任务接收人已经存在

View File

@ -172,4 +172,5 @@ test_plan_notification=測試計畫通知
task_defect_notification=缺陷任務通知
task_notification_jenkins=jenkins任務通知
task_notification=任務通知
message_task_already_exists=任務接收人已經存在

View File

@ -7,8 +7,8 @@
<el-collapse-transition>
<el-tabs v-model="activeName" v-show="isActive">
<el-tab-pane :class="'body-pane'" label="Body" name="body" class="pane">
<ms-sql-result-table v-if="isSqlType" :body="response.body"/>
<ms-code-edit v-if="!isSqlType" :mode="mode" :read-only="true" :data="response.body" :modes="modes" ref="codeEdit"/>
<ms-sql-result-table v-if="isSqlType && mode == 'table'" :body="response.body"/>
<ms-code-edit v-if="mode != 'table'" :mode="mode" :read-only="true" :data="response.body" :modes="modes" ref="codeEdit"/>
</el-tab-pane>
<el-tab-pane label="Headers" name="headers" class="pane">
<pre>{{ response.headers }}</pre>
@ -21,9 +21,10 @@
<pre>{{response.vars}}</pre>
</el-tab-pane>
<el-tab-pane v-if="activeName == 'body' && !isSqlType" :disabled="true" name="mode" class="pane assertions">
<el-tab-pane v-if="activeName == 'body'" :disabled="true" name="mode" class="pane assertions">
<template v-slot:label>
<ms-dropdown :commands="modes" :default-command="mode" @command="modeChange"/>
<ms-dropdown v-if="!isSqlType" :commands="modes" :default-command="mode" @command="modeChange"/>
<ms-dropdown v-if="isSqlType" :commands="sqlModes" :default-command="mode" @command="sqlModeChange"/>
</template>
</el-tab-pane>
@ -59,6 +60,7 @@ export default {
isActive: true,
activeName: "body",
modes: ['text', 'json', 'xml', 'html'],
sqlModes: ['text', 'table'],
mode: BODY_FORMAT.TEXT
}
},
@ -69,6 +71,9 @@ export default {
},
modeChange(mode) {
this.mode = mode;
},
sqlModeChange(mode) {
this.mode = mode;
}
},

View File

@ -1,22 +1,26 @@
<template>
<el-table
:data="tableData"
border
size="mini"
highlight-current-row>
<el-table-column v-for="(title, index) in titles" :key="index" :label="title" min-width="15%">
<template v-slot:default="scope">
<el-popover
placement="top"
trigger="click">
<el-container>
<div>{{ scope.row[title] }}</div>
</el-container>
<span class="table-content" slot="reference">{{ scope.row[title] }}</span>
</el-popover>
</template>
</el-table-column>
</el-table>
<div>
<el-table
v-for="(table, index) in tables"
:key="index"
:data="table.tableData"
border
size="mini"
highlight-current-row>
<el-table-column v-for="(title, index) in table.titles" :key="index" :label="title" min-width="150px">
<template v-slot:default="scope">
<el-popover
placement="top"
trigger="click">
<el-container>
<div>{{ scope.row[title] }}</div>
</el-container>
<span class="table-content" slot="reference">{{ scope.row[title] }}</span>
</el-popover>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
@ -24,7 +28,7 @@
name: "MsSqlResultTable",
data() {
return {
tableData: [],
tables: [],
titles: []
}
},
@ -36,29 +40,71 @@
return;
}
let rowArry = this.body.split("\n");
let title;
let result = [];
for (let i = 0; i < rowArry.length; i++) {
let colArray = rowArry[i].split("\t");
if (i === 0) {
title = colArray;
} else {
let item = {};
for (let j = 0; j < colArray.length; j++) {
item[title[j]] = (colArray[j] ? colArray[j] : "");
this.getTableData(rowArry);
if (this.tables.length > 1) {
for (let i = 0; i < this.tables.length; i++) {
if (this.tables[i].titles.length === 1 && i < this.tables.length - 1) {
this.tables[i].tableData.splice(this.tables[i].tableData.length - 1, 1);
}
result.push(item);
}
let lastTable = this.tables[this.tables.length - 1];
if (lastTable.titles.length === 1) {
if (lastTable.tableData.length > 4) {
lastTable.tableData.splice(lastTable.tableData.length - 4, 4);
} else {
this.tables.splice(this.tables.length - 1, 1);
}
} else {
this.tables.splice(this.tables.length - 1, 1);
}
} else {
let table = this.tables[0];
table.tableData.splice(table.tableData.length - 4, 4);
}
},
methods: {
getTableData(rowArry) {
let titles;
let result = [];
for (let i = 0; i < rowArry.length; i++) {
let colArray = rowArry[i].split("\t");
if (i === 0) {
titles = colArray;
} else {
if (colArray.length != titles.length) {
//
if (colArray.length === 1 && colArray[0] === '') {
this.getTableData(rowArry.slice(i + 1));
} else {
this.getTableData(rowArry.slice(i));
}
break;
} else {
let item = {};
for (let j = 0; j < colArray.length; j++) {
item[titles[j]] = (colArray[j] ? colArray[j] : "");
}
result.push(item);
}
}
}
this.tables.splice(0, 0, {
titles: titles,
tableData: result
});
}
this.titles = title;
this.tableData = result;
this.tableData.splice(this.tableData.length - 3, 3);
}
}
</script>
<style scoped>
.el-table {
margin-bottom: 20px;
}
.el-table >>> .cell {
white-space: nowrap;
}

View File

@ -217,7 +217,7 @@
})
},
del(row) {
this.$confirm(this.$t('member.remove_member'), '', {
this.$confirm(this.$t('member.org_remove_member'), '', {
confirmButtonText: this.$t('commons.confirm'),
cancelButtonText: this.$t('commons.cancel'),
type: 'warning'

View File

@ -145,14 +145,14 @@ export default {
data.isReadOnly = true;
if (data.type === 'EMAIL') {
data.isReadOnly = !data.isReadOnly
data.webhook = ''
data.webhook = '';
}
},
handleEditTask(index,data) {
data.isSet = true
if (data.type === 'EMAIL') {
data.isReadOnly = false;
data.webhook = ''
data.webhook = '';
} else {
data.isReadOnly = true;
}

View File

@ -195,7 +195,7 @@ export default {
data.isSet = true
if (data.type === 'EMAIL') {
data.isReadOnly = false;
data.webhook = ''
data.webhook = '';
} else {
data.isReadOnly = true;
}
@ -203,7 +203,6 @@ export default {
},
addTask(data) {
let list = [];
data.isSet = false;
list.push(data);
let param = {};
param.messageDetail = list;
@ -216,7 +215,7 @@ export default {
if (!data[index].identification) {
data.splice(index, 1)
} else {
data[index].isSet = false;
data[parseInt(index)].isSet = false;
}
},

View File

@ -148,21 +148,21 @@ export default {
data.isReadOnly = true;
if (data.type === 'EMAIL') {
data.isReadOnly = !data.isReadOnly;
data.webhook = ''
data.webhook = '';
}
},
handleAddTaskModel(type) {
let Task = {};
Task.event = [];
Task.userIds = [];
Task.type = "";
Task.webhook = "";
Task.type = '';
Task.webhook = '';
Task.isSet = true;
Task.identification = "";
Task.identification = '';
if (type === 'scheduleTask') {
Task.taskType = 'SCHEDULE_TASK'
Task.testId=this.testId
this.form.scheduleTask.push(Task)
Task.taskType = 'SCHEDULE_TASK';
Task.testId=this.testId;
this.form.scheduleTask.push(Task);
}
},
handleEditTask(index,data) {
@ -170,7 +170,7 @@ export default {
data.testId = this.testId;
if (data.type === 'EMAIL') {
data.isReadOnly = false;
data.webhook = ''
data.webhook = '';
} else {
data.isReadOnly = true;
}
@ -196,7 +196,7 @@ export default {
data.isSet = false;
list.push(data);
let param = {};
param.messageDetail = list
param.messageDetail = list;
this.result = this.$post("/notice/save/message/task", param, () => {
this.initForm()
this.$success(this.$t('commons.save_success'));
@ -206,7 +206,7 @@ export default {
if (!data[index].identification) {
data.splice(index, 1)
} else {
data[index].isSet = false
data[index].isSet = false;
}
},
deleteRowTask(index, data) { //

View File

@ -221,7 +221,7 @@ export default {
if (!data[index].identification) {
data.splice(index, 1)
} else {
data[index].isSet = false
data[index].isSet = false;
}
},
deleteRowTask(index, data) { //

View File

@ -129,6 +129,10 @@ export default {
pre {
margin: 0 0;
white-space: pre-wrap;
word-wrap: break-word;
width: 100%;
line-height: 20px;
}
.comment-delete {

View File

@ -314,6 +314,7 @@ export default {
repeat_password: 'Repeat',
inconsistent_passwords: 'The two passwords entered are inconsistent',
remove_member: 'Are you sure you want to remove this member',
org_remove_member: 'Removing the user from the organization will also remove permissions from all workspaces under the organization. Are you sure you want to remove the member ?',
input_id_or_email: 'Please enter user ID, or user Email',
no_such_user: 'Without this user information, please enter the correct user ID or user Email!',
},

View File

@ -313,6 +313,7 @@ export default {
repeat_password: '确认密码',
inconsistent_passwords: '两次输入的密码不一致',
remove_member: '确定要移除该成员吗',
org_remove_member: '将该用户从组织中移除,将同时移除该组织下所有工作空间的权限,确定要移除该成员吗?',
input_id_or_email: '请输入用户 ID, 或者 用户邮箱',
no_such_user: '无此用户信息, 请输入正确的用户 ID 或者 用户邮箱!',
},

View File

@ -315,6 +315,7 @@ export default {
repeat_password: '確認密碼',
inconsistent_passwords: '兩次輸入的密碼不壹致',
remove_member: '確定要移除該成員嗎',
org_remove_member: '將該用戶從組織中移除,將同時移除該組織下所有工作空間的權限,確定要移除該成員嗎?',
input_id_or_email: '請輸入用戶 ID, 或者 用戶郵箱',
no_such_user: '無此用戶信息, 請輸入正確的用戶 ID 或者 用戶郵箱!',
},

View File

@ -13,7 +13,7 @@
<version>2.2.6.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<name>metersphere</name>
<modules>
<module>frontend</module>