Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
9cc2a9d9
M
metersphere
项目概览
MeterSphere
/
metersphere
上一次同步 3 年多
通知
25
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
metersphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9cc2a9d9
编写于
4月 22, 2020
作者:
C
Captain.B
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
显示运行测试的log
上级
ad26dc0c
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
46 addition
and
18 deletion
+46
-18
frontend/src/business/components/performance/report/PerformanceReportView.vue
...s/components/performance/report/PerformanceReportView.vue
+46
-18
未找到文件。
frontend/src/business/components/performance/report/PerformanceReportView.vue
浏览文件 @
9cc2a9d9
...
...
@@ -49,6 +49,13 @@
</el-tabs>
</el-card>
<el-dialog
:title=
"title"
:visible.sync=
"showTestLogging"
>
<el-tabs
type=
"border-card"
:stretch=
"true"
>
<el-tab-pane
v-for=
"(item, key) in testLogging"
:key=
"key"
:label=
"key"
class=
"logging-content"
>
{{
item
}}
</el-tab-pane>
</el-tabs>
</el-dialog>
</div>
</div>
</
template
>
...
...
@@ -79,15 +86,18 @@
startTime
:
'
0
'
,
endTime
:
'
0
'
,
minutes
:
'
0
'
,
seconds
:
'
0
'
seconds
:
'
0
'
,
title
:
'
Logging
'
,
testLogging
:
null
,
showTestLogging
:
false
,
}
},
methods
:
{
initBreadcrumb
()
{
if
(
this
.
reportId
)
{
if
(
this
.
reportId
)
{
this
.
result
=
this
.
$get
(
"
/performance/report/test/pro/info/
"
+
this
.
reportId
,
res
=>
{
let
data
=
res
.
data
;
if
(
data
)
{
if
(
data
)
{
this
.
reportName
=
data
.
name
;
this
.
testName
=
data
.
testName
;
this
.
projectName
=
data
.
projectName
;
...
...
@@ -96,10 +106,10 @@
}
},
initReportTimeInfo
()
{
if
(
this
.
reportId
)
{
if
(
this
.
reportId
)
{
this
.
result
=
this
.
$get
(
"
/performance/report/content/report_time/
"
+
this
.
reportId
,
res
=>
{
let
data
=
res
.
data
;
if
(
data
)
{
if
(
data
)
{
this
.
startTime
=
data
.
startTime
;
this
.
endTime
=
data
.
endTime
;
let
duration
=
data
.
duration
;
...
...
@@ -108,6 +118,11 @@
}
})
}
},
getLog
(
testId
)
{
this
.
$get
(
'
/performance/log/
'
+
testId
,
response
=>
{
this
.
testLogging
=
response
.
data
;
})
}
},
mounted
()
{
...
...
@@ -115,16 +130,25 @@
this
.
$get
(
"
/performance/report/
"
+
this
.
reportId
,
res
=>
{
let
data
=
res
.
data
;
this
.
status
=
data
.
status
;
if
(
data
.
status
===
"
Error
"
)
{
switch
(
data
.
status
)
{
case
'
Error
'
:
this
.
$message
({
type
:
'
warning
'
,
message
:
"
报告生成错误,无法查看!
"
});
}
else
if
(
data
.
status
===
"
Starting
"
)
{
break
;
case
'
Starting
'
:
this
.
$message
({
type
:
'
info
'
,
message
:
"
报告生成中....
"
});
break
;
case
'
Running
'
:
this
.
showTestLogging
=
true
;
this
.
getLog
(
data
.
testId
);
break
;
default
:
break
;
}
})
this
.
initBreadcrumb
();
...
...
@@ -133,10 +157,10 @@
watch
:
{
'
$route
'
(
to
)
{
let
reportId
=
to
.
path
.
split
(
'
/
'
)[
4
];
if
(
reportId
)
{
if
(
reportId
)
{
this
.
$get
(
"
/performance/report/test/pro/info/
"
+
reportId
,
response
=>
{
let
data
=
response
.
data
;
if
(
data
)
{
if
(
data
)
{
this
.
reportName
=
data
.
name
;
this
.
testName
=
data
.
testName
;
this
.
projectName
=
data
.
projectName
;
...
...
@@ -144,7 +168,7 @@
});
this
.
result
=
this
.
$get
(
"
/performance/report/content/report_time/
"
+
this
.
reportId
,
res
=>
{
let
data
=
res
.
data
;
if
(
data
)
{
if
(
data
)
{
this
.
startTime
=
data
.
startTime
;
this
.
endTime
=
data
.
endTime
;
let
duration
=
data
.
duration
;
...
...
@@ -170,4 +194,8 @@
display
:
block
;
color
:
#5C7878
;
}
.logging-content
{
white-space
:
pre-line
;
}
</
style
>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录