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
cddb18b9
Commit
cddb18b9
authored
Nov 19, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
网站监测 service
parent
a00efaba
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
230 additions
and
20 deletions
+230
-20
app.main.module.ts
src/main/webapp/app/app.main.module.ts
+2
-4
website.component.html
src/main/webapp/app/modal/website/website.component.html
+6
-0
website.component.ts
src/main/webapp/app/modal/website/website.component.ts
+35
-0
basic-detail.component.html
...pp/overAll/basic/basic-detail/basic-detail.component.html
+5
-4
basic-detail.component.ts
.../app/overAll/basic/basic-detail/basic-detail.component.ts
+1
-1
basic.component.html
src/main/webapp/app/overAll/basic/basic.component.html
+7
-1
network-check.component.html
...pp/app/overAll/network-check/network-check.component.html
+111
-3
network-check.component.ts
...bapp/app/overAll/network-check/network-check.component.ts
+45
-7
network-detail.component.html
...etwork-check/network-detail/network-detail.component.html
+3
-0
network-detail.component.ts
.../network-check/network-detail/network-detail.component.ts
+15
-0
No files found.
src/main/webapp/app/app.main.module.ts
View file @
cddb18b9
...
...
@@ -13,8 +13,6 @@ import {NowAlarmComponent} from './alarm/now-alarm/now-alarm.component';
import
{
SendSetComponent
}
from
'./alarm/send-set/send-set.component'
;
import
{
BasicDetailComponent
}
from
'./overAll/basic/basic-detail/basic-detail.component'
;
import
{
BasicComponent
}
from
'./overAll/basic/basic.component'
;
import
{
MonitorComponent
}
from
'./overAll/monitor/monitor.component'
;
import
{
SecurityComponent
}
from
'./overAll/security/security.component'
;
import
{
AuditComponent
}
from
'./system/audit/audit.component'
;
import
{
ExamineComponent
}
from
'./system/examine/examine.component'
;
import
{
GroupComponent
}
from
'./system/group/group.component'
;
...
...
@@ -62,6 +60,7 @@ import {InspectPlanComponent} from './work/inspect-plan/inspect-plan.component';
import
{
KonwledgeBaseComponent
}
from
'./work/konwledge-base/konwledge-base.component'
;
import
{
PersonelManageComponent
}
from
'./work/personel-manage/personel-manage.component'
;
import
{
WorkHandleComponent
}
from
'./work/work-handle/work-handle.component'
;
import
{
WebsiteComponent
}
from
'./modal/website/website.component'
;
@
NgModule
({
imports
:
[
...
...
@@ -85,8 +84,6 @@ import {WorkHandleComponent} from './work/work-handle/work-handle.component';
SendSetComponent
,
BasicDetailComponent
,
BasicComponent
,
MonitorComponent
,
SecurityComponent
,
AuditComponent
,
ExamineComponent
,
GroupComponent
,
...
...
@@ -125,6 +122,7 @@ import {WorkHandleComponent} from './work/work-handle/work-handle.component';
KonwledgeBaseComponent
,
PersonelManageComponent
,
WorkHandleComponent
,
WebsiteComponent
,
],
providers
:[
OverAllService
,
...
...
src/main/webapp/app/modal/website/website.component.html
0 → 100644
View file @
cddb18b9
<nz-modal
[(
nzVisible
)]="
isVisible
"
nzTitle=
"{{title}}"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()"
>
<p>
Content one
</p>
<p>
Content two
</p>
<p>
Content three
</p>
</nz-modal>
\ No newline at end of file
src/main/webapp/app/modal/website/website.component.ts
0 → 100644
View file @
cddb18b9
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'smart-website'
,
templateUrl
:
'./website.component.html'
,
styles
:
[]
})
export
class
WebsiteComponent
implements
OnInit
{
isVisible
=
false
;
title
;
constructor
()
{
}
ngOnInit
()
{
}
showAddModal
()
{
this
.
title
=
'添加网站监测'
;
this
.
isVisible
=
true
;
}
showEditModal
()
{
this
.
isVisible
=
true
;
}
handleOk
()
{
this
.
isVisible
=
false
;
}
handleCancel
()
{
this
.
isVisible
=
false
;
}
}
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.html
View file @
cddb18b9
...
...
@@ -17,8 +17,9 @@
</nz-breadcrumb>
</div>
<div
nz-col
nzSpan=
"8"
class=
"text-right"
>
<!--<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-sync"
></i></button>
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-arrows-alt"
></i></button>
</div>
</div>
<div
class=
"tabset"
>
...
...
@@ -108,7 +109,7 @@
<th>
接口
</th>
<th>
进流量
</th>
<th>
出流量
</th>
<
!--<th>状态变更时间</th>--
>
<
th>
状态变更时间
</th
>
<th
nzWidth=
"150px"
>
图表
</th>
</tr>
</thead>
...
...
@@ -118,7 +119,7 @@
<td>
{{data.name}}
</td>
<td>
{{data.in}}
</td>
<td>
{{data.out}}
</td>
<
!--<td>{{data.key5}}</td>--
>
<
td>
{{data.changeState}}
</td
>
<td>
图表
</td>
</tr>
</tbody>
...
...
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.ts
View file @
cddb18b9
...
...
@@ -578,7 +578,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
this
.
overAllSer
.
inOutInfoSnmp
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
dataSet
=
res
.
data
.
inOutInfo
;
this
.
dataSet
=
res
.
data
;
}
else
{
this
.
message
.
info
(
res
.
errMsg
);
}
...
...
src/main/webapp/app/overAll/basic/basic.component.html
View file @
cddb18b9
...
...
@@ -10,9 +10,15 @@
<nz-breadcrumb-item>
基础资源监控
</nz-breadcrumb-item>
</nz-breadcrumb>
</div>
<div
nz-col
nzSpan=
"8"
class=
"text-right"
>
<div
nz-col
nzSpan=
"5"
>
<nz-input-group
nzPrefixIcon=
"anticon anticon-search"
>
<input
type=
"text"
nz-input
placeholder=
"输入资源名称"
>
</nz-input-group>
</div>
<div
nz-col
nzSpan=
"3"
class=
"text-right"
>
<button
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-arrows-alt"
></i></button>
...
...
src/main/webapp/app/overAll/network-check/network-check.component.html
View file @
cddb18b9
<p>
network-check works!
</p>
<div
nz-row
class=
"breadcrumbs"
>
<div
nz-col
nzSpan=
"16"
>
<nz-breadcrumb
class=
"padding-8-0"
>
<nz-breadcrumb-item>
首页
</nz-breadcrumb-item>
<nz-breadcrumb-item>
<a>
综合监控
</a>
</nz-breadcrumb-item>
<nz-breadcrumb-item>
网站监测
</nz-breadcrumb-item>
</nz-breadcrumb>
</div>
<div
nz-col
nzSpan=
"5"
>
<nz-input-group
nzPrefixIcon=
"anticon anticon-search"
>
<input
type=
"text"
[(
ngModel
)]="
name
"
nz-input
placeholder=
"请输入网站名称"
>
</nz-input-group>
</div>
<div
nz-col
nzSpan=
"3"
class=
"text-right"
>
<button
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-arrows-alt"
></i></button>
</div>
</div>
<div
nz-row
class=
"search-form tag-form"
>
<div
nz-col
nzSpan=
"12"
>
<span>
网站监测数:{{deviceNo}}
</span>
<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
]="'#
dd4127
'"
></nz-tag>
{{checkStatus.red}}
</span>
<span>
<nz-tag
[
nzColor
]="'#
aaaaaa
'"
></nz-tag>
{{checkStatus.gray}}
</span>
</span>
<nz-select
style=
"width: 200px;"
nzShowSearch
nzAllowClear
nzPlaceHolder=
"按组分开"
[(
ngModel
)]="
selectedValue
"
(
ngModelChange
)="
select
()"
>
<nz-option
nzLabel=
"按设备类型展开"
nzValue=
"type"
></nz-option>
<nz-option
nzLabel=
"按资源分组展开"
nzValue=
"group"
></nz-option>
</nz-select>
</div>
<div
nz-col
nzSpan=
"12"
class=
"text-right"
>
<button
nz-button
nzType=
"default"
(
click
)="
showGroupModal
()"
*
ngIf=
"selectedValue == 'group'"
><i
class=
"anticon anticon-plus"
></i>
添加网站
</button>
<button
(
click
)="
openBatchHost
(
1
,'关闭')"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-pause-circle-o"
></i>
停止监控
</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>
<nz-table
#
nzTable
[
nzData
]="
dataSet
"
nzSingleSort
[
nzLoading
]="
loading
"
>
<thead>
<tr>
<th
[
nzChecked
]="
allChecked
"
></th>
<th>
网站名称
</th>
<th>
状态
</th>
<th
nzWidth=
"20%"
>
最近检查记录
</th>
<th>
步骤数量
</th>
<th>
间隔
</th>
<th>
尝试次数
</th>
<th>
认证
</th>
<th>
Http代理
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody>
<!--资源分组-->
<ng-template
ngFor
let-data
[
ngForOf
]="
nzTable
.
data
"
>
<ng-template
ngFor
let-item
[
ngForOf
]="
expandDataCache
[
data
.
host
]"
>
<tr
*
ngIf=
"(item.parent&&item.parent.expand)||!(item.parent)"
>
<!--子集-->
<ng-container
*
ngIf=
"item.level"
>
<td
nzShowCheckbox
[
nzIndeterminate
]="
indeterminate
"
(
nzCheckedChange
)="
selectChecked
($
event
,
item
)"
[(
nzChecked
)]="
item
.
checked
"
></td>
<td
class=
"cursor"
[
nzIndentSize
]="
item
.
level
*
20
"
>
<span
(
click
)="
goDetail
(
item
)"
>
{{item.name}}
</span>
</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>
</ng-template>
</ng-template>
</tbody>
</nz-table>
src/main/webapp/app/overAll/network-check/network-check.component.ts
View file @
cddb18b9
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
OverAllService
}
from
'../overAll.service'
;
import
{
pageSize
}
from
'../../app.constants'
;
@
Component
({
selector
:
'smart-network-check'
,
templateUrl
:
'./network-check.component.html'
,
styles
:
[]
selector
:
'smart-network-check'
,
templateUrl
:
'./network-check.component.html'
,
styles
:
[]
})
export
class
NetworkCheckComponent
implements
OnInit
{
constructor
()
{
}
dataSet
;
deviceNo
;
ngOnInit
()
{
}
name
;
pageIndex
=
1
;
pageSize
=
pageSize
;
checkStatus
=
{
green
:
''
,
yellow
:
''
,
red
:
''
,
gray
:
''
};
constructor
(
private
overAllSer
:
OverAllService
)
{
}
ngOnInit
()
{
this
.
getwebList
();
this
.
getCheckStatus
();
}
getwebList
()
{
const
data
=
{
name
:
''
,
eventPage
:
this
.
pageIndex
,
pageRecords
:
this
.
pageSize
};
this
.
overAllSer
.
findWebscenario
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
dataSet
=
res
.
data
;
}
}
);
}
//监测状态
getCheckStatus
()
{
}
}
src/main/webapp/app/overAll/network-check/network-detail/network-detail.component.html
0 → 100644
View file @
cddb18b9
<p>
network-detail works!
</p>
src/main/webapp/app/overAll/network-check/network-detail/network-detail.component.ts
0 → 100644
View file @
cddb18b9
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'smart-network-detail'
,
templateUrl
:
'./network-detail.component.html'
,
styles
:
[]
})
export
class
NetworkDetailComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
()
{
}
}
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