Merge branch 'master' of https://github.com/metersphere/server
This commit is contained in:
commit
97cb512ea9
|
@ -167,6 +167,11 @@ curl -sSL https://github.com/metersphere/metersphere/releases/latest/download/qu
|
|||
- 基础设施: [Docker](https://www.docker.com/), [Kubernetes](https://kubernetes.io/)
|
||||
- 测试引擎: [JMeter](https://jmeter.apache.org/)
|
||||
|
||||
## 加入 MeterSphere 团队
|
||||
我们正在招聘 MeterSphere 技术布道师,一起打造开源明星项目,请发简历到 metersphere@fit2cloud.com
|
||||
|
||||
点击查看 [岗位详情](https://www.zhipin.com/job_detail/b151c4b3d594688733Ny3dy1GFI~.html)
|
||||
|
||||
## 微信群
|
||||
|
||||
![wechat-group](https://metersphere.io/images/contact/wechat-group.png)
|
||||
|
|
|
@ -2,11 +2,13 @@ package io.metersphere.track.request.testcase;
|
|||
|
||||
import io.metersphere.base.domain.TestCaseNode;
|
||||
import io.metersphere.track.dto.TestCaseNodeDTO;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Getter
|
||||
@Setter
|
||||
public class DragNodeRequest extends TestCaseNode {
|
||||
|
||||
List<String> nodeIds;
|
||||
|
|
|
@ -92,19 +92,22 @@
|
|||
host: [
|
||||
{
|
||||
required: true,
|
||||
message: ''
|
||||
message: this.$t('system_parameter_setting.host'),
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
],
|
||||
port: [
|
||||
{
|
||||
required: true,
|
||||
message: ' '
|
||||
message: this.$t('system_parameter_setting.port'),
|
||||
trigger: ['change', 'blur']
|
||||
}
|
||||
],
|
||||
account: [
|
||||
{
|
||||
required: true,
|
||||
message: ' '
|
||||
message: this.$t('system_parameter_setting.account'),
|
||||
trigger: ['change', 'blur']
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,144 +21,7 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
formInline: {
|
||||
/*host: 'smtp.163.com',
|
||||
port: '465',
|
||||
account: 'xjj0608@163.com',
|
||||
password: '2345678',*/
|
||||
},
|
||||
|
||||
input: '',
|
||||
visible: true,
|
||||
result: {},
|
||||
showEdit: true,
|
||||
showSave: false,
|
||||
showCancel: false,
|
||||
show: true,
|
||||
disabledConnection: false,
|
||||
disabledSave: false,
|
||||
loading: false,
|
||||
activeName: 'email',
|
||||
rules: {
|
||||
host: [
|
||||
{
|
||||
required: true,
|
||||
message: ' '
|
||||
},
|
||||
],
|
||||
port: [
|
||||
{
|
||||
required: true,
|
||||
message: ' '
|
||||
}
|
||||
],
|
||||
account: [
|
||||
{
|
||||
required: true,
|
||||
message: ' '
|
||||
}]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
activated() {
|
||||
this.query()
|
||||
this.change()
|
||||
},
|
||||
methods: {
|
||||
changeType() {
|
||||
this.$refs.input = 'password'
|
||||
},
|
||||
query() {
|
||||
this.result = this.$get("/system/mail/info", response => {
|
||||
this.$set(this.formInline, "host", response.data[0].paramValue);
|
||||
this.$set(this.formInline, "port", response.data[1].paramValue);
|
||||
this.$set(this.formInline, "account", response.data[2].paramValue);
|
||||
this.$set(this.formInline, "password", response.data[3].paramValue);
|
||||
if(response.data[4].paramValue!=""){
|
||||
this.$set(this.formInline, "SSL", JSON.parse(response.data[4].paramValue));
|
||||
}
|
||||
if(response.data[5].paramValue!=""){
|
||||
this.$set(this.formInline, "TLS", JSON.parse(response.data[5].paramValue));
|
||||
}
|
||||
if(response.data[6].paramValue!=""){
|
||||
this.$set(this.formInline, "SMTP", JSON.parse(response.data[6].paramValue));
|
||||
}
|
||||
})
|
||||
},
|
||||
change() {
|
||||
if (!this.formInline.host || !this.formInline.port || !this.formInline.account) {
|
||||
this.disabledConnection = true;
|
||||
this.disabledSave = true;
|
||||
} else {
|
||||
this.disabledConnection = false;
|
||||
this.disabledSave = false;
|
||||
}
|
||||
},
|
||||
testConnection(formInline) {
|
||||
let param = {
|
||||
"smtp.server": this.formInline.host,
|
||||
"smtp.port": this.formInline.port,
|
||||
"smtp.account": this.formInline.account,
|
||||
"smtp.password": this.formInline.password,
|
||||
"smtp.ssl": this.formInline.SSL,
|
||||
"smtp.tls": this.formInline.TLS,
|
||||
"smtp.smtp": this.formInline.SMTP,
|
||||
};
|
||||
this.$refs[formInline].validate((valid) => {
|
||||
if (valid) {
|
||||
this.result = this.$post("/system/testConnection", param, response => {
|
||||
this.$success(this.$t('commons.connection_successful'));
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
},
|
||||
edit() {
|
||||
this.change()
|
||||
this.showEdit = false;
|
||||
this.showSave = true;
|
||||
this.showCancel = true;
|
||||
this.show = false;
|
||||
},
|
||||
save(formInline) {
|
||||
this.showEdit = true;
|
||||
this.showCancel = false;
|
||||
this.showSave = false;
|
||||
this.show = true;
|
||||
let param = [
|
||||
{paramKey: "smtp.host", paramValue: this.formInline.host, type: "text", sort: 1},
|
||||
{paramKey: "smtp.port", paramValue: this.formInline.port, type: "text", sort: 2},
|
||||
{paramKey: "smtp.account", paramValue: this.formInline.account, type: "text", sort: 3},
|
||||
{paramKey: "smtp.password", paramValue: this.formInline.password, type: "password", sort: 4},
|
||||
{paramKey: "smtp.ssl", paramValue: this.formInline.SSL, type: "text", sort: 5},
|
||||
{paramKey: "smtp.tls", paramValue: this.formInline.TLS, type: "text", sort: 6},
|
||||
{paramKey: "smtp.smtp", paramValue: this.formInline.SMTP, type: "text", sort: 7}
|
||||
]
|
||||
|
||||
this.$refs[formInline].validate(valid => {
|
||||
if (valid) {
|
||||
this.result = this.$post("/system/edit/email", param, response => {
|
||||
let flag = response.success;
|
||||
if (flag) {
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
} else {
|
||||
this.$message.error(this.$t('commons.save_failed'));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
this.query();
|
||||
this.showEdit = true;
|
||||
this.showCancel = false;
|
||||
this.showSave = false;
|
||||
this.show = true;
|
||||
this.change()
|
||||
activeName: 'email'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
type="selection"/>
|
||||
<el-table-column
|
||||
prop="num"
|
||||
sortable="custom"
|
||||
:label="$t('commons.id')"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
|
@ -315,6 +316,10 @@
|
|||
this.initTableData();
|
||||
},
|
||||
sort(column) {
|
||||
// 每次只对一个字段排序
|
||||
if (this.condition.orders) {
|
||||
this.condition.orders = [];
|
||||
}
|
||||
_sort(column, this.condition);
|
||||
this.initTableData();
|
||||
}
|
||||
|
|
|
@ -630,6 +630,9 @@ export default {
|
|||
SSL: 'Turn on SSL (if the SMTP port is 465, you usually need to enable SSL)',
|
||||
TLS: 'Turn on TLS (if the SMTP port is 587, you usually need to enable TLS)',
|
||||
SMTP: 'Anonymous SMTP or not',
|
||||
host: 'Host number cannot be empty',
|
||||
port: 'Port cannot be empty',
|
||||
account: 'Account cannot be empty',
|
||||
|
||||
},
|
||||
i18n: {
|
||||
|
|
|
@ -629,6 +629,9 @@ export default {
|
|||
SSL: '开启SSL(如果SMTP端口是465,通常需要启用SSL)',
|
||||
TLS: '开启TLS(如果SMTP端口是587,通常需要启用TLS)',
|
||||
SMTP: '是否匿名 SMTP',
|
||||
host: '主机号不能为空',
|
||||
port: '端口号不能为空',
|
||||
account: '账户不能为空',
|
||||
},
|
||||
i18n: {
|
||||
home: '首页'
|
||||
|
|
|
@ -629,6 +629,9 @@ export default {
|
|||
SSL: '開啟SSL(如果SMTP埠是465,通常需要啟用SSL)',
|
||||
TLS: '開啟TLS(如果SMTP埠是587,通常需要啟用TLS)',
|
||||
SMTP: '是否匿名 SMTP',
|
||||
host: '主機號不能為空',
|
||||
port: '埠號不能為空',
|
||||
account: '帳戶不能為空',
|
||||
},
|
||||
i18n: {
|
||||
home: '首頁'
|
||||
|
|
Loading…
Reference in New Issue