Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
smart
Project
Project
Details
Activity
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
wangqinghua
smart
Commits
07477837
Commit
07477837
authored
Jun 10, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
message update
parent
ef1b6872
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
79 additions
and
71 deletions
+79
-71
database.component.ts
...n/webapp/app/overAll/modal/database/database.component.ts
+7
-3
server.component.ts
src/main/webapp/app/overAll/modal/server/server.component.ts
+5
-1
switch.component.ts
src/main/webapp/app/overAll/modal/switch/switch.component.ts
+9
-4
network-check.component.ts
...bapp/app/overAll/network-check/network-check.component.ts
+57
-59
network-detail.component.ts
.../network-check/network-detail/network-detail.component.ts
+1
-4
No files found.
src/main/webapp/app/overAll/modal/database/database.component.ts
View file @
07477837
...
@@ -69,9 +69,13 @@ export class DatabaseComponent implements OnInit {
...
@@ -69,9 +69,13 @@ export class DatabaseComponent implements OnInit {
findDatabase
()
{
findDatabase
()
{
this
.
overAllSer
.
findAllDatabaseByHost
(
this
.
hostId
).
subscribe
(
this
.
overAllSer
.
findAllDatabaseByHost
(
this
.
hostId
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
databaseList
=
res
.
data
;
if
(
res
.
errCode
==
10000
){
this
.
databaseType
=
this
.
databaseList
[
0
].
type
;
this
.
databaseList
=
res
.
data
;
this
.
findTarget
();
this
.
databaseType
=
this
.
databaseList
[
0
].
type
;
this
.
findTarget
();
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
}
}
);
);
}
}
...
...
src/main/webapp/app/overAll/modal/server/server.component.ts
View file @
07477837
...
@@ -79,7 +79,11 @@ export class ServerComponent implements OnInit {
...
@@ -79,7 +79,11 @@ export class ServerComponent implements OnInit {
};
};
this
.
overAllSer
.
findDetailed
(
this
.
hostId
).
subscribe
(
this
.
overAllSer
.
findDetailed
(
this
.
hostId
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
server
=
res
.
data
[
0
];
if
(
res
.
errCode
==
10000
){
this
.
server
=
res
.
data
[
0
];
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
}
}
);
);
//内存使用率
//内存使用率
...
...
src/main/webapp/app/overAll/modal/switch/switch.component.ts
View file @
07477837
...
@@ -95,11 +95,16 @@ export class SwitchComponent implements OnInit {
...
@@ -95,11 +95,16 @@ export class SwitchComponent implements OnInit {
//内存使用率
//内存使用率
this
.
overAllSer
.
used
(
data
).
subscribe
(
this
.
overAllSer
.
used
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
data
)
{
if
(
res
.
errCode
==
10000
){
this
.
hostObj
.
used
=
res
.
data
.
used
;
if
(
res
.
data
)
{
}
else
{
this
.
hostObj
.
used
=
res
.
data
.
used
;
this
.
hostObj
.
used
=
0
;
}
else
{
this
.
hostObj
.
used
=
0
;
}
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
}
}
}
);
);
//cpu使用率
//cpu使用率
...
...
src/main/webapp/app/overAll/network-check/network-check.component.ts
View file @
07477837
...
@@ -11,17 +11,17 @@ import {AlarmModalComponent} from '../../modal/alarm-modal/alarm-modal.component
...
@@ -11,17 +11,17 @@ import {AlarmModalComponent} from '../../modal/alarm-modal/alarm-modal.component
selector
:
'smart-network-check'
,
selector
:
'smart-network-check'
,
templateUrl
:
'./network-check.component.html'
,
templateUrl
:
'./network-check.component.html'
,
styles
:
[
styles
:
[
`
`
:host ::ng-deep .table-dropdown a{
:host ::ng-deep .table-dropdown a
{
font-weight: 300;
font-weight: 300;
}
}
`
`
]
]
})
})
export
class
NetworkCheckComponent
implements
OnInit
{
export
class
NetworkCheckComponent
implements
OnInit
{
@
ViewChild
(
'smartWebsite'
)
smartWebsite
:
WebsiteComponent
;
@
ViewChild
(
'smartWebsite'
)
smartWebsite
:
WebsiteComponent
;
@
ViewChild
(
'smartPause'
)
smartPause
:
PauseComponent
;
@
ViewChild
(
'smartPause'
)
smartPause
:
PauseComponent
;
@
ViewChild
(
'smartAlarmModal'
)
smartAlarmModal
:
AlarmModalComponent
;
@
ViewChild
(
'smartAlarmModal'
)
smartAlarmModal
:
AlarmModalComponent
;
color
=
color
;
color
=
color
;
dataSet
;
dataSet
;
...
@@ -35,19 +35,19 @@ export class NetworkCheckComponent implements OnInit {
...
@@ -35,19 +35,19 @@ export class NetworkCheckComponent implements OnInit {
totalNum
;
totalNum
;
checkStatus
=
{
checkStatus
=
{
type
:{
type
:
{
seriousNum
:
null
,
seriousNum
:
null
,
notNum
:
null
,
notNum
:
null
,
warnNum
:
null
,
warnNum
:
null
,
normalNum
:
null
normalNum
:
null
},
},
total
:
null
total
:
null
};
};
batchSelectList
=
[];
batchSelectList
=
[];
constructor
(
private
overAllSer
:
OverAllService
,
private
router
:
Router
,
constructor
(
private
overAllSer
:
OverAllService
,
private
router
:
Router
,
private
modalService
:
NzModalService
,
private
message
:
NzMessageService
)
{
private
modalService
:
NzModalService
,
private
message
:
NzMessageService
)
{
}
}
ngOnInit
()
{
ngOnInit
()
{
...
@@ -59,86 +59,84 @@ export class NetworkCheckComponent implements OnInit {
...
@@ -59,86 +59,84 @@ export class NetworkCheckComponent implements OnInit {
getwebList
()
{
getwebList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
const
data
=
{
const
data
=
{
name
:
this
.
name
,
name
:
this
.
name
,
eventPage
:
this
.
pageIndex
,
eventPage
:
this
.
pageIndex
,
pageRecords
:
this
.
pageSize
pageRecords
:
this
.
pageSize
};
};
this
.
overAllSer
.
findWebscenario
(
data
).
subscribe
(
this
.
overAllSer
.
findWebscenario
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
dataSet
=
res
.
data
.
data
;
this
.
dataSet
=
res
.
data
.
data
;
this
.
totalNum
=
res
.
data
.
totalNum
;
this
.
totalNum
=
res
.
data
.
totalNum
;
}
this
.
loading
=
false
;
this
.
loading
=
false
;
}
}
);
);
}
}
//详情
//详情
goDetail
(
item
){
goDetail
(
item
)
{
this
.
router
.
navigate
([
'app/main/network-detail'
],{
this
.
router
.
navigate
([
'app/main/network-detail'
],
{
queryParams
:{
queryParams
:
{
httptestid
:
item
.
httptestid
,
httptestid
:
item
.
httptestid
,
name
:
item
.
name
name
:
item
.
name
}
}
})
})
;
}
}
//监测状态
//监测状态
getCheckStatus
()
{
getCheckStatus
()
{
this
.
overAllSer
.
countStatus
().
subscribe
(
this
.
overAllSer
.
countStatus
().
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
checkStatus
=
res
.
data
;
this
.
checkStatus
=
res
.
data
;
}
else
{
}
else
{
this
.
message
.
info
(
res
.
errMsg
);
this
.
message
.
error
(
res
.
errMsg
);
}
}
}
}
)
)
;
}
}
//选中
//选中
selectChecked
(
event
,
item
)
{
selectChecked
(
event
,
item
)
{
if
(
event
)
{
if
(
event
)
{
this
.
batchSelectList
.
push
(
item
.
httptestid
);
this
.
batchSelectList
.
push
(
item
.
httptestid
);
}
else
{
}
else
{
const
index
=
this
.
batchSelectList
.
indexOf
(
item
.
hostid
);
const
index
=
this
.
batchSelectList
.
indexOf
(
item
.
hostid
);
this
.
batchSelectList
.
splice
(
index
,
1
);
this
.
batchSelectList
.
splice
(
index
,
1
);
}
}
}
}
//单个开启关闭
//单个开启关闭
operationHost
(
item
,
status
,
operation
)
{
operationHost
(
item
,
status
,
operation
)
{
this
.
batchSelectList
.
push
(
item
.
httptestid
);
this
.
batchSelectList
.
push
(
item
.
httptestid
);
this
.
openBatchHost
(
status
,
operation
);
this
.
openBatchHost
(
status
,
operation
);
}
}
//添加网站
//添加网站
showAddmodal
(){
showAddmodal
()
{
this
.
smartWebsite
.
showAddModal
();
this
.
smartWebsite
.
showAddModal
();
}
}
//编辑网站
//编辑网站
editBasicModal
(
item
){
editBasicModal
(
item
)
{
this
.
smartWebsite
.
showEditModal
(
item
.
httptestid
)
this
.
smartWebsite
.
showEditModal
(
item
.
httptestid
)
;
}
}
//批量开启or关闭
//批量开启or关闭
openBatchHost
(
status
,
operation
)
{
openBatchHost
(
status
,
operation
)
{
if
(
this
.
batchSelectList
.
length
==
0
)
{
if
(
this
.
batchSelectList
.
length
==
0
)
{
this
.
message
.
info
(
'请选择需要'
+
operation
+
'的网站监测'
);
this
.
message
.
info
(
'请选择需要'
+
operation
+
'的网站监测'
);
return
false
;
return
false
;
}
}
this
.
modalService
.
confirm
({
this
.
modalService
.
confirm
({
nzTitle
:
'监控'
,
nzTitle
:
'监控'
,
nzContent
:
'确定'
+
operation
+
'网站监测?'
,
nzContent
:
'确定'
+
operation
+
'网站监测?'
,
nzOkText
:
'确定'
,
nzOkText
:
'确定'
,
nzCancelText
:
'取消'
,
nzCancelText
:
'取消'
,
nzOnOk
:
()
=>
{
nzOnOk
:
()
=>
{
const
data
=
{
const
data
=
{
status
:
status
,
status
:
status
,
ids
:
this
.
batchSelectList
ids
:
this
.
batchSelectList
}
}
;
this
.
overAllSer
.
statusBatch
(
data
).
subscribe
(
this
.
overAllSer
.
statusBatch
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
...
@@ -156,8 +154,8 @@ export class NetworkCheckComponent implements OnInit {
...
@@ -156,8 +154,8 @@ export class NetworkCheckComponent implements OnInit {
}
}
//批量删除
//批量删除
batchDeleteConfirm
(){
batchDeleteConfirm
()
{
if
(
this
.
batchSelectList
.
length
==
0
)
{
if
(
this
.
batchSelectList
.
length
==
0
)
{
this
.
message
.
info
(
'请选择需要删除的网站监测'
);
this
.
message
.
info
(
'请选择需要删除的网站监测'
);
return
false
;
return
false
;
}
}
...
@@ -168,8 +166,8 @@ export class NetworkCheckComponent implements OnInit {
...
@@ -168,8 +166,8 @@ export class NetworkCheckComponent implements OnInit {
nzOkType
:
'danger'
,
nzOkType
:
'danger'
,
nzOnOk
:
()
=>
{
nzOnOk
:
()
=>
{
const
data
=
{
const
data
=
{
ids
:
this
.
batchSelectList
ids
:
this
.
batchSelectList
}
}
;
this
.
overAllSer
.
deleteBatch
(
data
).
subscribe
(
this
.
overAllSer
.
deleteBatch
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
...
@@ -188,7 +186,7 @@ export class NetworkCheckComponent implements OnInit {
...
@@ -188,7 +186,7 @@ export class NetworkCheckComponent implements OnInit {
}
}
//单个删除
//单个删除
showDeleteConfirm
(
item
){
showDeleteConfirm
(
item
)
{
this
.
modalService
.
confirm
({
this
.
modalService
.
confirm
({
nzTitle
:
'删除'
,
nzTitle
:
'删除'
,
nzContent
:
'<b style="color: red;">确认要删除该网站监测吗?</b>'
,
nzContent
:
'<b style="color: red;">确认要删除该网站监测吗?</b>'
,
...
@@ -198,8 +196,8 @@ export class NetworkCheckComponent implements OnInit {
...
@@ -198,8 +196,8 @@ export class NetworkCheckComponent implements OnInit {
let
arr
=
[];
let
arr
=
[];
arr
.
push
(
item
.
httptestid
);
arr
.
push
(
item
.
httptestid
);
const
data
=
{
const
data
=
{
ids
:
arr
ids
:
arr
}
}
;
this
.
overAllSer
.
deleteBatch
(
data
).
subscribe
(
this
.
overAllSer
.
deleteBatch
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
...
@@ -218,12 +216,12 @@ export class NetworkCheckComponent implements OnInit {
...
@@ -218,12 +216,12 @@ export class NetworkCheckComponent implements OnInit {
}
}
//临时暂停
//临时暂停
showTempStop
(
item
){
showTempStop
(
item
)
{
this
.
smartPause
.
showModal
(
item
.
httptestid
,
'网站监测'
);
this
.
smartPause
.
showModal
(
item
.
httptestid
,
'网站监测'
);
}
}
//添加告警
//添加告警
showAlarm
()
{
showAlarm
()
{
this
.
smartAlarmModal
.
showAddModal
(
'添加告警'
,
null
);
this
.
smartAlarmModal
.
showAddModal
(
'添加告警'
,
null
);
}
}
}
}
src/main/webapp/app/overAll/network-check/network-detail/network-detail.component.ts
View file @
07477837
...
@@ -27,7 +27,7 @@ import {CommonService} from '../../../shared/common/common.service';
...
@@ -27,7 +27,7 @@ import {CommonService} from '../../../shared/common/common.service';
`
`
]
]
})
})
export
class
NetworkDetailComponent
implements
OnInit
,
OnChanges
{
export
class
NetworkDetailComponent
implements
OnInit
{
@
ViewChild
(
'chartSpeedLeft'
)
chartSpeedLeft
:
ElementRef
;
@
ViewChild
(
'chartSpeedLeft'
)
chartSpeedLeft
:
ElementRef
;
@
ViewChild
(
'chartTimeLeft'
)
chartTimeLeft
:
ElementRef
;
@
ViewChild
(
'chartTimeLeft'
)
chartTimeLeft
:
ElementRef
;
@
ViewChild
(
'smartWebsite'
)
smartWebsite
:
WebsiteComponent
;
@
ViewChild
(
'smartWebsite'
)
smartWebsite
:
WebsiteComponent
;
...
@@ -73,9 +73,6 @@ export class NetworkDetailComponent implements OnInit, OnChanges {
...
@@ -73,9 +73,6 @@ export class NetworkDetailComponent implements OnInit, OnChanges {
this
.
getNowStatus
();
this
.
getNowStatus
();
}
}
ngOnChanges
()
{
}
//历史告警
//历史告警
findAlertList
()
{
findAlertList
()
{
const
data
=
{
const
data
=
{
...
...
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