Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
170b5bea
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,发现更多精彩内容 >>
提交
170b5bea
编写于
4月 25, 2021
作者:
S
shiziyuan9527
提交者:
刘瑞斌
4月 25, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(性能测试): K8S类型资源池报告不显示监控详情Tab
上级
0bd7d4aa
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
36 addition
and
2 deletion
+36
-2
backend/src/main/java/io/metersphere/performance/controller/PerformanceReportController.java
...e/performance/controller/PerformanceReportController.java
+5
-0
backend/src/main/java/io/metersphere/performance/service/ReportService.java
...ava/io/metersphere/performance/service/ReportService.java
+16
-0
frontend/src/business/components/performance/report/PerformanceReportView.vue
...s/components/performance/report/PerformanceReportView.vue
+12
-2
frontend/src/i18n/en-US.js
frontend/src/i18n/en-US.js
+1
-0
frontend/src/i18n/zh-CN.js
frontend/src/i18n/zh-CN.js
+1
-0
frontend/src/i18n/zh-TW.js
frontend/src/i18n/zh-TW.js
+1
-0
未找到文件。
backend/src/main/java/io/metersphere/performance/controller/PerformanceReportController.java
浏览文件 @
170b5bea
...
...
@@ -111,6 +111,11 @@ public class PerformanceReportController {
return
reportService
.
getLoadTestReport
(
reportId
);
}
@GetMapping
(
"/pool/type/{reportId}"
)
public
String
getPoolTypeByReportId
(
@PathVariable
String
reportId
)
{
return
reportService
.
getPoolTypeByReportId
(
reportId
);
}
@GetMapping
(
"log/resource/{reportId}"
)
public
List
<
LogDetailDTO
>
getResourceIds
(
@PathVariable
String
reportId
)
{
return
reportService
.
getReportLogResource
(
reportId
);
...
...
backend/src/main/java/io/metersphere/performance/service/ReportService.java
浏览文件 @
170b5bea
...
...
@@ -59,6 +59,8 @@ public class ReportService {
private
FileService
fileService
;
@Resource
private
SqlSessionFactory
sqlSessionFactory
;
@Resource
private
TestResourcePoolMapper
testResourcePoolMapper
;
public
List
<
ReportDTO
>
getRecentReportList
(
ReportRequest
request
)
{
List
<
OrderRequest
>
orders
=
new
ArrayList
<>();
...
...
@@ -315,4 +317,18 @@ public class ReportService {
}
}
}
public
String
getPoolTypeByReportId
(
String
reportId
)
{
LoadTestReportWithBLOBs
report
=
getReport
(
reportId
);
String
testId
=
report
.
getTestId
();
LoadTestWithBLOBs
test
=
loadTestMapper
.
selectByPrimaryKey
(
testId
);
if
(
test
!=
null
)
{
String
poolId
=
test
.
getTestResourcePoolId
();
TestResourcePool
testResourcePool
=
testResourcePoolMapper
.
selectByPrimaryKey
(
poolId
);
if
(
testResourcePool
!=
null
)
{
return
testResourcePool
.
getType
();
}
}
return
""
;
}
}
frontend/src/business/components/performance/report/PerformanceReportView.vue
浏览文件 @
170b5bea
...
...
@@ -81,7 +81,7 @@
<el-tab-pane
:label=
"$t('report.test_log_details')"
>
<ms-report-log-details
:report=
"report"
/>
</el-tab-pane>
<el-tab-pane
label=
"监控详情
"
>
<el-tab-pane
:label=
"$t('report.test_monitor_details')"
v-if=
"poolType === 'NODE'
"
>
<monitor-card
:report=
"report"
/>
</el-tab-pane>
</el-tabs>
...
...
@@ -169,7 +169,8 @@ export default {
{
value
:
'
30
'
,
label
:
'
30s
'
},
{
value
:
'
60
'
,
label
:
'
1m
'
},
{
value
:
'
300
'
,
label
:
'
5m
'
}
]
],
poolType
:
""
};
},
methods
:
{
...
...
@@ -379,6 +380,14 @@ export default {
}
}
localStorage
.
setItem
(
"
reportRefreshTime
"
,
this
.
refreshTime
);
},
getPoolType
(
reportId
)
{
this
.
$get
(
"
/performance/report/pool/type/
"
+
reportId
,
result
=>
{
let
data
=
result
.
data
;
if
(
data
)
{
this
.
poolType
=
data
;
}
})
}
},
created
()
{
...
...
@@ -388,6 +397,7 @@ export default {
}
this
.
reportId
=
this
.
$route
.
path
.
split
(
'
/
'
)[
4
];
this
.
getReport
(
this
.
reportId
);
this
.
getPoolType
(
this
.
reportId
);
},
watch
:
{
'
$route
'
(
to
)
{
...
...
frontend/src/i18n/en-US.js
浏览文件 @
170b5bea
...
...
@@ -441,6 +441,7 @@ export default {
test_request_statistics
:
'
Test Request Statistics
'
,
test_error_log
:
'
Test Error Log
'
,
test_log_details
:
'
Test Log Details
'
,
test_monitor_details
:
'
Test Monitor Details
'
,
test_details
:
'
Test Details
'
,
test_duration
:
'
Current Execution Time:{0} minutes {1} seconds
'
,
test_start_time
:
'
Start Execution Time
'
,
...
...
frontend/src/i18n/zh-CN.js
浏览文件 @
170b5bea
...
...
@@ -448,6 +448,7 @@ export default {
test_request_statistics
:
'
请求统计
'
,
test_error_log
:
'
错误记录
'
,
test_log_details
:
'
日志详情
'
,
test_monitor_details
:
'
监控详情
'
,
test_details
:
'
测试详情
'
,
test_duration
:
'
当前执行时长:{0} 分钟 {1} 秒
'
,
test_start_time
:
'
开始执行时间
'
,
...
...
frontend/src/i18n/zh-TW.js
浏览文件 @
170b5bea
...
...
@@ -439,6 +439,7 @@ export default {
test_request_statistics
:
'
請求統計
'
,
test_error_log
:
'
錯誤記錄
'
,
test_log_details
:
'
日誌詳情
'
,
test_monitor_details
:
'
監控詳情
'
,
test_details
:
'
測試詳情
'
,
test_duration
:
'
當前執行時長:{0} 分鐘 {1} 秒
'
,
test_start_time
:
'
開始執行時間
'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录