Merge branch 'v1.1' of https://github.com/metersphere/server into v1.1
This commit is contained in:
commit
f274cd3b32
|
@ -47,10 +47,6 @@ public class APITestController {
|
||||||
return apiTestService.getApiTestByProjectId(projectId);
|
return apiTestService.getApiTestByProjectId(projectId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/state/get/{testId}")
|
|
||||||
public ApiTest apiState(@PathVariable String testId) {
|
|
||||||
return apiTestService.getApiTestByTestId(testId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping(value = "/schedule/update")
|
@PostMapping(value = "/schedule/update")
|
||||||
public void updateSchedule(@RequestBody Schedule request) {
|
public void updateSchedule(@RequestBody Schedule request) {
|
||||||
|
|
|
@ -126,9 +126,6 @@ public class APITestService {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ApiTest getApiTestByTestId(String testId) {
|
|
||||||
return apiTestMapper.selectByPrimaryKey(testId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<ApiTest> getApiTestByProjectId(String projectId) {
|
public List<ApiTest> getApiTestByProjectId(String projectId) {
|
||||||
return extApiTestMapper.getApiTestByProjectId(projectId);
|
return extApiTestMapper.getApiTestByProjectId(projectId);
|
||||||
|
|
|
@ -235,7 +235,12 @@
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by update_time desc
|
<if test="request.orders != null and request.orders.size() > 0">
|
||||||
|
order by
|
||||||
|
<foreach collection="request.orders" separator="," item="order">
|
||||||
|
${order.name} ${order.type}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getMaxNumByProjectId" resultType="io.metersphere.base.domain.TestCase">
|
<select id="getMaxNumByProjectId" resultType="io.metersphere.base.domain.TestCase">
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package io.metersphere.track.request.testcase;
|
package io.metersphere.track.request.testcase;
|
||||||
|
|
||||||
import io.metersphere.base.domain.TestCaseWithBLOBs;
|
import io.metersphere.base.domain.TestCaseWithBLOBs;
|
||||||
|
import io.metersphere.controller.request.OrderRequest;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@ -10,4 +11,5 @@ import java.util.List;
|
||||||
@Setter
|
@Setter
|
||||||
public class TestCaseBatchRequest extends TestCaseWithBLOBs {
|
public class TestCaseBatchRequest extends TestCaseWithBLOBs {
|
||||||
private List<String> ids;
|
private List<String> ids;
|
||||||
|
private List<OrderRequest> orders;
|
||||||
}
|
}
|
||||||
|
|
|
@ -356,6 +356,12 @@ public class TestCaseService {
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<TestCaseExcelData> generateTestCaseExcel(TestCaseBatchRequest request) {
|
private List<TestCaseExcelData> generateTestCaseExcel(TestCaseBatchRequest request) {
|
||||||
|
List<OrderRequest> orderList = ServiceUtils.getDefaultOrder(request.getOrders());
|
||||||
|
OrderRequest order = new OrderRequest();
|
||||||
|
order.setName("sort");
|
||||||
|
order.setType("desc");
|
||||||
|
orderList.add(order);
|
||||||
|
request.setOrders(orderList);
|
||||||
List<TestCaseDTO> TestCaseList = extTestCaseMapper.listByTestCaseIds(request);
|
List<TestCaseDTO> TestCaseList = extTestCaseMapper.listByTestCaseIds(request);
|
||||||
List<TestCaseExcelData> list = new ArrayList<>();
|
List<TestCaseExcelData> list = new ArrayList<>();
|
||||||
StringBuilder step = new StringBuilder("");
|
StringBuilder step = new StringBuilder("");
|
||||||
|
@ -466,6 +472,7 @@ public class TestCaseService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入用例前,检查数据库是否存在此用例
|
* 导入用例前,检查数据库是否存在此用例
|
||||||
|
*
|
||||||
* @param testCaseWithBLOBs
|
* @param testCaseWithBLOBs
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -66,8 +66,8 @@
|
||||||
<el-table-column label="Throughput">
|
<el-table-column label="Throughput">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="transactions"
|
prop="transactions"
|
||||||
label="Transactions"
|
label="Transactions/s"
|
||||||
width="100"
|
width="150"
|
||||||
/>
|
/>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
@ -76,13 +76,13 @@
|
||||||
prop="received"
|
prop="received"
|
||||||
label="Received"
|
label="Received"
|
||||||
align="center"
|
align="center"
|
||||||
width="200"
|
width="150"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="sent"
|
prop="sent"
|
||||||
label="Sent"
|
label="Sent"
|
||||||
align="center"
|
align="center"
|
||||||
width="200"
|
width="150"
|
||||||
/>
|
/>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
|
|
@ -39,9 +39,25 @@
|
||||||
@confirm="submit('form')"/>
|
@confirm="submit('form')"/>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<el-dialog :title="$t('workspace.update')" :visible.sync="dialogWsUpdateVisible" width="30%">
|
||||||
|
<el-form :model="form" :rules="rules" ref="form" label-position="right" label-width="100px" size="small">
|
||||||
|
<el-form-item :label="$t('commons.name')" prop="name">
|
||||||
|
<el-input v-model="form.name" autocomplete="off"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('commons.description')" prop="description">
|
||||||
|
<el-input type="textarea" v-model="form.description"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template v-slot:footer>
|
||||||
|
<ms-dialog-footer
|
||||||
|
@cancel="dialogWsUpdateVisible = false"
|
||||||
|
@confirm="submit('form')"/>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
<!-- dialog of workspace member -->
|
<!-- dialog of workspace member -->
|
||||||
<el-dialog :visible.sync="dialogWsMemberVisible" width="70%" :destroy-on-close="true" @close="closeMemberFunc" class="dialog-css">
|
<el-dialog :visible.sync="dialogWsMemberVisible" width="70%" :destroy-on-close="true" @close="closeMemberFunc"
|
||||||
|
class="dialog-css">
|
||||||
<ms-table-header :condition.sync="dialogCondition" @create="addMember" @search="dialogSearch"
|
<ms-table-header :condition.sync="dialogCondition" @create="addMember" @search="dialogSearch"
|
||||||
:create-tip="$t('member.create')" :title="$t('commons.member')"/>
|
:create-tip="$t('member.create')" :title="$t('commons.member')"/>
|
||||||
<!-- organization member table -->
|
<!-- organization member table -->
|
||||||
|
@ -201,8 +217,13 @@
|
||||||
}
|
}
|
||||||
this.$post("/workspace/" + saveType, this.form, () => {
|
this.$post("/workspace/" + saveType, this.form, () => {
|
||||||
this.dialogWsAddVisible = false;
|
this.dialogWsAddVisible = false;
|
||||||
|
this.dialogWsUpdateVisible = false;
|
||||||
this.list();
|
this.list();
|
||||||
Message.success(this.$t('commons.save_success'));
|
if (saveType == 'add') {
|
||||||
|
Message.success(this.$t('commons.save_success'));
|
||||||
|
} else if (saveType == 'update') {
|
||||||
|
Message.success(this.$t('commons.modify_success'));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
@ -210,7 +231,7 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
edit(row) {
|
edit(row) {
|
||||||
this.dialogWsAddVisible = true;
|
this.dialogWsUpdateVisible = true;
|
||||||
this.form = Object.assign({}, row);
|
this.form = Object.assign({}, row);
|
||||||
},
|
},
|
||||||
handleDelete(workspace) {
|
handleDelete(workspace) {
|
||||||
|
@ -423,6 +444,7 @@
|
||||||
return {
|
return {
|
||||||
result: {},
|
result: {},
|
||||||
dialogWsAddVisible: false,
|
dialogWsAddVisible: false,
|
||||||
|
dialogWsUpdateVisible: false,
|
||||||
dialogWsMemberVisible: false,
|
dialogWsMemberVisible: false,
|
||||||
dialogWsMemberAddVisible: false,
|
dialogWsMemberAddVisible: false,
|
||||||
dialogWsMemberUpdateVisible: false,
|
dialogWsMemberUpdateVisible: false,
|
||||||
|
|
Loading…
Reference in New Issue