feat(性能测试): 增加列表执行

--story=1006065 --user=李玉号 性能测试列表页新增执行
https://www.tapd.cn/55049933/s/1112135
This commit is contained in:
shiziyuan9527 2022-03-02 16:06:33 +08:00 committed by shiziyuan9527
parent 9ebde184e9
commit a1508652f9
4 changed files with 16 additions and 1 deletions

View File

@ -157,11 +157,17 @@ export default {
testId: null, testId: null,
enableOrderDrag: true, enableOrderDrag: true,
operators: [ operators: [
{
tip: this.$t('commons.run'), icon: "el-icon-video-play",
exec: this.handleRun,
permissions: ['PROJECT_PERFORMANCE_TEST:READ+RUN']
},
{ {
tip: this.$t('commons.edit'), icon: "el-icon-edit", tip: this.$t('commons.edit'), icon: "el-icon-edit",
exec: this.handleEdit, exec: this.handleEdit,
permissions: ['PROJECT_PERFORMANCE_TEST:READ+EDIT'] permissions: ['PROJECT_PERFORMANCE_TEST:READ+EDIT']
}, { },
{
tip: this.$t('commons.copy'), icon: "el-icon-copy-document", type: "success", tip: this.$t('commons.copy'), icon: "el-icon-copy-document", type: "success",
exec: this.handleCopy, exec: this.handleCopy,
permissions: ['PROJECT_PERFORMANCE_TEST:READ+COPY'] permissions: ['PROJECT_PERFORMANCE_TEST:READ+COPY']
@ -255,6 +261,12 @@ export default {
this.search(); this.search();
}); });
}, },
handleRun(test) {
this.result = this.$post("/performance/run", {id: test.id, triggerMode: 'MANUAL'}, (response) => {
let reportId = response.data;
this.$router.push({path: '/performance/report/view/' + reportId});
});
},
handleDelete(test) { handleDelete(test) {
this.$get('/performance/versions/' + test.id, response => { this.$get('/performance/versions/' + test.id, response => {
if (hasLicense() && this.versionEnable && response.data.length > 1) { if (hasLicense() && this.versionEnable && response.data.length > 1) {

View File

@ -231,6 +231,7 @@ export default {
enable_scene_info: "Enable scene environment: the current step uses the original environment configuration of the scene to run", enable_scene_info: "Enable scene environment: the current step uses the original environment configuration of the scene to run",
edit_info: "Edit details", edit_info: "Edit details",
environment: "Environment", environment: "Environment",
run: "Run",
run_success: "Run Success", run_success: "Run Success",
run_completed: "Run Completed", run_completed: "Run Completed",
run_fail: "Run Fail", run_fail: "Run Fail",

View File

@ -232,6 +232,7 @@ export default {
reference_settings: "场景设置", reference_settings: "场景设置",
enable_scene_info: "启用场景环境:当前步骤使用场景原始环境配置运行", enable_scene_info: "启用场景环境:当前步骤使用场景原始环境配置运行",
environment: "运行环境", environment: "运行环境",
run: "运行",
run_success: "执行成功", run_success: "执行成功",
run_completed: "执行完成", run_completed: "执行完成",
run_warning: "正在运行中,请稍后查看", run_warning: "正在运行中,请稍后查看",

View File

@ -232,6 +232,7 @@ export default {
reference_settings: "场景设置", reference_settings: "场景设置",
enable_scene_info: "啟用場景環境:當前步驟使用場景原始環境配置運行", enable_scene_info: "啟用場景環境:當前步驟使用場景原始環境配置運行",
environment: "運行環境", environment: "運行環境",
run: "運行",
run_success: "執行成功", run_success: "執行成功",
run_completed: "執行完成", run_completed: "執行完成",
run_warning: "正在運行中,請稍後查看", run_warning: "正在運行中,請稍後查看",