Toggle navigation
Toggle navigation
This project
Loading...
Sign in
monitor_v3
/
hg-monitor-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
zhangtianqi
3 years ago
Commit
b691cfedf4894f87826039df6c5180a2d4b7eece
1 parent
02f26d49
快照概览、快照概览优化
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
21 deletions
hg-monitor-web-base/src/main/resources/static/src/controller/snapshot_detail.js
hg-monitor-web-base/src/main/resources/static/vue3/src/views/snapshot/history/index.html
hg-monitor-web-base/src/main/resources/static/vue3/src/views/snapshot/history/index.js
hg-monitor-web-base/src/main/resources/static/vue3/src/views/snapshot/index.js
hg-monitor-web-base/src/main/resources/static/vue3/src/views/snapshotOverview/index.js
hg-monitor-web-base/src/main/resources/static/src/controller/snapshot_detail.js
View file @
b691cfe
...
...
@@ -19,14 +19,13 @@ layui.define(['commonDetail', 'common', 'sessions'], function (exports) {
resId
=
data
.
resId
;
batchNo
=
data
.
batchNo
;
}
// 删除所有的子元素
$
(
'#table_arr_body'
).
empty
();
findAllSnapshot
();
// commonDetail.bindTips();
function
findAllSnapshot
()
{
// 删除所有的子元素
$
(
'#table_arr_body'
).
empty
();
let
url
=
common
.
domainName
+
'/api-web/snapshot/info?resId='
+
resId
+
'&batchNo='
+
batchNo
+
'&access_token='
+
sessions
.
getToken
().
access_token
;
$
.
ajax
({
url
:
url
,
...
...
@@ -134,10 +133,10 @@ layui.define(['commonDetail', 'common', 'sessions'], function (exports) {
//定时任务
var
timer
=
setInterval
(
function
()
{
findAllSnapshot
()
},
commonDetail
.
timerTime
);
commonDetail
.
detailTimer
.
push
(
timer
);
// var timer = setInterval(function () {
// findAllSnapshot()
// }, commonDetail.timerTime);
// commonDetail.detailTimer.push(timer);
});
});
...
...
hg-monitor-web-base/src/main/resources/static/vue3/src/views/snapshot/history/index.html
View file @
b691cfe
...
...
@@ -29,12 +29,16 @@
<el-form-item>
<el-button
:size=
"$global.elementConfig.size.button"
type=
"primary"
@
click=
"getDataList"
>
查询
</el-button>
</el-form-item>
</div>
</div>
<div
class=
"search"
>
<div
class=
"condition ping"
>
<el-form-item>
<el-button
:size=
"$global.elementConfig.size.button"
@
click=
"deleteHistory"
>
删除
</el-button>
<el-button
type=
"danger"
:size=
"$global.elementConfig.size.button"
@
click=
"deleteHistory"
>
删除
</el-button>
</el-form-item>
</div>
</div>
<div
class=
"search-table"
>
<div
class=
"search-table"
style=
"padding: 0 10px;"
>
<cm-table-page
:columns=
"tableData.columns"
:dataList=
"tableData.dataList"
:height=
"(height - 110)"
:loading=
"false"
:pageSize=
"search.pageSize"
:showBorder=
"true"
:showIndex=
"true"
:showPage=
"true"
:showSelection=
"true"
...
...
hg-monitor-web-base/src/main/resources/static/vue3/src/views/snapshot/history/index.js
View file @
b691cfe
...
...
@@ -96,6 +96,8 @@ export default {
batchNo
:
batchNo
.
toString
()
}
deleteSnapshot
(
params
);
}
else
{
proxy
.
$global
.
showMsg
(
'请至少选择一条数据'
,
'error'
)
}
}
//删除
...
...
hg-monitor-web-base/src/main/resources/static/vue3/src/views/snapshot/index.js
View file @
b691cfe
...
...
@@ -27,7 +27,7 @@ export default {
label
:
'资源类型'
,
sortable
:
true
,
align
:
'center'
,
width
:
'
2
20'
,
width
:
'
1
20'
,
},
{
prop
:
'resName'
,
...
...
@@ -53,7 +53,7 @@ export default {
label
:
'所属业务系统'
,
sortable
:
true
,
align
:
'center'
,
width
:
'
28
0'
width
:
'
42
0'
},
{
prop
:
'nickname'
,
...
...
@@ -73,7 +73,8 @@ export default {
prop
:
'createTime'
,
label
:
'快照创建时间'
,
sortable
:
true
,
align
:
'center'
align
:
'center'
,
width
:
'200'
},
]
})
...
...
hg-monitor-web-base/src/main/resources/static/vue3/src/views/snapshotOverview/index.js
View file @
b691cfe
...
...
@@ -22,7 +22,7 @@ export default {
label
:
'资源类型'
,
sortable
:
true
,
align
:
'center'
,
width
:
'
2
20'
,
width
:
'
1
20'
,
},
{
prop
:
'resName'
,
...
...
@@ -48,7 +48,7 @@ export default {
label
:
'所属业务系统'
,
sortable
:
true
,
align
:
'center'
,
width
:
'
28
0'
width
:
'
42
0'
},
{
prop
:
'nickname'
,
...
...
@@ -68,7 +68,8 @@ export default {
prop
:
'createTime'
,
label
:
'快照创建时间'
,
sortable
:
true
,
align
:
'center'
align
:
'center'
,
width
:
'200'
},
]
})
...
...
@@ -206,8 +207,10 @@ export default {
bizCharts
=
echarts
.
init
(
bizChartsRefs
.
value
);
let
bizOption
=
{
grid
:{
top
:
"14%"
,
bottom
:
"8%"
top
:
"8%"
,
bottom
:
"4%"
,
left
:
"2%"
,
containLabel
:
true
,
},
tooltip
:
{
trigger
:
'item'
...
...
@@ -247,8 +250,10 @@ export default {
devCharts
=
echarts
.
init
(
devChartsRefs
.
value
);
let
devOption
=
{
grid
:{
top
:
"14%"
,
bottom
:
"8%"
top
:
"8%"
,
bottom
:
"4%"
,
left
:
"2%"
,
containLabel
:
true
,
},
tooltip
:
{
trigger
:
'item'
...
...
@@ -258,6 +263,23 @@ export default {
type
:
'category'
,
data
:
[],
axisTick
:
false
,
axisLabel
:
{
// x轴文本换行
formatter
:
function
(
params
,
index
)
{
if
(
params
.
length
>
10
){
var
newParamsName
=
''
// 最终拼接成的字符串
let
end1
=
Math
.
ceil
(
params
.
length
/
2
);
let
end2
=
params
.
length
-
end1
;
let
str1
=
params
.
substr
(
0
,
end1
);
let
str2
=
params
.
substr
(
end1
+
1
,
end2
);
newParamsName
=
str1
+
'\n'
+
str2
;
// console.log(params.length,params);
return
newParamsName
}
else
{
return
params
}
}
}
},
yAxis
:
{
type
:
'value'
,
...
...
@@ -288,8 +310,10 @@ export default {
snapshotCharts
=
echarts
.
init
(
snapshotChartsRefs
.
value
);
let
shapshotOption
=
{
grid
:{
top
:
"14%"
,
bottom
:
"8%"
top
:
"8%"
,
bottom
:
"8%"
,
left
:
"2%"
,
containLabel
:
true
,
},
tooltip
:
{
trigger
:
'item'
...
...
Please
register
or
login
to post a comment