Merge branch 'dev' of https://github.com/fit2cloudrd/metersphere-server into dev
This commit is contained in:
commit
d0ebd18be5
|
@ -1,6 +1,5 @@
|
|||
<template>
|
||||
|
||||
<div id="menu-bar" v-if="isRouterAlive">
|
||||
<div id="menu-bar">
|
||||
<el-row type="flex">
|
||||
<el-col :span="8">
|
||||
<el-menu class="header-menu" :unique-opened="true" mode="horizontal" router :default-active='$route.path'>
|
||||
|
@ -24,8 +23,8 @@
|
|||
<el-divider/>
|
||||
<ms-show-all :index="'/performance/test/all'"/>
|
||||
<ms-create-button :index="'/performance/test/create'" :title="$t('load_test.create')"/>
|
||||
<el-menu-item :index="testCaseProjectPath" class="blank_item"></el-menu-item>
|
||||
<el-menu-item :index="testEditPath" class="blank_item"></el-menu-item>
|
||||
<!-- <el-menu-item :index="testCaseProjectPath" class="blank_item"></el-menu-item>-->
|
||||
<!-- <el-menu-item :index="testEditPath" class="blank_item"></el-menu-item>-->
|
||||
</el-submenu>
|
||||
|
||||
<el-submenu v-if="isCurrentWorkspaceUser"
|
||||
|
@ -45,7 +44,6 @@
|
|||
<el-col :span="8"/>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -67,10 +65,10 @@
|
|||
data() {
|
||||
return {
|
||||
isCurrentWorkspaceUser: false,
|
||||
testCaseProjectPath: '',
|
||||
testEditPath: '',
|
||||
reportViewPath: '',
|
||||
isRouterAlive: true,
|
||||
// testCaseProjectPath: '',
|
||||
// testEditPath: '',
|
||||
// reportViewPath: '',
|
||||
// isRouterAlive: true,
|
||||
projectRecent: {
|
||||
title: this.$t('project.recent'),
|
||||
url: "/project/recent/5",
|
||||
|
@ -104,32 +102,32 @@
|
|||
mounted() {
|
||||
this.isCurrentWorkspaceUser = checkoutCurrentWorkspace();
|
||||
},
|
||||
watch: {
|
||||
'$route'(to, from) {
|
||||
let path = to.path;
|
||||
//激活菜单栏
|
||||
if (path.indexOf("/performance/test/") >= 0) {
|
||||
this.testCaseProjectPath = '/performance/test/' + this.$route.params.projectId;
|
||||
this.reload();
|
||||
}
|
||||
if (path.indexOf("/performance/test/edit/") >= 0) {
|
||||
this.testEditPath = '/performance/test/edit/' + this.$route.params.testId;
|
||||
this.reload();
|
||||
}
|
||||
if (path.indexOf("/performance/report/view/") >= 0) {
|
||||
this.reportViewPath = '/performance/report/view/' + this.$route.params.reportId;
|
||||
this.reload();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
reload() {
|
||||
this.isRouterAlive = false;
|
||||
this.$nextTick(function () {
|
||||
this.isRouterAlive = true;
|
||||
})
|
||||
}
|
||||
}
|
||||
// watch: {
|
||||
// '$route'(to, from) {
|
||||
// let path = to.path;
|
||||
// //激活菜单栏
|
||||
// if (path.indexOf("/performance/test/") >= 0) {
|
||||
// this.testCaseProjectPath = '/performance/test/' + this.$route.params.projectId;
|
||||
// this.reload();
|
||||
// }
|
||||
// if (path.indexOf("/performance/test/edit/") >= 0) {
|
||||
// this.testEditPath = '/performance/test/edit/' + this.$route.params.testId;
|
||||
// this.reload();
|
||||
// }
|
||||
// if (path.indexOf("/performance/report/view/") >= 0) {
|
||||
// this.reportViewPath = '/performance/report/view/' + this.$route.params.reportId;
|
||||
// this.reload();
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// methods: {
|
||||
// reload() {
|
||||
// this.isRouterAlive = false;
|
||||
// this.$nextTick(function () {
|
||||
// this.isRouterAlive = true;
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
@ -14,21 +14,21 @@
|
|||
</el-breadcrumb>
|
||||
</el-row>
|
||||
<el-row class="ms-report-view-btns">
|
||||
<el-button type="primary" plain size="mini">立即停止</el-button>
|
||||
<el-button type="success" plain size="mini">再次执行</el-button>
|
||||
<el-button type="info" plain size="mini">导出</el-button>
|
||||
<el-button type="warning" plain size="mini">比较</el-button>
|
||||
<el-button type="primary" plain size="mini">{{$t('report.test_stop_now')}}</el-button>
|
||||
<el-button type="success" plain size="mini">{{$t('report.test_execute_again')}}</el-button>
|
||||
<el-button type="info" plain size="mini">{{$t('report.export')}}</el-button>
|
||||
<el-button type="warning" plain size="mini">{{$t('report.compare')}}</el-button>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span class="ms-report-time-desc">
|
||||
持续时间: {{minutes}} 分钟 {{seconds}} 秒
|
||||
{{$t('report.test_duration', [this.minutes, this.seconds])}}
|
||||
</span>
|
||||
<span class="ms-report-time-desc">
|
||||
开始时间: {{startTime}}
|
||||
{{$t('report.test_start_time')}}:{{startTime}}
|
||||
</span>
|
||||
<span class="ms-report-time-desc">
|
||||
结束时间: {{endTime}}
|
||||
{{$t('report.test_end_time')}}:{{endTime}}
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -124,11 +124,11 @@
|
|||
this.status = data.status;
|
||||
switch (data.status) {
|
||||
case 'Error':
|
||||
this.$warning("报告生成错误,无法查看!");
|
||||
this.$warning(this.$t('report.generation_error'));
|
||||
break;
|
||||
case 'Starting':
|
||||
case 'Reporting':
|
||||
this.$info("报告生成中....");
|
||||
this.$info(this.$t('report.being_generated'));
|
||||
break;
|
||||
case 'Running':
|
||||
break;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<el-table-column prop="description" :label="$t('commons.description')"/>
|
||||
<el-table-column prop="type" :label="$t('test_resource_pool.type')">
|
||||
<template v-slot:default="scope">
|
||||
<span v-if="scope.row.type === 'NODE'">Single Docker</span>
|
||||
<span v-if="scope.row.type === 'NODE'">Node</span>
|
||||
<span v-if="scope.row.type === 'K8S'">Kubernetes</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -64,7 +64,7 @@
|
|||
<el-select v-model="form.type" :placeholder="$t('test_resource_pool.select_pool_type')"
|
||||
@change="changeResourceType()">
|
||||
<el-option key="K8S" value="K8S" label="Kubernetes">Kubernetes</el-option>
|
||||
<el-option key="NODE" value="NODE" label="Node">Single Docker</el-option>
|
||||
<el-option key="NODE" value="NODE" label="Node">Node</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<div v-for="(item,index) in infoList " :key="index">
|
||||
|
@ -146,7 +146,7 @@
|
|||
<el-select v-model="form.type" :placeholder="$t('test_resource_pool.select_pool_type')"
|
||||
@change="changeResourceType()">
|
||||
<el-option key="K8S" value="K8S" label="Kubernetes">Kubernetes</el-option>
|
||||
<el-option key="NODE" value="NODE" label="Node">Single Docker</el-option>
|
||||
<el-option key="NODE" value="NODE" label="Node">Node</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<div v-for="(item,index) in infoList " :key="index">
|
||||
|
|
|
@ -117,6 +117,15 @@ export default {
|
|||
'test_error_log': 'Test Error Log',
|
||||
'test_log_details': 'Test Log Details',
|
||||
'test_details': 'Test Details',
|
||||
'test_duration': 'Test Duration:{0} minutes {1} seconds',
|
||||
'test_start_time': 'Test Start Time',
|
||||
'test_end_time': 'Test End Time',
|
||||
'test_stop_now': 'Test Stop Now',
|
||||
'test_execute_again': 'Test Execute Again',
|
||||
'export': 'Export',
|
||||
'compare': 'Compare',
|
||||
'generation_error': 'Report generation error, cannot be viewed!',
|
||||
'being_generated': 'Report is being generated...',
|
||||
},
|
||||
load_test: {
|
||||
'recent': 'Recent Tests',
|
||||
|
|
|
@ -119,6 +119,15 @@ export default {
|
|||
'test_error_log': '错误记录',
|
||||
'test_log_details': '日志详情',
|
||||
'test_details': '测试详情',
|
||||
'test_duration': '持续时间:{0} 分钟 {1} 秒',
|
||||
'test_start_time': '开始时间',
|
||||
'test_end_time': '结束时间',
|
||||
'test_stop_now': '立即停止',
|
||||
'test_execute_again': '再次执行',
|
||||
'export': '导出',
|
||||
'compare': '比较',
|
||||
'generation_error': '报告生成错误,无法查看!',
|
||||
'being_generated': '报告正在生成中...',
|
||||
},
|
||||
load_test: {
|
||||
'recent': '最近的测试',
|
||||
|
@ -173,6 +182,7 @@ export default {
|
|||
'create': '创建测试',
|
||||
'select_resource_pool': '请选择资源池',
|
||||
'resource_pool_is_null': '资源池为空',
|
||||
|
||||
},
|
||||
api_test: {
|
||||
save_and_run: "保存并执行",
|
||||
|
|
Loading…
Reference in New Issue