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
Plain Diff
Browse Files
Authored by
张凯
2 years ago
Commit
2d7a04a8e87c7b4a2ef951d7a0ef8eb5111b2cf9
2 parents
f6e163e5
2a5f8099
Merge branch 'master-mj' of
http://113.200.75.45:82/monitor_v3/hg-monitor-web
into master-mj-joke
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
346 additions
and
111 deletions
hg-monitor-web-base/src/main/resources/static/src/controller/common.js
hg-monitor-web-base/src/main/resources/static/src/controller/commonDetail.js
hg-monitor-web-base/src/main/resources/static/src/controller/dh_info_sx.js
hg-monitor-web-base/src/main/resources/static/src/controller/line.js
hg-monitor-web-base/src/main/resources/static/src/controller/main-biz-card.js
hg-monitor-web-base/src/main/resources/static/src/controller/mxgraphSetting.js
hg-monitor-web-base/src/main/resources/static/src/index.js
hg-monitor-web-base/src/main/resources/static/src/views/home/bizCard.html
hg-monitor-web-base/src/main/resources/static/src/views/template/detail/dh_info_sx.html
hg-monitor-web-base/src/main/resources/static/vue3/index.html
hg-monitor-web-base/src/main/resources/static/vue3/src/views/pieDetailLine/index.js
hg-monitor-web-qh/src/main/resources/static/src/controller/common.js
hg-monitor-web-base/src/main/resources/static/src/controller/common.js
View file @
2d7a04a
...
...
@@ -928,7 +928,7 @@ layui.define(['xmSelect', 'md5'], function (exports) {
let
content
=
laytpl
(
res
.
body
).
render
(
JSON
.
stringify
(
params
));
if
(
params
.
ident
&&
params
.
ident
==
1
)
{
type
=
2
;
content
=
[
'/vue3/index.html#/vue3/pieDetailLine?'
+
urlParams
,
'no'
];
content
=
[
'/
monitor-web/
vue3/index.html#/vue3/pieDetailLine?'
+
urlParams
,
'no'
];
}
//End LSQ 2022/1/17
layer
.
open
({
...
...
hg-monitor-web-base/src/main/resources/static/src/controller/commonDetail.js
View file @
2d7a04a
...
...
@@ -2758,7 +2758,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
}
});
if
(
$
(
'.layui-show'
).
find
(
".detail-left-panel"
).
length
==
0
)
{
var
leftUrl
=
common
.
domainName
+
'/api-web/detail/findRelationGroupByResId
'
;
var
leftUrl
=
common
.
domainName
+
'/api-web/detail/findRelationGroupByResId
?&accessToken='
+
common
.
getMjToken
()
;
admin
.
req
({
url
:
leftUrl
,
data
:
{
resId
:
resId
},
...
...
hg-monitor-web-base/src/main/resources/static/src/controller/dh_info_sx.js
0 → 100644
View file @
2d7a04a
/**
* @desc 动环
* @author joke
* @date 2021/5/20 23:11
**/
layui
.
define
([
'tree'
,
'laypage'
,
'laytpl'
,
'admin'
,
'form'
,
'table'
,
'commonCols'
,
'echarts'
,
'sessions'
,
"commonDetail"
,
'tableTree'
,
'soulTable'
,
'mxClient'
],
function
(
exports
)
{
var
$
=
layui
.
$
;
var
laytpl
=
layui
.
laytpl
;
var
tree
=
layui
.
tree
;
var
form
=
layui
.
form
;
var
view
=
layui
.
view
;
var
table
=
layui
.
table
;
var
admin
=
layui
.
admin
;
var
commonCols
=
layui
.
commonCols
;
var
soulTable
=
layui
.
soulTable
;
var
tableTree
=
layui
.
tableTree
;
var
common
=
layui
.
common
;
var
commonDetail
=
layui
.
commonDetail
;
var
mxClient
=
layui
.
mxClient
;
var
busId
=
''
;
//当前业务Id
var
appId
=
''
;
var
curTreeNode
=
''
;
var
curDhResType
=
''
;
//当前动环所在的资源类型
var
currRoomId
=
''
;
//对外暴露的接口
exports
(
'dh_info_sx'
,
function
(
data
)
{
var
sessions
=
layui
.
sessions
;
var
accessToken
=
sessions
.
getToken
().
access_token
;
var
resId
=
''
;
var
showFlag
=
common
.
getUrlParam
(
"show"
);
if
(
showFlag
&&
showFlag
==
'0'
)
{
resId
=
common
.
getUrlParam
(
"resId"
);
}
else
{
resId
=
data
.
resId
;
}
getResMap
(
resId
);
renderActiveAlarms
(
"dh_info_alarms"
,
resId
);
function
getResMap
(
resId
)
{
$
(
'#dh_info_baseinfo'
).
html
(
''
)
admin
.
req
({
url
:
common
.
domainName
+
'/api-web/home/dhInfo_sx/getCollResultByResId?resId='
+
resId
,
type
:
'GET'
}).
done
(
function
(
res
)
{
$
(
'#dh_InfoContent .lastCollTime'
).
html
(
res
.
str
);
var
propertys
=
res
.
data
;
var
dataArr
=
common
.
splieceGroup
(
propertys
,
3
);
var
li
=
""
;
//先遍历分组后的,在遍历组内的数组
$
.
each
(
dataArr
,
function
(
i
,
v
)
{
var
span
=
''
;
$
.
each
(
v
,
function
(
j
,
ar
)
{
var
valueStr
=
''
;
var
valueColor
;
if
(
ar
.
value
!=
'null'
){
valueStr
=
ar
.
kpiValue
;
if
(
ar
.
kpiValue
!=
'true'
&&
ar
.
kpiValue
!=
'false'
){
if
(
ar
.
kpiValue
!=
'max'
){
if
(
parseFloat
(
ar
.
kpiValue
)
>
parseFloat
(
ar
.
max
)){
valueColor
=
'red'
;
}
}
if
(
ar
.
kpiValue
!=
'min'
){
if
(
parseFloat
(
ar
.
kpiValue
)
<
parseFloat
(
ar
.
min
)){
valueColor
=
'red'
;
}
}
}
}
span
+=
' <span style="font-weight: bold;text-align: right;padding-right: 20px">'
+
ar
.
kpiName
+
'</span>'
+
'<span title="'
+
valueStr
+
'" style="overflow: hidden;text-overflow: ellipsis;padding-left:20px;text-align:left;white-space: nowrap;color: '
+
valueColor
+
'">'
+
valueStr
+
' '
+
ar
.
unit
+
'</span>'
;
});
//补充空白区域
var
lastLength
=
v
.
length
if
(
lastLength
==
1
){
span
+=
'<span style="padding-right: 20px;"></span><span style="padding-left:20px;"></span><span style="padding-right: 20px;"></span><span style="padding-left:20px;"></span>'
}
else
if
(
lastLength
==
2
){
span
+=
'<span style="padding-right: 20px;"></span><span style="padding-left:20px;"></span>'
}
li
+=
'<li>'
+
span
+
'</li>'
$
(
'#dh_info_baseinfo'
).
html
(
li
);
});
}).
error
(
function
(
error
)
{
console
.
log
(
error
);
});
}
function
renderActiveAlarms
(
tableId
,
resId
)
{
var
alarmlist
=
table
.
render
({
elem
:
'#'
+
tableId
,
url
:
common
.
domainName
+
'/api-web/home/alarm/alarmListPage'
,
where
:
{
access_token
:
accessToken
,
resId
:
resId
}
,
height
:
'auto'
,
page
:
{
layout
:
[
'count'
,
'prev'
,
'page'
,
'next'
,
'limit'
,
'skip'
]
,
theme
:
'#1E9FFF'
}
,
limit
:
5
,
even
:
true
,
cols
:
[[
{
field
:
'LAY_INDEX'
,
title
:
'序号'
,
align
:
'center'
,
width
:
100
,
templet
:
function
(
d
)
{
return
'<span>'
+
d
.
LAY_INDEX
+
'</span>'
;
}
}
,
{
field
:
'alarmLevel'
,
title
:
'告警级别'
,
align
:
'center'
,
width
:
120
,
sort
:
true
,
templet
:
function
(
d
)
{
if
(
d
.
alarmLevel
==
3
)
{
return
'<span class="layui-table-warn" style="width: 100%;">严重</span>'
;
}
else
if
(
d
.
alarmLevel
==
2
)
{
return
'<span class="layui-table-close" style="width: 100%;">重要</span>'
;
}
else
if
(
d
.
alarmLevel
==
1
)
{
return
'<span class="layui-table-normal" style="width: 100%;">一般</span>'
;
}
}
}
,
{
field
:
'alarmContent'
,
title
:
'告警内容'
,
align
:
'center'
}
,
{
field
:
'updateTime'
,
title
:
'告警时间'
,
align
:
'center'
,
width
:
'15%'
}
]],
done
:
function
()
{
$
(
'[lay-id="'
+
tableId
+
'"] [data-warn-zbmc]'
).
on
(
'click'
,
function
()
{
var
name
=
$
(
this
).
data
(
"name"
);
var
params
=
{
resId
:
$
(
this
).
data
(
"resid"
),
kpiId
:
$
(
this
).
data
(
"kpi"
),
flag
:
$
(
this
).
data
(
"flag"
),
ident
:
$
(
this
).
data
(
"ident"
),
warning
:
$
(
this
).
data
(
"warning"
),
name
:
name
};
common
.
openLineChart
(
name
,
params
);
});
}
});
}
});
});
...
...
hg-monitor-web-base/src/main/resources/static/src/controller/line.js
View file @
2d7a04a
...
...
@@ -17,6 +17,7 @@ layui.define(['element', 'admin', 'form', 'echarts', 'commonDetail'], function (
var
startTime
=
''
;
var
endTime
=
''
;
var
showTab
=
true
;
var
accessToken
=
common
.
getMjToken
();
if
(
!
data
)
{
resourceId
=
common
.
getUrlParam
(
'resId'
);
//资源ID
kpiId
=
common
.
getUrlParam
(
'kpiId'
);
//指标ID
...
...
@@ -125,7 +126,7 @@ layui.define(['element', 'admin', 'form', 'echarts', 'commonDetail'], function (
function
renderLineChart
()
{
zshiLoadIndex
=
layer
.
load
(
2
);
//加载loading
var
url
=
common
.
domainName
+
'/api-web/detail/performance/line/chart?interval='
+
interval
+
'&startTime='
+
startTime
+
'&endTime='
+
endTime
+
'&resId='
+
resourceId
+
'&kpiIds='
+
kpiId
+
'&subResId='
+
flag
;
+
startTime
+
'&endTime='
+
endTime
+
'&resId='
+
resourceId
+
'&kpiIds='
+
kpiId
+
'&subResId='
+
flag
+
'&accessToken='
+
accessToken
;
//获取性能曲线图数据
admin
.
req
({
url
:
url
...
...
hg-monitor-web-base/src/main/resources/static/src/controller/main-biz-card.js
View file @
2d7a04a
...
...
@@ -183,14 +183,29 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions
var
bizId
=
$
(
this
).
data
(
"id"
);
var
topoId
=
$
(
this
).
data
(
"topoid"
);
var
resNum
=
$
(
this
).
data
(
"resnum"
);
var
classify
=
$
(
this
).
data
(
"classify"
);
// render(topoId,bizId);
currentBizId
=
$
(
this
).
data
(
"id"
);
$
(
"#mainindex_menubox"
).
show
(
100
);
let
maxWidth
=
document
.
body
.
offsetWidth
;
if
(
maxWidth
-
e
.
pageX
<
120
){
$
(
"#mainindex_menubox"
).
css
({
'top'
:
e
.
pageY
+
'px'
,
'right'
:
'50px'
,
'left'
:
''
});
}
else
{
$
(
"#mainindex_menubox"
).
css
({
'top'
:
e
.
pageY
+
'px'
,
'right'
:
''
,
'left'
:
e
.
pageX
+
'px'
});
}
//子菜单点击事件
$
(
"#mainindex_menubox ul>li"
).
unbind
(
"click"
).
on
(
"click"
,
function
()
{
...
...
@@ -203,7 +218,12 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions
window
.
parent
.
postMessage
({
type
:
'custom-jump-menu-event'
,
message
:
{
'type'
:
"JumpToAlarmManagement"
'type'
:
"JumpToAlarmManagement"
,
params
:{
"tag"
:
"BUS"
,
"id"
:
bizId
,
classify
:
classify
}
}
},
'*'
)
}
...
...
@@ -235,7 +255,12 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions
type
:
'custom-jump-menu-event'
,
message
:
{
'path'
:
''
,
'type'
:
"JumpToListView"
'type'
:
"JumpToListView"
,
params
:{
"tag"
:
"BUS"
,
"id"
:
bizId
,
classify
:
classify
}
}
},
'*'
)
}
...
...
@@ -273,37 +298,42 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions
$
(
"#indexbizhealth [data-index-banner-item='type'] .gj-detail-info li"
).
unbind
(
'click'
).
on
(
"click"
,
function
()
{
var
level
=
$
(
this
).
data
(
"level"
);
var
_bizId
=
$
(
this
).
data
(
"bizid"
);
var
classify
=
$
(
this
).
data
(
"classify"
);
var
_resType
=
$
(
this
).
data
(
"restype"
);
var
alarmTotal
=
$
(
this
).
find
(
"b"
).
text
();
if
(
alarmTotal
===
'0'
)
{
layer
.
msg
(
'暂无该类型资源'
,
{
icon
:
0
});
return
false
;
}
if
(
level
&&
level
===
'all'
)
{
$
(
this
).
attr
(
"lay-href"
,
"/alarm/activewarning/bizId="
+
_bizId
)
}
else
{
/*var restype = '';
if (_resType) {
if (_resType == 'HOST') {
_resType = 'operatingSystem'
$(this).attr("data-restype", "operatingSystem");
}
restype = "/restype=" + _resType
}
$('[lay-id="/biz/list"]').find('.layui-tab-close').trigger('click');
$(this).attr("lay-href", "/biz/list/bizId=" + _bizId + restype);
admin.sideFlexible();*/
let
win
=
window
.
parent
;
if
(
win
)
{
window
.
parent
.
postMessage
({
window
.
top
.
postMessage
({
type
:
'custom-jump-menu-event'
,
message
:
{
'path'
:
''
,
'type'
:
"JumpToListView"
}
},
'*'
)
'type'
:
"JumpToListView"
,
params
:{
"tag"
:
"BUS"
,
"id"
:
_bizId
,
classify
:
classify
}
}
},
'*'
);
// if (level && level === 'all') {
// // $(this).attr("lay-href", "/alarm/activewarning/bizId=" + _bizId)
// } else {
// /*var restype = '';
// if (_resType) {
// if (_resType == 'HOST') {
// _resType = 'operatingSystem'
// $(this).attr("data-restype", "operatingSystem");
// }
// restype = "/restype=" + _resType
// }
// $('[lay-id="/biz/list"]').find('.layui-tab-close').trigger('click');
// $(this).attr("lay-href", "/biz/list/bizId=" + _bizId + restype);
// admin.sideFlexible();*/
// }
});
//点击告警数字,跳转至告警页面
$
(
"#indexbizhealth [data-index-banner-item='type'] .index-banner-item-tips"
).
unbind
(
'click'
).
on
(
"click"
,
function
()
{
...
...
@@ -563,7 +593,11 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions
type
:
'custom-jump-menu-event'
,
message
:
{
'path'
:
''
,
'type'
:
"JumpToAlarmManagement"
'type'
:
"JumpToAlarmManagement"
,
params
:{
"level"
:
level
,
"restype"
:
_resType
}
}
},
'*'
)
});
...
...
@@ -586,7 +620,11 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions
type
:
'custom-jump-menu-event'
,
message
:
{
'path'
:
''
,
'type'
:
"JumpToListView"
'type'
:
"JumpToListView"
,
params
:{
"tag"
:
"RES"
,
"id"
:
_resType
}
}
},
'*'
)
...
...
@@ -614,11 +652,22 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions
document.body.appendChild(alink);
alink.click();
document.body.removeChild(alink);*/
var
alarmLevelSelect
=
$
(
'#select-content-ul .select-list.listActive'
).
data
(
'val'
);
var
alarmLevelVal
=
''
;
if
(
alarmLevelSelect
!=
4
)
{
alarmLevelVal
=
alarmLevelSelect
;
}
else
{
alarmLevelVal
=
''
;
}
window
.
top
.
postMessage
({
type
:
'custom-jump-menu-event'
,
message
:
{
'path'
:
''
,
'type'
:
"JumpToAlarmManagement"
'type'
:
"JumpToAlarmManagement"
,
params
:{
"restype"
:
restype
,
"alarmLevelVal"
:
alarmLevelVal
}
}
},
'*'
)
});
...
...
hg-monitor-web-base/src/main/resources/static/src/controller/mxgraphSetting.js
View file @
2d7a04a
...
...
@@ -509,7 +509,7 @@ layui.define(['common', 'layer', 'form', 'mxClient', 'admin', 'reslist', 'reskpi
container
.
style
.
position
=
'absolute'
;
container
.
style
.
overflow
=
'hidden'
;
container
.
style
.
width
=
'100%'
;
container
.
style
.
background
=
'url("/src/lib/mxgraph/editors/images/grid.gif")'
;
container
.
style
.
background
=
'url("/
monitor-web/
src/lib/mxgraph/editors/images/grid.gif")'
;
// Workaround for Internet Explorer ignoring certain styles
if
(
mxClient
.
IS_QUIRKS
)
{
...
...
@@ -540,80 +540,80 @@ layui.define(['common', 'layer', 'form', 'mxClient', 'admin', 'reslist', 'reskpi
};
//基础图标
addVertex
(
'组卡片'
,
'/src/style/img/mxcell/default-icon-card.png'
,
120
,
160
,
'shape=swimlane;startSize=20;'
,
null
);
addVertex
(
'组'
,
'/src/style/img/mxcell/default-icon-dashed-card.png'
,
120
,
160
,
'shape=swimlane;startSize=0;dashed=1;'
,
null
);
addVertex
(
'矩形'
,
'/src/style/img/mxcell/default-icon-rounded.png'
,
100
,
40
,
'shape=rounded;strokeWidth=1;'
,
null
);
addVertex
(
'圆形'
,
'/src/style/img/mxcell/default-icon-ellipse.png'
,
64
,
64
,
'shape=ellipse'
,
null
);
addVertex
(
'菱形'
,
'/src/style/img/mxcell/default-icon-rhombus.png'
,
64
,
64
,
'shape=rhombus'
,
null
);
addVertex
(
'三角形'
,
'/src/style/img/mxcell/default-icon-triangle.png'
,
64
,
64
,
'shape=triangle'
,
null
);
addVertex
(
'圆柱形'
,
'/src/style/img/mxcell/default-icon-cylinder.png'
,
64
,
64
,
'shape=cylinder'
,
null
);
// addVertex('用户','/src/style/img/mxcell/default-icon-actor.png', 64, 64, 'shape=actor',null);
addVertex
(
'文本'
,
'/src/style/img/mxcell/default-icon-text.png'
,
100
,
50
,
'strokeColor=none;fillColor=none;'
,
"middle"
);
addVertex
(
'组卡片'
,
'/monitor-web/src/style/img/mxcell/default-icon-card.png'
,
120
,
160
,
'shape=swimlane;startSize=20;'
,
null
);
addVertex
(
'组'
,
'/monitor-web/src/style/img/mxcell/default-icon-dashed-card.png'
,
120
,
160
,
'shape=swimlane;startSize=0;dashed=1;'
,
null
);
addVertex
(
'矩形'
,
'/monitor-web/src/style/img/mxcell/default-icon-rounded.png'
,
100
,
40
,
'shape=rounded;strokeWidth=1;'
,
null
);
addVertex
(
'圆形'
,
'/monitor-web/src/style/img/mxcell/default-icon-ellipse.png'
,
64
,
64
,
'shape=ellipse'
,
null
);
addVertex
(
'菱形'
,
'/monitor-web/src/style/img/mxcell/default-icon-rhombus.png'
,
64
,
64
,
'shape=rhombus'
,
null
);
addVertex
(
'三角形'
,
'/monitor-web/src/style/img/mxcell/default-icon-triangle.png'
,
64
,
64
,
'shape=triangle'
,
null
);
addVertex
(
'圆柱形'
,
'/monitor-web/src/style/img/mxcell/default-icon-cylinder.png'
,
64
,
64
,
'shape=cylinder'
,
null
);
// addVertex('用户','/monitor-web/src/style/img/mxcell/default-icon-actor.png', 64, 64, 'shape=actor',null);
addVertex
(
'文本'
,
'/monitor-web/src/style/img/mxcell/default-icon-text.png'
,
100
,
50
,
'strokeColor=none;fillColor=none;'
,
"middle"
);
toolbar
.
addLine
();
//业务图标
// addVertex('平台','/src/style/img/mxcell/cloud_plat.png', 64, 64,
// 'shape=image;image=/src/style/img/mxcell/cloud_plat.png','CLOUD_PLAT');
addVertex
(
'阿里云'
,
'/src/style/img/mxcell/icon_ali_cloud.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_ali_cloud.png'
,
'ALI_CLOUD'
);
addVertex
(
'华为云'
,
'/src/style/img/mxcell/icon_huawei_cloud.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_huawei_cloud.png'
,
'HUAWEI_CLOUD'
);
addVertex
(
'虚拟化平台'
,
'/src/style/img/mxcell/icon_virtualization_vmware.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_virtualization_vmware.png'
,
'VIRTUALIZATION_VMWARE'
);
addVertex
(
'服务器'
,
'/src/style/img/mxcell/icon_host.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_host.png'
,
'HOST'
);
addVertex
(
'小型机'
,
'/src/style/img/mxcell/icon_host_minicomputer_server.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_host_minicomputer_server.png'
,
'HOST_MINICOMPUTER_SERVER'
);
addVertex
(
'x86物理服务器'
,
'/src/style/img/mxcell/icon_host_x86server.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_host_x86server.png'
,
'HOST_X86SERVER'
);
addVertex
(
'x86虚拟服务器'
,
'/src/style/img/mxcell/icon_host_x86virtual.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_host_x86virtual.png'
,
'HOST_X86VIRTUAL'
);
addVertex
(
'Weblogic'
,
'/src/style/img/mxcell/icon_middleware_weblogic.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_middleware_weblogic.png'
,
'MIDDLEWARE_WEBLOGIC'
);
addVertex
(
'NGINX'
,
'/src/style/img/mxcell/icon_middleware_nginx.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_middleware_nginx.png'
,
'MIDDLEWARE_NGINX'
);
addVertex
(
'KafKa'
,
'/src/style/img/mxcell/icon_middleware_kafka.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_middleware_kafka.png'
,
'MIDDLEWARE_KAFKA'
);
addVertex
(
'集群'
,
'/src/style/img/mxcell/icon_cluster.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_cluster.png'
,
'CLUSTER'
);
addVertex
(
'数据库'
,
'/src/style/img/mxcell/icon_database.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_database.png'
,
'DATABASE'
);
addVertex
(
'ORACLE数据库'
,
'/src/style/img/mxcell/icon_database_oracle.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_database_oracle.png'
,
'DATABASE_ORACLE'
);
addVertex
(
'MySQL数据库'
,
'/src/style/img/mxcell/icon_database_mysql.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_database_mysql.png'
,
'DATABASE_MYSQL'
);
addVertex
(
'Redis'
,
'/src/style/img/mxcell/icon_database_redis.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_database_redis.png'
,
'DATABASE_REDIS'
);
addVertex
(
'华为云防火墙'
,
'/src/style/img/mxcell/icon_huawei_cloud_firewall.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_huawei_cloud_firewall.png'
,
'HUAWEI_CLOUD_FIREWALL'
);
addVertex
(
'防火墙'
,
'/src/style/img/mxcell/icon_netsafe_firewall.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_netsafe_firewall.png'
,
'NETSAFE_FIREWALL'
);
addVertex
(
'路由器'
,
'/src/style/img/mxcell/icon_nethardware_router.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_nethardware_router.png'
,
'NETHARDWARE_ROUTER'
);
addVertex
(
'交换机'
,
'/src/style/img/mxcell/icon_nethardware_switchboard.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_nethardware_switchboard.png'
,
'NETHARDWARE_SWITCHBOARD'
);
addVertex
(
'华为云交换机'
,
'/src/style/img/mxcell/icon_huawei_cloud_switchboard.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_huawei_cloud_switchboard.png'
,
'HUAWEI_CLOUD_SWITCHBOARD'
);
addVertex
(
'SAN交换机'
,
'/src/style/img/mxcell/icon_nethardware_san_switchboard.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_nethardware_san_switchboard.png'
,
'NETHARDWARE_SAN_SWITCHBOARD'
);
addVertex
(
'DNS'
,
'/src/style/img/mxcell/icon_nethardware_dns.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_nethardware_dns.png'
,
'NETHARDWARE_DNS'
);
addVertex
(
'网关'
,
'/src/style/img/mxcell/icon_nethardware_gateway.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_nethardware_gateway.png'
,
'NETHARDWARE_GATEWAY'
);
addVertex
(
'ADS'
,
'/src/style/img/mxcell/icon_nethardware_ads.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_nethardware_ads.png'
,
'NETHARDWARE_ADS'
);
addVertex
(
'负载均衡'
,
'/src/style/img/mxcell/icon_nethardware_loadbalancing.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_nethardware_loadbalancing.png'
,
'NETHARDWARE_LOADBALANCING'
);
addVertex
(
'入侵检测'
,
'/src/style/img/mxcell/icon_netsafe_ipsids.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_netsafe_ipsids.png'
,
'NETSAFE_IPSIDS'
);
addVertex
(
'IPS'
,
'/src/style/img/mxcell/icon_netsafe_ips.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_netsafe_ips.png'
,
'NETSAFE_IPS'
);
addVertex
(
'IDS'
,
'/src/style/img/mxcell/icon_netsafe_ids.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_netsafe_ids.png'
,
'NETSAFE_IDS'
);
addVertex
(
'广域网'
,
'/src/style/img/mxcell/icon_cloud.png'
,
64
,
64
,
'shape=image;image=/src/style/img/mxcell/icon_cloud.png'
,
null
);
// addVertex('平台','/monitor-web/src/style/img/mxcell/cloud_plat.png', 64, 64,
// 'shape=image;image=/monitor-web/src/style/img/mxcell/cloud_plat.png','CLOUD_PLAT');
addVertex
(
'阿里云'
,
'/monitor-web/src/style/img/mxcell/icon_ali_cloud.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_ali_cloud.png'
,
'ALI_CLOUD'
);
addVertex
(
'华为云'
,
'/monitor-web/src/style/img/mxcell/icon_huawei_cloud.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_huawei_cloud.png'
,
'HUAWEI_CLOUD'
);
addVertex
(
'虚拟化平台'
,
'/monitor-web/src/style/img/mxcell/icon_virtualization_vmware.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_virtualization_vmware.png'
,
'VIRTUALIZATION_VMWARE'
);
addVertex
(
'服务器'
,
'/monitor-web/src/style/img/mxcell/icon_host.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_host.png'
,
'HOST'
);
addVertex
(
'小型机'
,
'/monitor-web/src/style/img/mxcell/icon_host_minicomputer_server.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_host_minicomputer_server.png'
,
'HOST_MINICOMPUTER_SERVER'
);
addVertex
(
'x86物理服务器'
,
'/monitor-web/src/style/img/mxcell/icon_host_x86server.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_host_x86server.png'
,
'HOST_X86SERVER'
);
addVertex
(
'x86虚拟服务器'
,
'/monitor-web/src/style/img/mxcell/icon_host_x86virtual.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_host_x86virtual.png'
,
'HOST_X86VIRTUAL'
);
addVertex
(
'Weblogic'
,
'/monitor-web/src/style/img/mxcell/icon_middleware_weblogic.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_middleware_weblogic.png'
,
'MIDDLEWARE_WEBLOGIC'
);
addVertex
(
'NGINX'
,
'/monitor-web/src/style/img/mxcell/icon_middleware_nginx.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_middleware_nginx.png'
,
'MIDDLEWARE_NGINX'
);
addVertex
(
'KafKa'
,
'/monitor-web/src/style/img/mxcell/icon_middleware_kafka.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_middleware_kafka.png'
,
'MIDDLEWARE_KAFKA'
);
addVertex
(
'集群'
,
'/monitor-web/src/style/img/mxcell/icon_cluster.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_cluster.png'
,
'CLUSTER'
);
addVertex
(
'数据库'
,
'/monitor-web/src/style/img/mxcell/icon_database.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_database.png'
,
'DATABASE'
);
addVertex
(
'ORACLE数据库'
,
'/monitor-web/src/style/img/mxcell/icon_database_oracle.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_database_oracle.png'
,
'DATABASE_ORACLE'
);
addVertex
(
'MySQL数据库'
,
'/monitor-web/src/style/img/mxcell/icon_database_mysql.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_database_mysql.png'
,
'DATABASE_MYSQL'
);
addVertex
(
'Redis'
,
'/monitor-web/src/style/img/mxcell/icon_database_redis.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_database_redis.png'
,
'DATABASE_REDIS'
);
addVertex
(
'华为云防火墙'
,
'/monitor-web/src/style/img/mxcell/icon_huawei_cloud_firewall.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_huawei_cloud_firewall.png'
,
'HUAWEI_CLOUD_FIREWALL'
);
addVertex
(
'防火墙'
,
'/monitor-web/src/style/img/mxcell/icon_netsafe_firewall.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_netsafe_firewall.png'
,
'NETSAFE_FIREWALL'
);
addVertex
(
'路由器'
,
'/monitor-web/src/style/img/mxcell/_nethardware_router.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_nethardware_router.png'
,
'NETHARDWARE_ROUTER'
);
addVertex
(
'交换机'
,
'/monitor-web/src/style/img/mxcell/icon_nethardware_switchboard.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_nethardware_switchboard.png'
,
'NETHARDWARE_SWITCHBOARD'
);
addVertex
(
'华为云交换机'
,
'/monitor-web/src/style/img/mxcell/icon_huawei_cloud_switchboard.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_huawei_cloud_switchboard.png'
,
'HUAWEI_CLOUD_SWITCHBOARD'
);
addVertex
(
'SAN交换机'
,
'/monitor-web/src/style/img/mxcell/icon_nethardware_san_switchboard.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_nethardware_san_switchboard.png'
,
'NETHARDWARE_SAN_SWITCHBOARD'
);
addVertex
(
'DNS'
,
'/monitor-web/src/style/img/mxcell/icon_nethardware_dns.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_nethardware_dns.png'
,
'NETHARDWARE_DNS'
);
addVertex
(
'网关'
,
'/monitor-web/src/style/img/mxcell/icon_nethardware_gateway.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_nethardware_gateway.png'
,
'NETHARDWARE_GATEWAY'
);
addVertex
(
'ADS'
,
'/monitor-web/src/style/img/mxcell/icon_nethardware_ads.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_nethardware_ads.png'
,
'NETHARDWARE_ADS'
);
addVertex
(
'负载均衡'
,
'/monitor-web/src/style/img/mxcell/icon_nethardware_loadbalancing.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_nethardware_loadbalancing.png'
,
'NETHARDWARE_LOADBALANCING'
);
addVertex
(
'入侵检测'
,
'/monitor-web/src/style/img/mxcell/icon_netsafe_ipsids.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_netsafe_ipsids.png'
,
'NETSAFE_IPSIDS'
);
addVertex
(
'IPS'
,
'/monitor-web/src/style/img/mxcell/icon_netsafe_ips.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_netsafe_ips.png'
,
'NETSAFE_IPS'
);
addVertex
(
'IDS'
,
'/monitor-web/src/style/img/mxcell/icon_netsafe_ids.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_netsafe_ids.png'
,
'NETSAFE_IDS'
);
addVertex
(
'广域网'
,
'/monitor-web/src/style/img/mxcell/icon_cloud.png'
,
64
,
64
,
'shape=image;image=/monitor-web/src/style/img/mxcell/icon_cloud.png'
,
null
);
var
button
=
mxUtils
.
button
(
'Create toolbar entry from selection'
,
function
(
evt
)
{
...
...
@@ -633,7 +633,7 @@ layui.define(['common', 'layer', 'form', 'mxClient', 'admin', 'reslist', 'reskpi
}
// Creates the image which is used as the drag icon (preview)
var
img
=
toolbar
.
addMode
(
null
,
'/src/lib/mxgraph/editors/images/outline.gif'
,
funct
);
var
img
=
toolbar
.
addMode
(
null
,
'/
monitor-web/
src/lib/mxgraph/editors/images/outline.gif'
,
funct
);
mxUtils
.
makeDraggable
(
img
,
graph
,
funct
);
}
});
...
...
hg-monitor-web-base/src/main/resources/static/src/index.js
View file @
2d7a04a
...
...
@@ -229,6 +229,9 @@ layui.extend({
if
(
href
.
indexOf
(
'?AuthKey='
)
!=
-
1
&&
href
.
indexOf
(
'&AuthVal='
)
!=
-
1
&&
pathURL
!==
'/page/forwardMj'
)
{
return
location
.
hash
=
"/page/forwardMj"
;
}
// 加载换肤
layui
.
use
(
'common'
,
()
=>
{
layui
.
common
.
loadTheme
()});
//跳转到告警页面
let
params
=
new
URLSearchParams
(
location
.
search
);
let
[
bizId
]
=
[
params
.
get
(
'bizId'
)];
...
...
hg-monitor-web-base/src/main/resources/static/src/views/home/bizCard.html
View file @
2d7a04a
...
...
@@ -348,15 +348,15 @@
<!--
<
b
>
{{
item
.
resNUm
}}
<
/b>--
>
<!--
<
div
>
资源量
<
/div>--
>
<!--
<
/li>--
>
<
li
data
-
bizid
=
"{{item.busId}}"
data
-
restype
=
"HOST"
>
<
li
data
-
bizid
=
"{{item.busId}}"
data
-
restype
=
"HOST"
data
-
classify
=
"{{item.classify}}"
>
<
b
>
{{
item
.
hostNum
}}
<
/b
>
<
div
>
操作系统
<
/div
>
<
/li
>
<
li
data
-
bizid
=
"{{item.busId}}"
data
-
restype
=
"MIDDLEWARE"
>
<
li
data
-
bizid
=
"{{item.busId}}"
data
-
restype
=
"MIDDLEWARE"
data
-
classify
=
"{{item.classify}}"
>
<
b
>
{{
item
.
middwareNum
}}
<
/b
>
<
div
>
中间件
<
/div
>
<
/li
>
<
li
data
-
bizid
=
"{{item.busId}}"
data
-
restype
=
"DATABASE"
>
<
li
data
-
bizid
=
"{{item.busId}}"
data
-
restype
=
"DATABASE"
data
-
classify
=
"{{item.classify}}"
>
<
b
>
{{
item
.
databaseNum
}}
<
/b
>
<
div
>
数据库
<
/div
>
<
/li
>
...
...
@@ -376,11 +376,7 @@
<
div
class
=
"flex-bottom"
>
<
div
style
=
"width: calc(100% - 200px);"
>
{{
#
if
(
d
.
data
[
0
]
&&
d
.
data
[
0
].
bizList
)
{
}}
<
span
class
=
"index-banner-count"
>
业务共
{{
d
.
data
[
0
].
bizList
.
length
}}
个
<
/span
>
{{
#
}
else
{
}}
<
span
class
=
"index-banner-count"
>
业务共
0
个
<
/span
>
{{
#
}
}}
<
span
class
=
"index-banner-count"
>
业务共
{{
d
.
str
}}
个
<
/span
>
<
/div
>
<
div
class
=
"div-select select-margin "
style
=
"width: 100px"
>
...
...
hg-monitor-web-base/src/main/resources/static/src/views/template/detail/dh_info_sx.html
0 → 100644
View file @
2d7a04a
<!--动环平台-->
<article
class=
"page-container"
>
<div
class=
"page-panel"
>
<div
class=
"main"
>
<div
class=
"layui-card template_detail_content"
id=
"dh_InfoContent"
>
<div
class=
"layui-card-body"
>
<div
class=
"lay-row"
>
<div
class=
"lay-row-item lay-row-item--auto-width"
>
<h5
class=
"lay-row-title"
><span
style=
"color: #666"
>
最近采集时间:
<span
class=
"lastCollTime"
style=
"color: #666"
></span></span>
</h5>
<h5
class=
"lay-row-title"
>
信息展示
</h5>
<ul
class=
"info-table"
id=
"dh_info_baseinfo"
></ul>
</div>
</div>
<div
class=
"lay-row"
>
<div
class=
"lay-row-item"
>
<h5
class=
"lay-row-title"
>
实时告警动态
</h5>
<div
id=
"dh_info_alarms"
></div>
</div>
</div>
</div>
</div>
</div>
</div>
</article>
<textarea
id=
"dh_info_param_id"
style=
"display: none;"
>
{{d}}
</textarea>
<script>
layui
.
use
(
'dh_info_sx'
,
function
(
fn
)
{
var
$
=
layui
.
$
;
var
parm
=
$
(
"#dh_info_param_id"
).
val
();
if
(
parm
.
indexOf
(
'{{d'
)
!=
-
1
)
{
fn
();
}
else
{
fn
(
JSON
.
parse
(
parm
));
}
});
</script>
...
...
hg-monitor-web-base/src/main/resources/static/vue3/index.html
View file @
2d7a04a
...
...
@@ -23,7 +23,7 @@
<script
src=
"public/lib/echarts/echarts.min.js"
></script>
<script
type=
"text/javascript"
>
let
version
=
(
new
Date
()).
getTime
();
let
basrUrl
=
'/vue3/src/'
;
let
basrUrl
=
'/
monitor-web/
vue3/src/'
;
window
.
__ver
=
'?v='
+
version
;
window
.
__basrUrl
=
basrUrl
</script>
...
...
hg-monitor-web-base/src/main/resources/static/vue3/src/views/pieDetailLine/index.js
View file @
2d7a04a
...
...
@@ -244,7 +244,7 @@ export default {
keys
.
value
=
resourceId
+
":"
+
kpiId
+
":"
+
flag
;
kpiName
.
value
=
params
.
name
;
//指标名称
let
url
=
'/api-web/detail/performance/line/chart?interval='
+
interval
.
value
+
'&startTime='
+
startTime
.
value
+
'&endTime='
+
endTime
.
value
+
'&resId='
+
resourceId
+
'&kpiIds='
+
kpiId
+
'&subResId='
+
flag
;
+
startTime
.
value
+
'&endTime='
+
endTime
.
value
+
'&resId='
+
resourceId
+
'&kpiIds='
+
kpiId
+
'&subResId='
+
flag
+
'&accessToken='
+
localStorage
.
getItem
(
"accessToken"
)
;
proxy
.
$http
.
get
(
url
,
{},
function
(
res
)
{
kpiUnit
.
value
=
res
.
data
.
kpiUnit
==
null
?
""
:
res
.
data
.
kpiUnit
;
if
(
res
.
data
&&
res
.
data
.
names
.
length
==
0
)
{
...
...
hg-monitor-web-qh/src/main/resources/static/src/controller/common.js
View file @
2d7a04a
...
...
@@ -967,7 +967,7 @@ layui.define(['xmSelect', 'md5'], function (exports) {
let
content
=
laytpl
(
res
.
body
).
render
(
JSON
.
stringify
(
params
));
if
(
params
.
ident
&&
params
.
ident
==
1
)
{
type
=
2
;
content
=
[
'/vue3/index.html#/vue3/pieDetailLine?'
+
urlParams
,
'no'
];
content
=
[
'/
monitor-web/
vue3/index.html#/vue3/pieDetailLine?'
+
urlParams
,
'no'
];
}
//End LSQ 2022/1/17
layer
.
open
({
...
...
Please
register
or
login
to post a comment