Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
6d3b3ccfa4
|
@ -37,6 +37,9 @@
|
||||||
<if test="platform == 'Tapd'">
|
<if test="platform == 'Tapd'">
|
||||||
tapd_id = null
|
tapd_id = null
|
||||||
</if>
|
</if>
|
||||||
|
<if test="platform == 'Zentao'">
|
||||||
|
zentao_id = null
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where project.id in (select id from (select id
|
where project.id in (select id from (select id
|
||||||
from project
|
from project
|
||||||
|
|
|
@ -87,10 +87,14 @@ public class ZentaoPlatform extends AbstractIssuePlatform {
|
||||||
String session = login();
|
String session = login();
|
||||||
HttpEntity<MultiValueMap> requestEntity = new HttpEntity<>(new HttpHeaders());
|
HttpEntity<MultiValueMap> requestEntity = new HttpEntity<>(new HttpHeaders());
|
||||||
RestTemplate restTemplate = new RestTemplate();
|
RestTemplate restTemplate = new RestTemplate();
|
||||||
|
try {
|
||||||
ResponseEntity<String> responseEntity = restTemplate.exchange(url + "api-getModel-bug-getById-bugID={bugId}?zentaosid=" + session,
|
ResponseEntity<String> responseEntity = restTemplate.exchange(url + "api-getModel-bug-getById-bugID={bugId}?zentaosid=" + session,
|
||||||
HttpMethod.POST, requestEntity, String.class, bugId);
|
HttpMethod.POST, requestEntity, String.class, bugId);
|
||||||
String body = responseEntity.getBody();
|
String body = responseEntity.getBody();
|
||||||
JSONObject obj = JSONObject.parseObject(body);
|
JSONObject obj = JSONObject.parseObject(body);
|
||||||
|
|
||||||
|
LogUtil.info("bug id is " + bugId + obj);
|
||||||
|
|
||||||
if (obj != null) {
|
if (obj != null) {
|
||||||
JSONObject bug = obj.getJSONObject("data");
|
JSONObject bug = obj.getJSONObject("data");
|
||||||
String id = bug.getString("id");
|
String id = bug.getString("id");
|
||||||
|
@ -112,6 +116,10 @@ public class ZentaoPlatform extends AbstractIssuePlatform {
|
||||||
issues.setReporter(reporter);
|
issues.setReporter(reporter);
|
||||||
return issues;
|
return issues;
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
LogUtil.error("get zentao bug fail " + e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
return new Issues();
|
return new Issues();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,6 +158,9 @@ public class ZentaoPlatform extends AbstractIssuePlatform {
|
||||||
ResponseEntity<String> responseEntity = restTemplate.exchange(url + "api-getModel-bug-create.json?zentaosid=" + session, HttpMethod.POST, requestEntity, String.class);
|
ResponseEntity<String> responseEntity = restTemplate.exchange(url + "api-getModel-bug-create.json?zentaosid=" + session, HttpMethod.POST, requestEntity, String.class);
|
||||||
String body = responseEntity.getBody();
|
String body = responseEntity.getBody();
|
||||||
JSONObject obj = JSONObject.parseObject(body);
|
JSONObject obj = JSONObject.parseObject(body);
|
||||||
|
|
||||||
|
LogUtil.info("add zentao bug " + obj);
|
||||||
|
|
||||||
if (obj != null) {
|
if (obj != null) {
|
||||||
JSONObject data = obj.getJSONObject("data");
|
JSONObject data = obj.getJSONObject("data");
|
||||||
String id = data.getString("id");
|
String id = data.getString("id");
|
||||||
|
@ -161,6 +172,10 @@ public class ZentaoPlatform extends AbstractIssuePlatform {
|
||||||
testCaseIssues.setTestCaseId(testCaseId);
|
testCaseIssues.setTestCaseId(testCaseId);
|
||||||
testCaseIssuesMapper.insert(testCaseIssues);
|
testCaseIssuesMapper.insert(testCaseIssues);
|
||||||
|
|
||||||
|
IssuesExample issuesExample = new IssuesExample();
|
||||||
|
issuesExample.createCriteria().andIdEqualTo(id)
|
||||||
|
.andPlatformEqualTo(IssuesManagePlatform.Zentao.toString());
|
||||||
|
if (issuesMapper.selectByExample(issuesExample).size() <= 0) {
|
||||||
// 插入缺陷表
|
// 插入缺陷表
|
||||||
Issues issues = new Issues();
|
Issues issues = new Issues();
|
||||||
issues.setId(id);
|
issues.setId(id);
|
||||||
|
@ -169,6 +184,7 @@ public class ZentaoPlatform extends AbstractIssuePlatform {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteIssue(String id) {
|
public void deleteIssue(String id) {
|
||||||
|
@ -235,6 +251,9 @@ public class ZentaoPlatform extends AbstractIssuePlatform {
|
||||||
HttpMethod.GET, requestEntity, String.class);
|
HttpMethod.GET, requestEntity, String.class);
|
||||||
String body = responseEntity.getBody();
|
String body = responseEntity.getBody();
|
||||||
JSONObject obj = JSONObject.parseObject(body);
|
JSONObject obj = JSONObject.parseObject(body);
|
||||||
|
|
||||||
|
LogUtil.info("zentao user " + obj);
|
||||||
|
|
||||||
JSONArray data = obj.getJSONArray("data");
|
JSONArray data = obj.getJSONArray("data");
|
||||||
|
|
||||||
List<PlatformUser> users = new ArrayList<>();
|
List<PlatformUser> users = new ArrayList<>();
|
||||||
|
@ -260,6 +279,9 @@ public class ZentaoPlatform extends AbstractIssuePlatform {
|
||||||
HttpMethod.GET, requestEntity, String.class, projectId);
|
HttpMethod.GET, requestEntity, String.class, projectId);
|
||||||
String body = responseEntity.getBody();
|
String body = responseEntity.getBody();
|
||||||
JSONObject obj = JSONObject.parseObject(body);
|
JSONObject obj = JSONObject.parseObject(body);
|
||||||
|
|
||||||
|
LogUtil.info("zentao builds" + obj);
|
||||||
|
|
||||||
JSONObject data = obj.getJSONObject("data");
|
JSONObject data = obj.getJSONObject("data");
|
||||||
Map<String,Object> maps = data.getInnerMap();
|
Map<String,Object> maps = data.getInnerMap();
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 57d6f78efa4b0300be188e8b024511ceef0873ed
|
Subproject commit 419c75bca64b7c5bfbd1194d7f0fd9919f0caa04
|
|
@ -0,0 +1,4 @@
|
||||||
|
alter table issues drop primary key;
|
||||||
|
alter table issues
|
||||||
|
add constraint issues_pk
|
||||||
|
primary key (id, platform);
|
|
@ -129,7 +129,11 @@ export default {
|
||||||
this.threadGroups[i].rampUpTime = item.value;
|
this.threadGroups[i].rampUpTime = item.value;
|
||||||
break;
|
break;
|
||||||
case DURATION:
|
case DURATION:
|
||||||
|
if (item.unit) {
|
||||||
this.threadGroups[i].duration = item.value;
|
this.threadGroups[i].duration = item.value;
|
||||||
|
} else {
|
||||||
|
this.threadGroups[i].duration = item.value * 60;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case STEPS:
|
case STEPS:
|
||||||
this.threadGroups[i].step = item.value;
|
this.threadGroups[i].step = item.value;
|
||||||
|
@ -154,7 +158,11 @@ export default {
|
||||||
this.threadGroups[0].rampUpTime = d.value;
|
this.threadGroups[0].rampUpTime = d.value;
|
||||||
break;
|
break;
|
||||||
case DURATION:
|
case DURATION:
|
||||||
|
if (d.unit) {
|
||||||
this.threadGroups[0].duration = d.value;
|
this.threadGroups[0].duration = d.value;
|
||||||
|
} else {
|
||||||
|
this.threadGroups[0].duration = d.value * 60;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case STEPS:
|
case STEPS:
|
||||||
this.threadGroups[0].step = d.value;
|
this.threadGroups[0].step = d.value;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 71d57ae5d7f8bb5c93a29504ac6f2300dc189ce9
|
Subproject commit 33bbdb3f528c914bf333b2c1839dd6d3bbd9b569
|
|
@ -27,7 +27,7 @@ export default {
|
||||||
operating: 'Operating',
|
operating: 'Operating',
|
||||||
input_limit: 'Within {0} and {1} characters',
|
input_limit: 'Within {0} and {1} characters',
|
||||||
login: 'Sign In',
|
login: 'Sign In',
|
||||||
welcome: 'Welcome back, please enter username and password to log in to MeterSphere',
|
welcome: 'Welcome back, please enter username and password to log in',
|
||||||
username: 'Username',
|
username: 'Username',
|
||||||
password: 'Password',
|
password: 'Password',
|
||||||
input_username: 'Please enter username',
|
input_username: 'Please enter username',
|
||||||
|
|
|
@ -27,7 +27,7 @@ export default {
|
||||||
operating: '操作',
|
operating: '操作',
|
||||||
input_limit: '长度在 {0} 到 {1} 个字符',
|
input_limit: '长度在 {0} 到 {1} 个字符',
|
||||||
login: '登录',
|
login: '登录',
|
||||||
welcome: '欢迎回来,请输入用户名和密码登录MeterSphere',
|
welcome: '欢迎回来,请输入用户名和密码登录',
|
||||||
username: '姓名',
|
username: '姓名',
|
||||||
password: '密码',
|
password: '密码',
|
||||||
input_username: '请输入用户姓名',
|
input_username: '请输入用户姓名',
|
||||||
|
|
|
@ -27,7 +27,7 @@ export default {
|
||||||
operating: '操作',
|
operating: '操作',
|
||||||
input_limit: '長度在 {0} 到 {1} 個字符',
|
input_limit: '長度在 {0} 到 {1} 個字符',
|
||||||
login: '登錄',
|
login: '登錄',
|
||||||
welcome: '歡迎回來,請輸入用戶名和密碼登錄MeterSphere',
|
welcome: '歡迎回來,請輸入用戶名和密碼登錄',
|
||||||
username: '姓名',
|
username: '姓名',
|
||||||
password: '密碼',
|
password: '密碼',
|
||||||
input_username: '請輸入用戶姓名',
|
input_username: '請輸入用戶姓名',
|
||||||
|
|
|
@ -8,8 +8,7 @@
|
||||||
<img v-else src="../assets/logo-dark-MeterSphere.svg" style="width: 224px; " alt="">
|
<img v-else src="../assets/logo-dark-MeterSphere.svg" style="width: 224px; " alt="">
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span id="s1">{{ $t('commons.login') }}</span>
|
<span id="s1">{{ loginTitle }}</span>
|
||||||
<span id="s2">MeterSphere</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="border"></div>
|
<div class="border"></div>
|
||||||
<div class="welcome">
|
<div class="welcome">
|
||||||
|
@ -89,6 +88,7 @@ export default {
|
||||||
openLdap: false,
|
openLdap: false,
|
||||||
loginLogoId: '_blank',
|
loginLogoId: '_blank',
|
||||||
loginImageId: '_blank',
|
loginImageId: '_blank',
|
||||||
|
loginTitle: this.$t("commons.login") + " MeterSphere"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeCreate() {
|
beforeCreate() {
|
||||||
|
|
Loading…
Reference in New Issue