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
e5dbde52
Commit
e5dbde52
authored
Nov 19, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
网站监测
parent
cddb18b9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
182 additions
and
101 deletions
+182
-101
app.main.module.ts
src/main/webapp/app/app.main.module.ts
+2
-0
website.component.html
src/main/webapp/app/modal/website/website.component.html
+0
-0
website.component.ts
src/main/webapp/app/modal/website/website.component.ts
+27
-0
basic-detail.component.ts
.../app/overAll/basic/basic-detail/basic-detail.component.ts
+1
-0
basic.component.html
src/main/webapp/app/overAll/basic/basic.component.html
+0
-0
basic.component.ts
src/main/webapp/app/overAll/basic/basic.component.ts
+34
-0
network-check.component.html
...pp/app/overAll/network-check/network-check.component.html
+91
-98
network-check.component.ts
...bapp/app/overAll/network-check/network-check.component.ts
+27
-3
No files found.
src/main/webapp/app/app.main.module.ts
View file @
e5dbde52
...
@@ -61,6 +61,7 @@ import {KonwledgeBaseComponent} from './work/konwledge-base/konwledge-base.compo
...
@@ -61,6 +61,7 @@ import {KonwledgeBaseComponent} from './work/konwledge-base/konwledge-base.compo
import
{
PersonelManageComponent
}
from
'./work/personel-manage/personel-manage.component'
;
import
{
PersonelManageComponent
}
from
'./work/personel-manage/personel-manage.component'
;
import
{
WorkHandleComponent
}
from
'./work/work-handle/work-handle.component'
;
import
{
WorkHandleComponent
}
from
'./work/work-handle/work-handle.component'
;
import
{
WebsiteComponent
}
from
'./modal/website/website.component'
;
import
{
WebsiteComponent
}
from
'./modal/website/website.component'
;
import
{
NetworkDetailComponent
}
from
'./overAll/network-check/network-detail/network-detail.component'
;
@
NgModule
({
@
NgModule
({
imports
:
[
imports
:
[
...
@@ -123,6 +124,7 @@ import {WebsiteComponent} from './modal/website/website.component';
...
@@ -123,6 +124,7 @@ import {WebsiteComponent} from './modal/website/website.component';
PersonelManageComponent
,
PersonelManageComponent
,
WorkHandleComponent
,
WorkHandleComponent
,
WebsiteComponent
,
WebsiteComponent
,
NetworkDetailComponent
,
],
],
providers
:[
providers
:[
OverAllService
,
OverAllService
,
...
...
src/main/webapp/app/modal/website/website.component.html
View file @
e5dbde52
This diff is collapsed.
Click to expand it.
src/main/webapp/app/modal/website/website.component.ts
View file @
e5dbde52
...
@@ -9,11 +9,33 @@ export class WebsiteComponent implements OnInit {
...
@@ -9,11 +9,33 @@ export class WebsiteComponent implements OnInit {
isVisible
=
false
;
isVisible
=
false
;
title
;
title
;
tabNum
=
0
;
validateForm
;
steps
=
[];
constructor
()
{
constructor
()
{
}
}
ngOnInit
()
{
ngOnInit
()
{
this
.
initForm
();
}
initForm
(){
this
.
steps
=
[];
this
.
validateForm
=
{
name
:
''
,
hostid
:
null
,
applicationid
:
null
,
delay
:
''
,
retries
:
null
,
variables
:
''
,
http_proxy
:
''
,
ssl_cert_file
:
''
,
ssl_key_file
:
''
,
ssl_key_password
:
''
,
steps
:
this
.
steps
,
}
}
}
showAddModal
()
{
showAddModal
()
{
...
@@ -32,4 +54,9 @@ export class WebsiteComponent implements OnInit {
...
@@ -32,4 +54,9 @@ export class WebsiteComponent implements OnInit {
handleCancel
()
{
handleCancel
()
{
this
.
isVisible
=
false
;
this
.
isVisible
=
false
;
}
}
tabsChange
(
index
){
this
.
tabNum
=
index
;
}
}
}
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.ts
View file @
e5dbde52
...
@@ -741,6 +741,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -741,6 +741,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
handleImageCancel
()
{
handleImageCancel
()
{
this
.
isGrapha
=
false
;
this
.
isGrapha
=
false
;
this
.
chartOptionGrapha
=
null
;
}
}
//监控项分类
//监控项分类
...
...
src/main/webapp/app/overAll/basic/basic.component.html
View file @
e5dbde52
This diff is collapsed.
Click to expand it.
src/main/webapp/app/overAll/basic/basic.component.ts
View file @
e5dbde52
...
@@ -44,6 +44,7 @@ export class BasicComponent implements OnInit {
...
@@ -44,6 +44,7 @@ export class BasicComponent implements OnInit {
//表格信息
//表格信息
loading
=
false
;
loading
=
false
;
frontPagination
=
true
;
selectedValue
;
selectedValue
;
isCheck
=
false
;
isCheck
=
false
;
...
@@ -65,6 +66,11 @@ export class BasicComponent implements OnInit {
...
@@ -65,6 +66,11 @@ export class BasicComponent implements OnInit {
green
;
green
;
gray
;
gray
;
//搜索
searchStatus
=
false
;
searchName
;
searchData
;
constructor
(
private
fb
:
FormBuilder
,
private
overAllSer
:
OverAllService
,
private
router
:
Router
,
constructor
(
private
fb
:
FormBuilder
,
private
overAllSer
:
OverAllService
,
private
router
:
Router
,
private
modalService
:
NzModalService
,
private
message
:
NzMessageService
,
private
modalService
:
NzModalService
,
private
message
:
NzMessageService
,
)
{
)
{
...
@@ -125,6 +131,32 @@ export class BasicComponent implements OnInit {
...
@@ -125,6 +131,32 @@ export class BasicComponent implements OnInit {
this
.
findOpStatus
();
this
.
findOpStatus
();
}
}
//搜索
search
(){
this
.
loading
=
true
;
this
.
searchStatus
=
true
;
this
.
frontPagination
=
false
;
const
data
=
{
search
:{
name
:
this
.
searchName
}
}
this
.
overAllSer
.
find
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
this
.
searchData
=
res
.
data
;
}
this
.
loading
=
false
;
}
)
}
//backList
backList
(){
this
.
searchStatus
=
false
;
this
.
frontPagination
=
true
;
}
//查询设备状态
//查询设备状态
findOpStatus
(){
findOpStatus
(){
this
.
overAllSer
.
findHostCountByStatus
(
0
).
subscribe
(
this
.
overAllSer
.
findHostCountByStatus
(
0
).
subscribe
(
...
@@ -194,6 +226,8 @@ export class BasicComponent implements OnInit {
...
@@ -194,6 +226,8 @@ export class BasicComponent implements OnInit {
//选择分组
//选择分组
select
()
{
select
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
this
.
searchStatus
=
false
;
this
.
frontPagination
=
true
;
if
(
this
.
selectedValue
==
'group'
)
{
if
(
this
.
selectedValue
==
'group'
)
{
this
.
overAllSer
.
getgroups
({}).
subscribe
(
this
.
overAllSer
.
getgroups
({}).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
...
...
src/main/webapp/app/overAll/network-check/network-check.component.html
View file @
e5dbde52
<div
nz-row
class=
"breadcrumbs"
>
<div
nz-row
class=
"breadcrumbs"
>
<div
nz-col
nzSpan=
"16"
>
<div
nz-col
nzSpan=
"16"
>
<nz-breadcrumb
class=
"padding-8-0"
>
<nz-breadcrumb
class=
"padding-8-0"
>
<nz-breadcrumb-item>
<nz-breadcrumb-item>
首页
首页
</nz-breadcrumb-item>
</nz-breadcrumb-item>
<nz-breadcrumb-item>
<nz-breadcrumb-item>
<a>
综合监控
</a>
<a>
综合监控
</a>
</nz-breadcrumb-item>
</nz-breadcrumb-item>
<nz-breadcrumb-item>
<nz-breadcrumb-item>
网站监测
网站监测
</nz-breadcrumb-item>
</nz-breadcrumb-item>
</nz-breadcrumb>
</nz-breadcrumb>
</div>
</div>
<div
nz-col
nzSpan=
"5"
>
<div
nz-col
nzSpan=
"5"
>
<nz-input-group
nzPrefixIcon=
"anticon anticon-search"
>
<nz-input-group
nzPrefixIcon=
"anticon anticon-search"
>
<input
type=
"text"
[(
ngModel
)]="
name
"
nz-input
placeholder=
"请输入网站名称"
>
<input
type=
"text"
[(
ngModel
)]="
name
"
nz-input
placeholder=
"请输入网站名称"
>
</nz-input-group>
</nz-input-group>
</div>
</div>
<div
nz-col
nzSpan=
"3"
class=
"text-right"
>
<div
nz-col
nzSpan=
"3"
class=
"text-right"
>
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-search"
></i></button>
<button
(
click
)="
getwebList
()"
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-search"
></i></button>
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-sync"
></i></button>
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-sync"
></i></button>
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-arrows-alt"
></i></button>
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-arrows-alt"
></i></button>
</div>
</div>
</div>
</div>
<div
nz-row
class=
"search-form tag-form"
>
<div
nz-row
class=
"search-form tag-form"
>
<div
nz-col
nzSpan=
"12"
>
<div
nz-col
nzSpan=
"12"
>
<span>
网站监测数:{{deviceNo}}
</span>
<span>
网站监测数:{{deviceNo}}
</span>
<span>
监测状态:
<span>
监测状态:
<span
style=
"margin-right: 8px"
>
<nz-tag
[
nzColor
]="'#
64ad58
'"
></nz-tag>
{{checkStatus.green}}
</span>
<span
style=
"margin-right: 8px"
>
<nz-tag
[
nzColor
]="'#
64ad58
'"
></nz-tag>
{{checkStatus.green}}
</span>
<span
style=
"margin-right: 8px"
>
<nz-tag
[
nzColor
]="'#
ed9e2e
'"
></nz-tag>
{{checkStatus.yellow}}
</span>
<span
style=
"margin-right: 8px"
>
<nz-tag
[
nzColor
]="'#
ed9e2e
'"
></nz-tag>
{{checkStatus.yellow}}
</span>
<span
style=
"margin-right: 8px"
>
<nz-tag
[
nzColor
]="'#
dd4127
'"
></nz-tag>
{{checkStatus.red}}
</span>
<span
style=
"margin-right: 8px"
>
<nz-tag
[
nzColor
]="'#
dd4127
'"
></nz-tag>
{{checkStatus.red}}
</span>
<span>
<nz-tag
[
nzColor
]="'#
aaaaaa
'"
></nz-tag>
{{checkStatus.gray}}
</span>
<span>
<nz-tag
[
nzColor
]="'#
aaaaaa
'"
></nz-tag>
{{checkStatus.gray}}
</span>
</span>
</span>
<nz-select
style=
"width: 200px;"
nzShowSearch
nzAllowClear
nzPlaceHolder=
"按组分开"
[(
ngModel
)]="
selectedValue
"
</div>
(
ngModelChange
)="
select
()"
>
<div
nz-col
nzSpan=
"12"
class=
"text-right"
>
<nz-option
nzLabel=
"按设备类型展开"
nzValue=
"type"
></nz-option>
<button
nz-button
nzType=
"default"
(
click
)="
showAddmodal
()"
><i
class=
"anticon anticon-plus"
></i>
添加网站
<nz-option
nzLabel=
"按资源分组展开"
nzValue=
"group"
></nz-option>
</button>
</nz-select>
<button
(
click
)="
openBatchHost
(
1
,'关闭')"
nz-button
nzType=
"default"
><i
</div>
class=
"anticon anticon-pause-circle-o"
></i>
停止监控
<div
nz-col
nzSpan=
"12"
class=
"text-right"
>
</button>
<button
nz-button
nzType=
"default"
(
click
)="
showGroupModal
()"
*
ngIf=
"selectedValue == 'group'"
><i
<button
(
click
)="
openBatchHost
(
0
,'开启')"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-play-circle-o"
></i>
开启监控
class=
"anticon anticon-plus"
></i>
添加网站
</button>
</button>
<button
(
click
)="
batchDeleteConfirm
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-close-circle"
></i>
删除网站
<button
(
click
)="
openBatchHost
(
1
,'关闭')"
nz-button
nzType=
"default"
><i
</button>
class=
"anticon anticon-pause-circle-o"
></i>
停止监控
</div>
</button>
<button
(
click
)="
openBatchHost
(
0
,'开启')"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-play-circle-o"
></i>
开启监控
</button>
<button
(
click
)="
batchDeleteConfirm
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-close-circle"
></i>
删除网站
</button>
</div>
</div>
</div>
<nz-table
#
nzTable
[
nzData
]="
dataSet
"
nzSingleSort
[
nzLoading
]="
loading
"
>
<nz-table
#
nzTable
[
nzData
]="
dataSet
"
nzSingleSort
[
nzLoading
]="
loading
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageIndex
"
[
nzPageSize
]="
pageSize
"
(
nzPageIndexChange
)="
getwebList
()"
[
nzFrontPagination
]="
false
"
>
<thead>
<thead>
<tr>
<tr>
<th
[
nzChecked
]="
allChecked
"
></th>
<th
[
nzChecked
]="
allChecked
"
></th>
<th>
网站名称
</th>
<th>
网站名称
</th>
<th>
状态
</th>
<th>
状态
</th>
<th
nzWidth=
"20%"
>
最近检查记录
</th>
<th
nzWidth=
"20%"
>
最近检查记录
</th>
<th>
步骤数量
</th>
<th>
步骤数量
</th>
<th>
间隔
</th>
<th>
间隔
</th>
<th>
尝试次数
</th>
<th>
尝试次数
</th>
<th>
认证
</th>
<th>
认证
</th>
<th>
Http代理
</th>
<th>
Http代理
</th>
<th>
操作
</th>
<th>
操作
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
<!--资源分组-->
<!--资源分组-->
<ng-template
ngFor
let-data
[
ngForOf
]="
nzTable
.
data
"
>
<ng-container
*
ngFor=
"let item of dataSet"
>
<ng-template
ngFor
let-item
[
ngForOf
]="
expandDataCache
[
data
.
host
]"
>
<tr>
<tr
*
ngIf=
"(item.parent&&item.parent.expand)||!(item.parent)"
>
<!--子集-->
<!--子集-->
<td
nzShowCheckbox
(
nzCheckedChange
)="
selectChecked
($
event
,
item
)"
></td>
<ng-container
*
ngIf=
"item.level"
>
<td
class=
"cursor"
>
<td
nzShowCheckbox
[
nzIndeterminate
]="
indeterminate
"
<span
(
click
)="
goDetail
(
item
)"
>
{{item.name}}
</span>
(
nzCheckedChange
)="
selectChecked
($
event
,
item
)"
[(
nzChecked
)]="
item
.
checked
"
></td>
</td>
<td
class=
"cursor"
[
nzIndentSize
]="
item
.
level
*
20
"
>
<td>
<span
(
click
)="
goDetail
(
item
)"
>
{{item.name}}
</span>
<span
*
ngIf=
"item.status == 0"
>
启用
</span>
<span
*
ngIf=
"item.status == 1"
>
禁用
</span>
</td>
<td>
最近检查记录
</td>
<td>
{{item.steps.length}}
</td>
<td>
{{item.delay}}
</td>
<td>
{{item.retries}}
</td>
<td>
{{item.authentication}}
</td>
<td>
{{item.headers}}
</td>
<td
class=
"handle"
>
<span
(
click
)="
editBasicModal
(
item
)"
>
编辑
</span>
<span
(
click
)="
showDeleteConfirm
(
item
)"
>
删除
</span>
<nz-dropdown
[
nzTrigger
]="'
click
'"
class=
"table-dropdown"
>
<a
nz-dropdown
>
更多
<i
class=
"anticon anticon-down"
></i>
</a>
<ul
nz-menu
nzSelectable
>
<li
(
click
)="
showTempStop
(
item
)"
nz-menu-item
><a>
临时暂停
</a></li>
<li
(
click
)="
openHost
(
item
)"
nz-menu-item
><a>
监控
</a></li>
<li
nz-menu-item
(
click
)="
goDetail
(
item
)"
><a>
查看监测点
</a></li>
<li
(
click
)="
showAlarm
(
item
)"
nz-menu-item
><a>
添加告警
</a></li>
</ul>
</nz-dropdown>
</td>
</td>
</ng-container>
<td
class=
"round-tag tag-form"
></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td
class=
"handle"
>
<span
(
click
)="
editBasicModal
(
item
)"
>
编辑
</span>
<span
(
click
)="
showDeleteConfirm
(
item
)"
>
删除
</span>
<nz-dropdown
[
nzTrigger
]="'
click
'"
class=
"table-dropdown"
>
<a
nz-dropdown
>
更多
<i
class=
"anticon anticon-down"
></i>
</a>
<ul
nz-menu
nzSelectable
>
<li
(
click
)="
showTempStop
(
item
)"
nz-menu-item
><a>
临时暂停
</a></li>
<li
(
click
)="
openHost
(
item
)"
nz-menu-item
><a>
<ng-container
*
ngIf=
"item.status == 1"
>
开启
</ng-container>
<ng-container
*
ngIf=
"item.status == 0"
>
停止
</ng-container>
监控
</a></li>
<li
nz-menu-item
(
click
)="
goDetail
(
item
)"
><a>
查看监测点
</a></li>
<li
(
click
)="
showAlarm
(
item
)"
nz-menu-item
><a>
添加告警
</a></li>
</ul>
</nz-dropdown>
</td>
</tr>
</tr>
</ng-template>
</ng-container>
</ng-template>
</tbody>
</tbody>
</nz-table>
</nz-table>
<!--添加网站-->
<smart-website
#
smartWebsite
></smart-website>
\ No newline at end of file
src/main/webapp/app/overAll/network-check/network-check.component.ts
View file @
e5dbde52
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
OverAllService
}
from
'../overAll.service'
;
import
{
OverAllService
}
from
'../overAll.service'
;
import
{
pageSize
}
from
'../../app.constants'
;
import
{
pageSize
}
from
'../../app.constants'
;
import
{
WebsiteComponent
}
from
'../../modal/website/website.component'
;
@
Component
({
@
Component
({
selector
:
'smart-network-check'
,
selector
:
'smart-network-check'
,
...
@@ -8,13 +9,17 @@ import {pageSize} from '../../app.constants';
...
@@ -8,13 +9,17 @@ import {pageSize} from '../../app.constants';
styles
:
[]
styles
:
[]
})
})
export
class
NetworkCheckComponent
implements
OnInit
{
export
class
NetworkCheckComponent
implements
OnInit
{
@
ViewChild
(
'smartWebsite'
)
smartWebsite
:
WebsiteComponent
;
dataSet
;
dataSet
;
deviceNo
;
deviceNo
;
loading
=
false
;
allChecked
;
name
;
name
;
pageIndex
=
1
;
pageIndex
=
1
;
pageSize
=
pageSize
;
pageSize
=
pageSize
;
totalNum
;
checkStatus
=
{
checkStatus
=
{
green
:
''
,
green
:
''
,
...
@@ -31,17 +36,21 @@ export class NetworkCheckComponent implements OnInit {
...
@@ -31,17 +36,21 @@ export class NetworkCheckComponent implements OnInit {
this
.
getCheckStatus
();
this
.
getCheckStatus
();
}
}
//网站列表
getwebList
()
{
getwebList
()
{
this
.
loading
=
true
;
const
data
=
{
const
data
=
{
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
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
dataSet
=
res
.
data
;
this
.
dataSet
=
res
.
data
.
data
;
this
.
totalNum
=
res
.
data
.
totalNum
;
}
}
this
.
loading
=
false
;
}
}
);
);
}
}
...
@@ -50,4 +59,19 @@ export class NetworkCheckComponent implements OnInit {
...
@@ -50,4 +59,19 @@ export class NetworkCheckComponent implements OnInit {
getCheckStatus
()
{
getCheckStatus
()
{
}
}
//添加网站
showAddmodal
(){
this
.
smartWebsite
.
showAddModal
();
}
//批量开启or关闭
openBatchHost
(
status
,
opreation
){
}
//批量删除
batchDeleteConfirm
(){
}
}
}
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