Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
IT-monitor
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
IT-monitor
Commits
366bb8c3
Commit
366bb8c3
authored
May 22, 2022
by
Asjoker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 业务监控-业务列表
parent
d3910d92
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
469 additions
and
123 deletions
+469
-123
snmpTrapJournal.vue
src/views/IntegratedMonitor/logMonitor/snmpTrapJournal.vue
+4
-0
realTimeReport.vue
...ews/IntegratedMonitor/reportStatistics/realTimeReport.vue
+189
-123
businessList.vue
src/views/businessMonitoring/businessList.vue
+276
-0
No files found.
src/views/IntegratedMonitor/logMonitor/snmpTrapJournal.vue
View file @
366bb8c3
...
...
@@ -46,6 +46,7 @@
<el-button
type=
"primary"
size=
"small"
@
click=
"handleQuery"
>
查询
</el-button>
</el-form-item>
<el-button
id=
"fullScreen"
style=
"float: right;margin: 0 10px"
>
{{
isScreen
?
'退出全屏'
:
'全屏'
}}
</el-button>
<el-button
style=
"float: right;margin: 0 10px"
@
click=
"refresh"
>
刷新
</el-button>
</el-form>
<div
class=
"placeholder"
/>
<div
style=
"padding: 10px"
>
...
...
@@ -230,6 +231,9 @@ export default {
}
})
// 实现模块全屏
},
refresh
()
{
window
.
location
.
reload
()
// 刷新页面
},
/** 查询登录日志 */
getList
()
{
this
.
loading
=
true
...
...
src/views/IntegratedMonitor/reportStatistics/realTimeReport.vue
View file @
366bb8c3
<
template
>
<div
id=
"sylog-container"
class=
"app-container-realTime"
>
<el-tabs
v-model=
"currentTab"
type=
"card"
>
<el-tab-pane
label=
"实时报告"
name=
"1"
>
<div
style=
"padding: 10px 10px 10px 0"
>
<el-table
v-loading=
"loading"
border
:data=
"data"
:header-cell-style=
"
{textAlign: 'center'}"
@selection-change="handleSelectionChange"
>
<el-table-column
type=
"expand"
>
<template
slot-scope=
"props"
>
<span>
{{
props
.
row
.
path
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"监测对象"
align=
"center"
prop=
"monitorObject"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
monitorObject
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"监测点名称"
align=
"center"
prop=
"monitorName"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
monitorName
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"状态"
align=
"center"
width=
"100"
prop=
"logContent"
>
<
template
>
<span
class=
"st-square"
style=
"background-color: #3db58d;"
/>
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"CPU使用效率(%)"
width=
"250"
align=
"center"
prop=
"cpu"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
cpuRate
||
'-'
}}
</
template
>
</el-table-column>
</el-table>
</div>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.page"
:limit
.
sync=
"queryParams.rows"
@
pagination=
"getList"
/>
</el-tab-pane>
<el-tab-pane
label=
"指标统计"
name=
"2"
>
<div
style=
"padding: 10px 10px 10px 0"
>
<el-table
v-loading=
"loading"
border
:data=
"initialData"
:header-cell-style=
"{textAlign: 'center'}"
>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"指标名称"
align=
"center"
prop=
"ipAddress"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
name
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"最大值"
align=
"center"
prop=
"createTime"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
max
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"最小值"
align=
"center"
prop=
"logContent"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
min
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"平均值"
align=
"center"
prop=
"logContent"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
average
||
'-'
}}
</
template
>
</el-table-column>
</el-table>
</div>
</el-tab-pane>
</el-tabs>
<el-dialog
:visible
.
sync=
"open"
title=
"添加报告"
width=
"700px"
>
<el-form
label-width=
"100px"
>
<el-form-item
label=
"报告标题"
>
<el-input
/>
</el-form-item>
<el-form-item
label=
"每页显示报告数"
>
<el-input
/>
</el-form-item>
<el-form-item
label=
"选择设备列表"
>
<el-date-picker
v-model=
"queryParams.endTime"
type=
"datetime"
size=
"small"
value-format=
"yyyy-MM-DD HH:MM:SS"
<div
id=
"sylog-container"
class=
"realTime-container"
>
<div
class=
"warnHead"
>
<div
class=
"warnBtns"
>
<el-button
class=
"headBtn"
@
click=
"changeTime"
>
添加
</el-button>
<el-button
class=
"headBtn"
@
click=
"changeTime"
>
修改
</el-button>
<el-button
class=
"headBtn"
@
click=
"handleDelete"
>
删除
</el-button>
<el-button
class=
"headBtnW"
@
click=
"refresh"
>
刷新
</el-button>
<el-button
id=
"fullScreen"
class=
"headBtnW"
>
{{
isScreen
?
'退出全屏'
:
'全屏'
}}
</el-button>
</div>
</div>
<div
class=
"app-container-realTime"
>
<el-tabs
v-model=
"currentTab"
type=
"card"
>
<el-tab-pane
label=
"实时报告"
name=
"1"
>
<div
style=
"padding: 10px 10px 10px 0"
>
<el-table
v-loading=
"loading"
border
:data=
"data"
:header-cell-style=
"
{textAlign: 'center'}"
@selection-change="handleSelectionChange"
>
<el-table-column
type=
"expand"
>
<template
slot-scope=
"props"
>
<span>
{{
props
.
row
.
path
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"监测对象"
align=
"center"
prop=
"monitorObject"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
monitorObject
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"监测点名称"
align=
"center"
prop=
"monitorName"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
monitorName
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"状态"
align=
"center"
width=
"100"
prop=
"logContent"
>
<
template
>
<span
class=
"st-square"
style=
"background-color: #3db58d;"
/>
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"CPU使用效率(%)"
width=
"250"
align=
"center"
prop=
"cpu"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
cpuRate
||
'-'
}}
</
template
>
</el-table-column>
</el-table>
</div>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.page"
:limit
.
sync=
"queryParams.rows"
@
pagination=
"getList"
/>
</el-form-item>
</el-form>
</el-tab-pane>
<el-tab-pane
label=
"指标统计"
name=
"2"
>
<div
style=
"padding: 10px 10px 10px 0"
>
<el-table
v-loading=
"loading"
border
:data=
"initialData"
:header-cell-style=
"{textAlign: 'center'}"
>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"指标名称"
align=
"center"
prop=
"ipAddress"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
name
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"最大值"
align=
"center"
prop=
"createTime"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
max
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"最小值"
align=
"center"
prop=
"logContent"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
min
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"平均值"
align=
"center"
prop=
"logContent"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
average
||
'-'
}}
</
template
>
</el-table-column>
</el-table>
</div>
</el-tab-pane>
</el-tabs>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"open = false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"open = false"
>
确定
</el-button>
</div>
</el-dialog>
<el-dialog
:visible
.
sync=
"open"
title=
"添加报告"
width=
"700px"
>
<el-form
label-width=
"110px"
>
<el-form-item
label=
"报告标题"
>
<el-input
/>
</el-form-item>
<el-form-item
label=
"每页显示报告数"
>
<el-input
/>
</el-form-item>
<el-form-item
label=
"选择设备列表"
>
<div
class=
"equipmentDiv"
>
<el-tree
:data=
"treeData"
show-checkbox
node-key=
"id"
:default-expanded-keys=
"[2, 3]"
:default-checked-keys=
"[5]"
/>
</div>
</el-form-item>
<el-form-item
label=
"选择监测点类型"
>
<span
style=
"font-weight: bold"
>
监测点类型
</span>
<el-select
/>
<span
style=
"font-weight: bold"
>
监测指标
</span>
<el-select
placeholder=
"请选择"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"open = false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"open = false"
>
确定
</el-button>
</div>
</el-dialog>
</div>
</div>
</template>
...
...
@@ -125,7 +145,7 @@ export default {
// 表单参数
form
:
{},
// 表单参数
isScreen
:
screenfull
.
isEnabled
,
isScreen
:
false
,
// 查询参数
queryParams
:
{
page
:
1
,
...
...
@@ -262,42 +282,38 @@ export default {
}
],
treeData
:
[{
id
:
1
,
label
:
'本机容器'
,
children
:
[{
id
:
4
,
label
:
'虚拟化平台'
,
children
:
[{
label
:
'信服工业云平台'
},
{
label
:
'192.168.1.30'
id
:
9
,
label
:
'虚拟设备'
},
{
label
:
'虚拟机虚拟化硬件'
id
:
10
,
label
:
'三级 1-1-2'
}]
}]
},
{
label
:
'一级 2'
,
id
:
2
,
label
:
'服务器硬件'
,
children
:
[{
label
:
'二级 2-1'
,
children
:
[{
label
:
'三级 2-1-1'
}]
id
:
5
,
label
:
'云打印服务器'
},
{
label
:
'二级 2-2'
,
children
:
[{
label
:
'三级 2-2-1'
}]
id
:
6
,
label
:
'服务器'
}]
},
{
id
:
3
,
label
:
'一级 3'
,
children
:
[{
label
:
'二级 3-1'
,
children
:
[{
label
:
'三级 3-1-1'
}]
id
:
7
,
label
:
'二级 3-1'
},
{
label
:
'二级 3-2'
,
children
:
[{
label
:
'三级 3-2-1'
}]
id
:
8
,
label
:
'二级 3-2'
}]
}]
}
...
...
@@ -325,11 +341,29 @@ export default {
handleExpand
()
{
const
element
=
document
.
getElementById
(
'sylog-container'
)
// 指定全屏区域元素
document
.
getElementById
(
'fullScreen'
).
addEventListener
(
'click'
,
()
=>
{
if
(
screenfull
.
isEnabled
)
{
if
(
screenfull
.
isEnabled
&&
this
.
isScreen
===
false
)
{
screenfull
.
request
(
element
)
}
else
{
screenfull
.
exit
()
}
})
// 实现模块全屏
},
refresh
()
{
window
.
location
.
reload
()
// 刷新页面
},
handleDelete
()
{
const
h
=
this
.
$createElement
this
.
$confirm
(
h
(
'p'
,
null
,
[
h
(
'span'
,
null
,
'确定删除本报告吗? '
),
h
(
'br'
,
null
),
h
(
'span'
,
{
style
:
'font-size: 8px'
},
'提示:该操作无法恢复'
)
]),
''
,
{
customClass
:
'custom-confirm'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
},
/** 查询登录日志 */
getList
()
{
this
.
loading
=
true
...
...
@@ -360,9 +394,40 @@ export default {
}
</
script
>
<
style
lang=
"scss"
scoped
>
.realTime-container
{
.warnHead
{
height
:
58px
;
padding
:
15px
20px
10px
20px
;
background-color
:
#edeef3
!
important
;
border-bottom
:
1px
solid
#DBDDE3
;
.warnBtns
{
float
:
right
;
.headBtn
{
line-height
:
10px
;
color
:
#fff
;
border-color
:
#768398
;
background-color
:
#768398
;
}
.headBtnW
{
border-radius
:
4px
;
line-height
:
22px
;
font-size
:
12px
;
padding
:
0
10px
;
margin
:
0
5px
;
}
}
}
.app-container-realTime
{
padding
:
0
20px
;
font-size
:
18px
;
.equipmentDiv
{
max-height
:
200px
;
height
:
200px
;
overflow
:
auto
;
border
:
1px
solid
#d2d6de
;
padding
:
10px
0
;
border-radius
:
4px
;
}
.placeholder
{
height
:
14px
;
background-color
:
#F4F4F4
;
...
...
@@ -376,5 +441,6 @@ export default {
display
:
inline-block
;
}
}
}
</
style
>
src/views/businessMonitoring/businessList.vue
0 → 100644
View file @
366bb8c3
<
template
>
<div
id=
"sylog-container"
class=
"app-container-Sylog"
>
<!--
<div
class=
"placeholder"
/>
-->
<div
style=
"padding: 10px"
>
<div
class=
"mb12 font-small-bold"
style=
"width: 100px;display: inline-block"
>
业务列表
</div>
<el-button
id=
"fullScreen"
style=
"float: right;margin: -5px 10px 10px"
>
{{
isScreen
?
'退出全屏'
:
'全屏'
}}
</el-button>
<el-button
style=
"float: right;margin: -5px 10px 10px"
@
click=
"refresh"
>
刷新
</el-button>
<el-table
v-loading=
"loading"
border
:data=
"data"
:header-cell-style=
"
{textAlign: 'center'}"
@selection-change="handleSelectionChange"
>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"名称"
align=
"center"
prop=
"ipAddress"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
name
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"状态"
align=
"center"
prop=
"ipAddress"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.status === '1'"
class=
"st-square"
style=
"background-color: #3db58d;"
/>
<span
v-else
class=
"st-square"
style=
"background-color: #eb5d5d;"
/>
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"健康度"
align=
"center"
prop=
"ipAddress"
>
<
template
slot-scope=
"scope"
>
<div
:style=
"
{ color: scope.row.status === '1' ? '#3db58d' : '#eb5d5d'}">
{{
scope
.
row
.
health
||
'-'
}}
</div>
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"可用性"
align=
"center"
prop=
"ipAddress"
>
<
template
slot-scope=
"scope"
>
<div
:style=
"
{ color: scope.row.status === '1' ? '#3db58d' : '#eb5d5d'}">
{{
scope
.
row
.
useful
||
'-'
}}
</div>
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"繁忙度"
align=
"center"
prop=
"ipAddress"
>
<
template
slot-scope=
"scope"
>
<div
:style=
"
{ color: scope.row.status === '1' ? '#3db58d' : '#eb5d5d'}">
{{
scope
.
row
.
busy
||
'-'
}}
</div>
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"告警(关键)"
align=
"center"
prop=
"ipAddress"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
warnKey
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"告警(重要)"
align=
"center"
prop=
"ipAddress"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
warnImportant
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"告警(普通)"
align=
"center"
prop=
"ipAddress"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
warnNormal
||
'-'
}}
</
template
>
</el-table-column>
</el-table>
</div>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.page"
:limit
.
sync=
"queryParams.rows"
@
pagination=
"getList"
/>
<el-dialog
:visible
.
sync=
"open"
title=
"自定义时间"
width=
"500px"
>
<el-form
label-width=
"100px"
>
<el-form-item
label=
"开始日期"
>
<el-date-picker
v-model=
"queryParams.startTime"
type=
"datetime"
size=
"small"
value-format=
"yyyy-MM-DD HH:MM:SS"
/>
</el-form-item>
<el-form-item
label=
"结束日期"
>
<el-date-picker
v-model=
"queryParams.endTime"
type=
"datetime"
size=
"small"
value-format=
"yyyy-MM-DD HH:MM:SS"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"open = false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"open = false"
>
确定
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
screenfull
from
'screenfull'
export
default
{
name
:
'SnmpTrapLog'
,
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 总条数
total
:
0
,
// 表格数据
list
:
[],
// 是否显示弹出层
open
:
false
,
// 表单参数
form
:
{},
// 表单参数
isScreen
:
false
,
// 查询参数
queryParams
:
{
page
:
1
,
rows
:
10
,
status
:
1
,
startTime
:
''
,
endTime
:
''
,
ipAddress
:
''
,
logContent
:
''
},
data
:
[
{
name
:
'OA业务部'
,
status
:
'1'
,
health
:
'97%'
,
useful
:
'25%'
,
busy
:
'2%'
,
warnKey
:
'0'
,
warnImportant
:
'0'
,
warnNormal
:
'1'
},
{
name
:
'市场部'
,
status
:
'0'
,
health
:
'0%'
,
useful
:
'0%'
,
busy
:
'100%'
,
warnKey
:
'0'
,
warnImportant
:
'0'
,
warnNormal
:
'1'
},
{
name
:
'职能部'
,
status
:
'1'
,
health
:
'97%'
,
useful
:
'45%'
,
busy
:
'2%'
,
warnKey
:
'0'
,
warnImportant
:
'0'
,
warnNormal
:
'1'
},
{
name
:
'开发部'
,
status
:
'1'
,
health
:
'85%'
,
useful
:
'25%'
,
busy
:
'2%'
,
warnKey
:
'0'
,
warnImportant
:
'0'
,
warnNormal
:
'1'
},
{
name
:
'测试部'
,
status
:
'0'
,
health
:
'0%'
,
useful
:
'0%'
,
busy
:
'100%'
,
warnKey
:
'16'
,
warnImportant
:
'0'
,
warnNormal
:
'1'
},
{
name
:
'运维部'
,
status
:
'0'
,
health
:
'0%'
,
useful
:
'0%'
,
busy
:
'100%'
,
warnKey
:
'5'
,
warnImportant
:
'0'
,
warnNormal
:
'1'
}
]
}
},
/** 路由离开前存储筛选条件*/
beforeRouteLeave
(
to
,
from
,
next
)
{
this
.
$store
.
dispatch
(
'searchSave/searchParamsSet'
,
{
path
:
this
.
$route
.
path
,
param
:
{
...
this
.
queryParams
}
})
next
()
},
created
()
{
this
.
getList
()
},
mounted
()
{
this
.
handleExpand
()
window
.
onresize
=
()
=>
{
this
.
isScreen
=
screenfull
.
isFullscreen
}
},
methods
:
{
handleExpand
()
{
const
element
=
document
.
getElementById
(
'sylog-container'
)
// 指定全屏区域元素
document
.
getElementById
(
'fullScreen'
).
addEventListener
(
'click'
,
()
=>
{
if
(
screenfull
.
isEnabled
&&
this
.
isScreen
===
false
)
{
screenfull
.
request
(
element
)
}
else
{
screenfull
.
exit
()
}
})
// 实现模块全屏
},
refresh
()
{
window
.
location
.
reload
()
// 刷新页面
},
/** 查询登录日志 */
getList
()
{
this
.
loading
=
true
setTimeout
(()
=>
{
this
.
loading
=
false
},
500
)
},
/** 查询按钮操作 */
changeTime
()
{
this
.
open
=
!
this
.
open
},
/** 查询按钮操作 */
handleQuery
()
{
this
.
queryParams
.
page
=
1
this
.
getList
()
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
dateRange
=
''
this
.
resetForm
(
'queryForm'
)
this
.
handleQuery
()
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
operId
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.app-container-Sylog
{
padding
:
0
;
font-size
:
18px
;
.placeholder
{
height
:
14px
;
background-color
:
#F4F4F4
;
margin-bottom
:
10px
}
.st-square
{
cursor
:
pointer
;
margin-right
:
6px
;
width
:
9px
;
height
:
9px
;
display
:
inline-block
;
}
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment