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,31 +87,39 @@ 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();
|
||||||
ResponseEntity<String> responseEntity = restTemplate.exchange(url + "api-getModel-bug-getById-bugID={bugId}?zentaosid=" + session,
|
try {
|
||||||
HttpMethod.POST, requestEntity, String.class, bugId);
|
ResponseEntity<String> responseEntity = restTemplate.exchange(url + "api-getModel-bug-getById-bugID={bugId}?zentaosid=" + session,
|
||||||
String body = responseEntity.getBody();
|
HttpMethod.POST, requestEntity, String.class, bugId);
|
||||||
JSONObject obj = JSONObject.parseObject(body);
|
String body = responseEntity.getBody();
|
||||||
if (obj != null) {
|
JSONObject obj = JSONObject.parseObject(body);
|
||||||
JSONObject bug = obj.getJSONObject("data");
|
|
||||||
String id = bug.getString("id");
|
LogUtil.info("bug id is " + bugId + obj);
|
||||||
String title = bug.getString("title");
|
|
||||||
String description = bug.getString("steps");
|
if (obj != null) {
|
||||||
Long createTime = bug.getLong("openedDate");
|
JSONObject bug = obj.getJSONObject("data");
|
||||||
String status = bug.getString("status");
|
String id = bug.getString("id");
|
||||||
String reporter = bug.getString("openedBy");
|
String title = bug.getString("title");
|
||||||
int deleted = bug.getInteger("deleted");
|
String description = bug.getString("steps");
|
||||||
if (deleted == 1) {
|
Long createTime = bug.getLong("openedDate");
|
||||||
return new Issues();
|
String status = bug.getString("status");
|
||||||
|
String reporter = bug.getString("openedBy");
|
||||||
|
int deleted = bug.getInteger("deleted");
|
||||||
|
if (deleted == 1) {
|
||||||
|
return new Issues();
|
||||||
|
}
|
||||||
|
Issues issues = new Issues();
|
||||||
|
issues.setId(id);
|
||||||
|
issues.setTitle(title);
|
||||||
|
issues.setDescription(description);
|
||||||
|
issues.setCreateTime(createTime);
|
||||||
|
issues.setStatus(status);
|
||||||
|
issues.setReporter(reporter);
|
||||||
|
return issues;
|
||||||
}
|
}
|
||||||
Issues issues = new Issues();
|
} catch (Exception e) {
|
||||||
issues.setId(id);
|
LogUtil.error("get zentao bug fail " + e.getMessage());
|
||||||
issues.setTitle(title);
|
|
||||||
issues.setDescription(description);
|
|
||||||
issues.setCreateTime(createTime);
|
|
||||||
issues.setStatus(status);
|
|
||||||
issues.setReporter(reporter);
|
|
||||||
return issues;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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,11 +172,16 @@ public class ZentaoPlatform extends AbstractIssuePlatform {
|
||||||
testCaseIssues.setTestCaseId(testCaseId);
|
testCaseIssues.setTestCaseId(testCaseId);
|
||||||
testCaseIssuesMapper.insert(testCaseIssues);
|
testCaseIssuesMapper.insert(testCaseIssues);
|
||||||
|
|
||||||
// 插入缺陷表
|
IssuesExample issuesExample = new IssuesExample();
|
||||||
Issues issues = new Issues();
|
issuesExample.createCriteria().andIdEqualTo(id)
|
||||||
issues.setId(id);
|
.andPlatformEqualTo(IssuesManagePlatform.Zentao.toString());
|
||||||
issues.setPlatform(IssuesManagePlatform.Zentao.toString());
|
if (issuesMapper.selectByExample(issuesExample).size() <= 0) {
|
||||||
issuesMapper.insert(issues);
|
// 插入缺陷表
|
||||||
|
Issues issues = new Issues();
|
||||||
|
issues.setId(id);
|
||||||
|
issues.setPlatform(IssuesManagePlatform.Zentao.toString());
|
||||||
|
issuesMapper.insert(issues);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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:
|
||||||
this.threadGroups[i].duration = item.value;
|
if (item.unit) {
|
||||||
|
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:
|
||||||
this.threadGroups[0].duration = d.value;
|
if (d.unit) {
|
||||||
|
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