Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
b409de7f
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,发现更多精彩内容 >>
提交
b409de7f
编写于
3月 05, 2020
作者:
C
Captain.B
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
图类型 demo
上级
7cd29c91
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
242 addition
and
0 deletion
+242
-0
frontend/src/performance/components/project/MsChart.vue
frontend/src/performance/components/project/MsChart.vue
+196
-0
frontend/src/performance/components/router/router.js
frontend/src/performance/components/router/router.js
+8
-0
frontend/src/performance/components/testPlan/components/PressureConfig.vue
...ormance/components/testPlan/components/PressureConfig.vue
+38
-0
未找到文件。
frontend/src/performance/components/project/MsChart.vue
0 → 100644
浏览文件 @
b409de7f
<
template
>
<chart
:options=
"bar"
></chart>
</
template
>
<
script
>
import
echarts
from
'
echarts
'
export
default
{
name
:
"
MsChart
"
,
data
()
{
return
{
bar
:
{
backgroundColor
:
'
#394056
'
,
title
:
{
top
:
20
,
text
:
'
Requests
'
,
textStyle
:
{
fontWeight
:
'
normal
'
,
fontSize
:
16
,
color
:
'
#F1F1F3
'
},
left
:
'
1%
'
},
tooltip
:
{
trigger
:
'
axis
'
,
axisPointer
:
{
lineStyle
:
{
color
:
'
#57617B
'
}
}
},
legend
:
{
top
:
20
,
icon
:
'
rect
'
,
itemWidth
:
14
,
itemHeight
:
5
,
itemGap
:
13
,
data
:
[
'
CMCC
'
,
'
CTCC
'
,
'
CUCC
'
],
right
:
'
4%
'
,
textStyle
:
{
fontSize
:
12
,
color
:
'
#F1F1F3
'
}
},
grid
:
{
top
:
100
,
left
:
'
2%
'
,
right
:
'
2%
'
,
bottom
:
'
2%
'
,
containLabel
:
true
},
xAxis
:
[{
type
:
'
category
'
,
boundaryGap
:
false
,
axisLine
:
{
lineStyle
:
{
color
:
'
#57617B
'
}
},
data
:
[
'
13:00
'
,
'
13:05
'
,
'
13:10
'
,
'
13:15
'
,
'
13:20
'
,
'
13:25
'
,
'
13:30
'
,
'
13:35
'
,
'
13:40
'
,
'
13:45
'
,
'
13:50
'
,
'
13:55
'
]
}],
yAxis
:
[{
type
:
'
value
'
,
name
:
'
(%)
'
,
axisTick
:
{
show
:
false
},
axisLine
:
{
lineStyle
:
{
color
:
'
#57617B
'
}
},
axisLabel
:
{
margin
:
10
,
textStyle
:
{
fontSize
:
14
}
},
splitLine
:
{
lineStyle
:
{
color
:
'
#57617B
'
}
}
}],
series
:
[{
name
:
'
CMCC
'
,
type
:
'
line
'
,
smooth
:
true
,
symbol
:
'
circle
'
,
symbolSize
:
5
,
showSymbol
:
false
,
lineStyle
:
{
normal
:
{
width
:
1
}
},
areaStyle
:
{
normal
:
{
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[{
offset
:
0
,
color
:
'
rgba(137, 189, 27, 0.3)
'
},
{
offset
:
0.8
,
color
:
'
rgba(137, 189, 27, 0)
'
}],
false
),
shadowColor
:
'
rgba(0, 0, 0, 0.1)
'
,
shadowBlur
:
10
}
},
itemStyle
:
{
normal
:
{
color
:
'
rgb(137,189,27)
'
,
borderColor
:
'
rgba(137,189,2,0.27)
'
,
borderWidth
:
12
}
},
data
:
[
220
,
182
,
191
,
134
,
150
,
120
,
110
,
125
,
145
,
122
,
165
,
122
]
},
{
name
:
'
CTCC
'
,
type
:
'
line
'
,
smooth
:
true
,
symbol
:
'
circle
'
,
symbolSize
:
5
,
showSymbol
:
false
,
lineStyle
:
{
normal
:
{
width
:
1
}
},
areaStyle
:
{
normal
:
{
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[{
offset
:
0
,
color
:
'
rgba(0, 136, 212, 0.3)
'
},
{
offset
:
0.8
,
color
:
'
rgba(0, 136, 212, 0)
'
}],
false
),
shadowColor
:
'
rgba(0, 0, 0, 0.1)
'
,
shadowBlur
:
10
}
},
itemStyle
:
{
normal
:
{
color
:
'
rgb(0,136,212)
'
,
borderColor
:
'
rgba(0,136,212,0.2)
'
,
borderWidth
:
12
}
},
data
:
[
120
,
110
,
125
,
145
,
122
,
165
,
122
,
220
,
182
,
191
,
134
,
150
]
},
{
name
:
'
CUCC
'
,
type
:
'
line
'
,
smooth
:
true
,
symbol
:
'
circle
'
,
symbolSize
:
5
,
showSymbol
:
false
,
lineStyle
:
{
normal
:
{
width
:
1
}
},
areaStyle
:
{
normal
:
{
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[{
offset
:
0
,
color
:
'
rgba(219, 50, 51, 0.3)
'
},
{
offset
:
0.8
,
color
:
'
rgba(219, 50, 51, 0)
'
}],
false
),
shadowColor
:
'
rgba(0, 0, 0, 0.1)
'
,
shadowBlur
:
10
}
},
itemStyle
:
{
normal
:
{
color
:
'
rgb(219,50,51)
'
,
borderColor
:
'
rgba(219,50,51,0.2)
'
,
borderWidth
:
12
}
},
data
:
[
220
,
182
,
125
,
145
,
122
,
191
,
134
,
150
,
120
,
110
,
165
,
122
]
}]
},
}
}
}
</
script
>
<
style
scoped
>
</
style
>
frontend/src/performance/components/router/router.js
浏览文件 @
b409de7f
...
...
@@ -13,6 +13,7 @@ import MsProject from "../project/MsProject";
import
OrganizationWorkspace
from
"
../settings/organization/OrganizationWorkspace
"
;
import
PersonSetting
from
"
../settings/personal/PersonSetting
"
;
import
SystemWorkspace
from
"
../settings/system/SystemWorkspace
"
;
import
MsChart
from
"
../project/MsChart
"
;
Vue
.
use
(
VueRouter
);
...
...
@@ -99,6 +100,13 @@ const router = new VueRouter({
components
:
{
content
:
MsProject
}
},
{
path
:
"
/chart
"
,
name
:
'
chart
'
,
components
:
{
content
:
MsChart
}
}
]
});
...
...
frontend/src/performance/components/testPlan/components/PressureConfig.vue
浏览文件 @
b409de7f
...
...
@@ -83,6 +83,8 @@
</
template
>
<
script
>
import
echarts
from
"
echarts
"
;
const
TARGET_LEVEL
=
"
TargetLevel
"
;
const
RAMP_UP
=
"
RampUp
"
;
const
STEPS
=
"
Steps
"
;
...
...
@@ -170,11 +172,47 @@
yAxis
:
{
type
:
'
value
'
},
tooltip
:
{
trigger
:
'
axis
'
,
axisPointer
:
{
lineStyle
:
{
color
:
'
#57617B
'
}
}
},
series
:
[{
data
:
[],
type
:
'
line
'
,
step
:
'
start
'
,
smooth
:
false
,
symbol
:
'
circle
'
,
symbolSize
:
5
,
showSymbol
:
false
,
lineStyle
:
{
normal
:
{
width
:
1
}
},
areaStyle
:
{
normal
:
{
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[{
offset
:
0
,
color
:
'
rgba(137, 189, 27, 0.3)
'
},
{
offset
:
0.8
,
color
:
'
rgba(137, 189, 27, 0)
'
}],
false
),
shadowColor
:
'
rgba(0, 0, 0, 0.1)
'
,
shadowBlur
:
10
}
},
itemStyle
:
{
normal
:
{
color
:
'
rgb(137,189,27)
'
,
borderColor
:
'
rgba(137,189,2,0.27)
'
,
borderWidth
:
12
}
},
}]
};
let
timePeriod
=
Math
.
ceil
(
this
.
rampUpTime
/
this
.
step
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录