Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
37f41a85
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,发现更多精彩内容 >>
提交
37f41a85
编写于
4月 09, 2020
作者:
C
Captain.B
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改 url 和组件
上级
6485f7f5
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
60 addition
and
170 deletion
+60
-170
backend/src/main/java/io/metersphere/controller/PerformanceReportController.java
...o/metersphere/controller/PerformanceReportController.java
+2
-2
frontend/src/business/components/performance/head/PerformanceHeaderMenus.vue
...ss/components/performance/head/PerformanceHeaderMenus.vue
+47
-29
frontend/src/business/components/performance/project/PerformanceRecentProject.vue
...mponents/performance/project/PerformanceRecentProject.vue
+0
-44
frontend/src/business/components/performance/report/PerformanceRecentReport.vue
...components/performance/report/PerformanceRecentReport.vue
+0
-42
frontend/src/business/components/performance/report/PerformanceReportView.vue
...s/components/performance/report/PerformanceReportView.vue
+3
-3
frontend/src/business/components/performance/report/PerformanceTestReport.vue
...s/components/performance/report/PerformanceTestReport.vue
+2
-2
frontend/src/business/components/performance/report/components/ErrorLog.vue
...ess/components/performance/report/components/ErrorLog.vue
+2
-2
frontend/src/business/components/performance/report/components/RequestStatistics.vue
...nents/performance/report/components/RequestStatistics.vue
+1
-1
frontend/src/business/components/performance/report/components/TestOverview.vue
...components/performance/report/components/TestOverview.vue
+3
-3
frontend/src/business/components/performance/test/PerformanceRecentTestPlan.vue
...components/performance/test/PerformanceRecentTestPlan.vue
+0
-42
未找到文件。
backend/src/main/java/io/metersphere/controller/ReportController.java
→
backend/src/main/java/io/metersphere/controller/
Performance
ReportController.java
浏览文件 @
37f41a85
...
...
@@ -23,8 +23,8 @@ import javax.annotation.Resource;
import
java.util.List
;
@RestController
@RequestMapping
(
value
=
"report"
)
public
class
ReportController
{
@RequestMapping
(
value
=
"
performance/
report"
)
public
class
Performance
ReportController
{
@Resource
private
ReportService
reportService
;
...
...
frontend/src/business/components/performance/head/PerformanceHeaderMenus.vue
浏览文件 @
37f41a85
...
...
@@ -3,8 +3,7 @@
<div
id=
"menu-bar"
v-if=
"isRouterAlive"
>
<el-row
type=
"flex"
>
<el-col
:span=
"8"
>
<el-menu
class=
"header-menu"
:unique-opened=
"true"
mode=
"horizontal"
router
:default-active=
'$route.path'
>
<el-menu
class=
"header-menu"
:unique-opened=
"true"
mode=
"horizontal"
router
:default-active=
'$route.path'
>
<el-menu-item
:index=
"'/performance/home'"
>
{{
$t
(
"
i18n.home
"
)
}}
</el-menu-item>
...
...
@@ -12,29 +11,19 @@
<el-submenu
v-if=
"isCurrentWorkspaceUser"
index=
"3"
popper-class=
"submenu"
v-permission=
"['test_manager']"
>
<template
v-slot:title
>
{{
$t
(
'
commons.project
'
)
}}
</
template
>
<
performance-recent-project
/>
<
ms-recent-list
:options=
"projectRecent"
/>
<el-divider/>
<el-menu-item
:index=
"'/performance/project/all'"
>
<font-awesome-icon
:icon=
"['fa', 'list-ul']"
/>
<span
style=
"padding-left: 5px;"
>
{{$t('commons.show_all')}}
</span>
</el-menu-item>
<el-menu-item
:index=
"'/performance/project/create'"
>
<el-button
type=
"text"
>
{{$t('project.create')}}
</el-button>
</el-menu-item>
<ms-show-all
:index=
"'/performance/project/all'"
/>
<ms-create-button
:index=
"'/performance/project/create'"
:title=
"$t('project.create')"
/>
</el-submenu>
<el-submenu
v-if=
"isCurrentWorkspaceUser"
index=
"4"
popper-class=
"submenu"
v-permission=
"['test_manager', 'test_user']"
>
<
template
v-slot:title
>
{{
$t
(
'
commons.test
'
)
}}
</
template
>
<
performance-recent-test-plan
/>
<
ms-recent-list
:options=
"testRecent"
/>
<el-divider/>
<el-menu-item
:index=
"'/performance/test/all'"
>
<font-awesome-icon
:icon=
"['fa', 'list-ul']"
/>
<span
style=
"padding-left: 5px;"
>
{{$t('commons.show_all')}}
</span>
</el-menu-item>
<el-menu-item
:index=
"'/performance/test/create'"
>
<el-button
type=
"text"
>
{{$t('load_test.create')}}
</el-button>
</el-menu-item>
<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-submenu>
...
...
@@ -42,13 +31,9 @@
<el-submenu
v-if=
"isCurrentWorkspaceUser"
index=
"5"
popper-class=
"submenu"
v-permission=
"['test_manager', 'test_user', 'test_viewer']"
>
<
template
v-slot:title
>
{{
$t
(
'
commons.report
'
)
}}
</
template
>
<
performance-recent-report
/>
<
ms-recent-list
:options=
"reportRecent"
/>
<el-divider/>
<el-menu-item
:index=
"'/performance/report/all'"
>
<font-awesome-icon
:icon=
"['fa', 'list-ul']"
/>
<span
style=
"padding-left: 5px;"
>
{{$t('commons.show_all')}}
</span>
</el-menu-item>
<el-menu-item
:index=
"reportViewPath"
class=
"blank_item"
></el-menu-item>
<ms-show-all
:index=
"'/performance/report/all'"
/>
</el-submenu>
</el-menu>
</el-col>
...
...
@@ -65,22 +50,55 @@
<
script
>
import
PerformanceRecentTestPlan
from
"
../../performance/test/PerformanceRecentTestPlan
"
;
import
PerformanceRecentProject
from
"
../../performance/project/PerformanceRecentProject
"
;
import
PerformanceRecentReport
from
"
../../performance/report/PerformanceRecentReport
"
;
import
{
checkoutCurrentWorkspace
}
from
"
../../../../common/js/utils
"
;
import
MsCreateTest
from
"
../../common/head/CreateTest
"
;
import
MsRecentList
from
"
../../common/head/RecentList
"
;
import
MsCreateButton
from
"
../../common/head/CreateButton
"
;
import
MsShowAll
from
"
../../common/head/ShowAll
"
;
export
default
{
name
:
"
PerformanceHeaderMenus
"
,
components
:
{
PerformanceRecentReport
,
PerformanceRecentTestPlan
,
PerformanceRecentProject
,
MsCreateTest
},
components
:
{
MsCreateButton
,
MsShowAll
,
MsRecentList
,
MsCreateTest
},
data
()
{
return
{
isCurrentWorkspaceUser
:
false
,
testCaseProjectPath
:
''
,
testEditPath
:
''
,
reportViewPath
:
''
,
isRouterAlive
:
true
isRouterAlive
:
true
,
projectRecent
:
{
title
:
this
.
$t
(
'
project.recent
'
),
url
:
"
/project/recent/5
"
,
index
(
item
)
{
return
'
/performance/test/
'
+
item
.
id
;
},
router
(
item
)
{
return
{
name
:
'
perPlan
'
,
params
:
{
projectId
:
item
.
id
,
projectName
:
item
.
name
}}
}
},
testRecent
:
{
title
:
this
.
$t
(
'
load_test.recent
'
),
url
:
"
/performance/recent/5
"
,
index
(
item
)
{
return
'
/performance/test/edit/
'
+
item
.
id
;
},
router
(
item
)
{
}
},
reportRecent
:
{
title
:
this
.
$t
(
'
report.recent
'
),
url
:
"
/performance/report/recent/5
"
,
index
(
item
)
{
return
'
/performance/report/view/
'
+
item
.
id
;
},
router
(
item
)
{
}
}
}
},
mounted
()
{
...
...
frontend/src/business/components/performance/project/PerformanceRecentProject.vue
已删除
100644 → 0
浏览文件 @
6485f7f5
<
template
>
<el-menu
router
menu-trigger=
"click"
:default-active=
"$route.path"
>
<div
class=
"recent-text"
>
<i
class=
"el-icon-time"
/>
{{
$t
(
'
project.recent
'
)
}}
</div>
<el-menu-item
:key=
"p.id"
v-for=
"p in recentProjects"
:index=
"'/performance/test/' + p.id"
:route=
"
{name:'perPlan', params:{projectId:p.id, projectName:p.name}}">
{{
p
.
name
}}
</el-menu-item>
</el-menu>
</
template
>
<
script
>
import
{
ROLE_TEST_MANAGER
,
ROLE_TEST_USER
,
ROLE_TEST_VIEWER
}
from
"
../../../../common/js/constants
"
;
import
{
hasRoles
}
from
"
../../../../common/js/utils
"
;
export
default
{
name
:
"
PerformanceRecentProject
"
,
mounted
()
{
if
(
hasRoles
(
ROLE_TEST_VIEWER
,
ROLE_TEST_USER
,
ROLE_TEST_MANAGER
))
{
this
.
$get
(
'
/project/recent/5
'
,
(
response
)
=>
{
this
.
recentProjects
=
response
.
data
;
});
}
},
methods
:
{},
data
()
{
return
{
recentProjects
:
[],
}
}
}
</
script
>
<
style
scoped
>
.recent-text
{
padding-left
:
10%
;
color
:
#777777
;
}
</
style
>
frontend/src/business/components/performance/report/PerformanceRecentReport.vue
已删除
100644 → 0
浏览文件 @
6485f7f5
<
template
>
<el-menu
router
menu-trigger=
"click"
:default-active=
"$route.path"
>
<div
class=
"recent-text"
>
<i
class=
"el-icon-time"
/>
{{
$t
(
'
load_test.recent
'
)
}}
</div>
<el-menu-item
:key=
"p.id"
v-for=
"p in recentReports"
:index=
"'/performance/report/view/' + p.id"
:route=
"
{path: '/performance/report/view/' + p.id}">
{{
p
.
name
}}
</el-menu-item>
</el-menu>
</
template
>
<
script
>
import
{
ROLE_TEST_MANAGER
,
ROLE_TEST_USER
,
ROLE_TEST_VIEWER
}
from
"
../../../../common/js/constants
"
;
import
{
hasRoles
}
from
"
../../../../common/js/utils
"
;
export
default
{
name
:
"
PerformanceRecentReport
"
,
mounted
()
{
if
(
hasRoles
(
ROLE_TEST_VIEWER
,
ROLE_TEST_USER
,
ROLE_TEST_MANAGER
))
{
this
.
$get
(
'
/report/recent/5
'
,
(
response
)
=>
{
this
.
recentReports
=
response
.
data
;
});
}
},
methods
:
{},
data
()
{
return
{
recentReports
:
[],
}
}
}
</
script
>
<
style
scoped
>
.recent-text
{
padding-left
:
10%
;
color
:
#777777
;
}
</
style
>
frontend/src/business/components/performance/report/PerformanceReportView.vue
浏览文件 @
37f41a85
...
...
@@ -81,7 +81,7 @@
methods
:
{
initBreadcrumb
()
{
if
(
this
.
reportId
){
this
.
result
=
this
.
$get
(
"
report/test/pro/info/
"
+
this
.
reportId
,
res
=>
{
this
.
result
=
this
.
$get
(
"
/performance/
report/test/pro/info/
"
+
this
.
reportId
,
res
=>
{
let
data
=
res
.
data
;
if
(
data
){
this
.
reportName
=
data
.
name
;
...
...
@@ -94,7 +94,7 @@
},
mounted
()
{
this
.
reportId
=
this
.
$route
.
path
.
split
(
'
/
'
)[
4
];
this
.
$get
(
"
report/
"
+
this
.
reportId
,
res
=>
{
this
.
$get
(
"
/performance/
report/
"
+
this
.
reportId
,
res
=>
{
let
data
=
res
.
data
;
this
.
status
=
data
.
status
;
if
(
data
.
status
===
"
Error
"
)
{
...
...
@@ -115,7 +115,7 @@
'
$route
'
(
to
)
{
let
reportId
=
to
.
path
.
split
(
'
/
'
)[
4
];
if
(
reportId
){
this
.
$get
(
"
report/test/pro/info/
"
+
reportId
,
response
=>
{
this
.
$get
(
"
/performance/
report/test/pro/info/
"
+
reportId
,
response
=>
{
let
data
=
response
.
data
;
if
(
data
){
this
.
reportName
=
data
.
name
;
...
...
frontend/src/business/components/performance/report/PerformanceTestReport.vue
浏览文件 @
37f41a85
...
...
@@ -107,8 +107,8 @@
data
()
{
return
{
result
:
{},
queryPath
:
"
/report/list/all
"
,
deletePath
:
"
/report/delete/
"
,
queryPath
:
"
/
performance/
report/list/all
"
,
deletePath
:
"
/
performance/
report/delete/
"
,
condition
:
""
,
projectId
:
null
,
tableData
:
[],
...
...
frontend/src/business/components/performance/report/components/ErrorLog.vue
浏览文件 @
37f41a85
...
...
@@ -149,10 +149,10 @@
},
methods
:
{
initTableData
()
{
this
.
$get
(
"
/report/content/errors/
"
+
this
.
id
,
res
=>
{
this
.
$get
(
"
/
performance/
report/content/errors/
"
+
this
.
id
,
res
=>
{
this
.
tableData
=
res
.
data
;
})
this
.
$get
(
"
/report/content/errors_top5/
"
+
this
.
id
,
res
=>
{
this
.
$get
(
"
/
performance/
report/content/errors_top5/
"
+
this
.
id
,
res
=>
{
this
.
errorTotal
=
res
.
data
this
.
errorTop5
=
res
.
data
.
errorsTop5List
;
})
...
...
frontend/src/business/components/performance/report/components/RequestStatistics.vue
浏览文件 @
37f41a85
...
...
@@ -97,7 +97,7 @@
},
methods
:
{
initTableData
()
{
this
.
$get
(
"
/report/content/
"
+
this
.
id
,
res
=>
{
this
.
$get
(
"
/
performance/
report/content/
"
+
this
.
id
,
res
=>
{
this
.
tableData
=
res
.
data
.
requestStatisticsList
;
this
.
totalInfo
=
res
.
data
;
})
...
...
frontend/src/business/components/performance/report/components/TestOverview.vue
浏览文件 @
37f41a85
...
...
@@ -85,7 +85,7 @@
},
methods
:
{
initTableData
()
{
this
.
$get
(
"
/report/content/testoverview/
"
+
this
.
id
,
res
=>
{
this
.
$get
(
"
/
performance/
report/content/testoverview/
"
+
this
.
id
,
res
=>
{
let
data
=
res
.
data
;
this
.
maxUsers
=
data
.
maxUsers
;
this
.
avgThroughput
=
data
.
avgThroughput
;
...
...
@@ -94,7 +94,7 @@
this
.
responseTime90
=
data
.
responseTime90
;
this
.
avgBandwidth
=
data
.
avgBandwidth
;
})
this
.
$get
(
"
/report/content/load_chart/
"
+
this
.
id
,
res
=>
{
this
.
$get
(
"
/
performance/
report/content/load_chart/
"
+
this
.
id
,
res
=>
{
let
data
=
res
.
data
;
let
loadOption
=
{
title
:
{
...
...
@@ -127,7 +127,7 @@
}
this
.
loadOption
=
this
.
generateOption
(
loadOption
,
data
);
})
this
.
$get
(
"
/report/content/res_chart/
"
+
this
.
id
,
res
=>
{
this
.
$get
(
"
/
performance/
report/content/res_chart/
"
+
this
.
id
,
res
=>
{
let
data
=
res
.
data
;
let
resOption
=
{
title
:
{
...
...
frontend/src/business/components/performance/test/PerformanceRecentTestPlan.vue
已删除
100644 → 0
浏览文件 @
6485f7f5
<
template
>
<el-menu
router
menu-trigger=
"click"
:default-active=
"$route.path"
>
<div
class=
"recent-text"
>
<i
class=
"el-icon-time"
/>
{{
$t
(
'
load_test.recent
'
)
}}
</div>
<el-menu-item
:key=
"t.id"
v-for=
"t in recentTestPlans"
:index=
"'/performance/test/edit/' + t.id"
>
{{
t
.
name
}}
</el-menu-item>
</el-menu>
</
template
>
<
script
>
import
{
ROLE_TEST_MANAGER
,
ROLE_TEST_USER
,
ROLE_TEST_VIEWER
}
from
"
../../../../common/js/constants
"
;
export
default
{
name
:
"
PerformanceRecentTestPlan
"
,
mounted
()
{
const
rolesString
=
localStorage
.
getItem
(
"
roles
"
);
const
roles
=
rolesString
.
split
(
'
,
'
);
if
(
roles
.
indexOf
(
ROLE_TEST_MANAGER
)
>
-
1
||
roles
.
indexOf
(
ROLE_TEST_USER
)
>
-
1
||
roles
.
indexOf
(
ROLE_TEST_VIEWER
)
>
-
1
)
{
this
.
$get
(
'
/performance/recent/5
'
,
(
response
)
=>
{
this
.
recentTestPlans
=
response
.
data
;
});
}
},
data
()
{
return
{
recentTestPlans
:
[]
}
}
}
</
script
>
<
style
scoped
>
.recent-text
{
padding-left
:
10%
;
color
:
#777777
;
}
</
style
>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录