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
ac4ade89
Commit
ac4ade89
authored
Nov 06, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
告警模块
parent
f327cbed
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
246 additions
and
256 deletions
+246
-256
alarm-list.component.html
...ain/webapp/app/alarm/alarm-list/alarm-list.component.html
+2
-31
alarm-list.component.ts
src/main/webapp/app/alarm/alarm-list/alarm-list.component.ts
+8
-16
alarm.module.ts
src/main/webapp/app/alarm/alarm.module.ts
+0
-36
now-alarm.component.html
src/main/webapp/app/alarm/now-alarm/now-alarm.component.html
+2
-39
now-alarm.component.ts
src/main/webapp/app/alarm/now-alarm/now-alarm.component.ts
+9
-30
app.main.module.ts
src/main/webapp/app/app.main.module.ts
+83
-0
app.module.ts
src/main/webapp/app/app.module.ts
+6
-37
sidebar.component.ts
src/main/webapp/app/layouts/sidebar/sidebar.component.ts
+3
-1
basic-edit.component.html
...ain/webapp/app/modal/basic-edit/basic-edit.component.html
+5
-2
warn-list.component.html
src/main/webapp/app/modal/warn-list/warn-list.component.html
+32
-0
warn-list.component.ts
src/main/webapp/app/modal/warn-list/warn-list.component.ts
+64
-0
basic-detail.component.html
...pp/overAll/basic/basic-detail/basic-detail.component.html
+7
-8
basic-detail.component.ts
.../app/overAll/basic/basic-detail/basic-detail.component.ts
+25
-11
overAll.module.ts
src/main/webapp/app/overAll/overAll.module.ts
+0
-19
loginGuard.ts
src/main/webapp/app/shared/common/loginGuard.ts
+0
-1
system.module.ts
src/main/webapp/app/system/system.module.ts
+0
-25
No files found.
src/main/webapp/app/alarm/alarm-list/alarm-list.component.html
View file @
ac4ade89
...
@@ -24,33 +24,4 @@
...
@@ -24,33 +24,4 @@
<span>
当前告警数:120
</span>
<span>
当前告警数:120
</span>
</div>
</div>
</div>
</div>
<nz-table
#
nzTable
[
nzData
]="
eventList
"
nzSingleSort
>
<smart-warn-list
#
warnList
></smart-warn-list>
<thead>
\ No newline at end of file
<tr>
<th
nzShowSort
>
产生时间
</th>
<th
>
级别
</th>
<th
>
名称
</th>
<th
nzWidth=
"15%"
>
告警信息
</th>
<th
>
类别
</th>
<th
>
资源分组
</th>
<th
>
持续时间
</th>
<th
>
产生事件
</th>
<th>
状态
</th>
<th>
发送记录
</th>
</tr>
</thead>
<tbody>
<tr
*
ngFor=
"let data of warnList"
>
<td>
{{data.lastchangeDate}}
</td>
<td>
级别
</td>
<td>
名称
</td>
<td>
{{data.description}}
</td>
<td>
类别
</td>
<td>
资源分组
</td>
<td>
{{data.continuedTime}}
</td>
<td>
产生事件
</td>
<td>
{{data.stateName}}
</td>
<td><i
nz-icon
type=
"profile"
theme=
"outline"
></i></td>
</tr>
</tbody>
</nz-table>
\ No newline at end of file
src/main/webapp/app/alarm/alarm-list/alarm-list.component.ts
View file @
ac4ade89
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
AlarmService
}
from
'../alarm.service'
;
import
{
AlarmService
}
from
'../alarm.service'
;
import
{
pageSize
}
from
'../../app.constants'
;
import
{
pageSize
}
from
'../../app.constants'
;
import
{
WarnListComponent
}
from
'../../modal/warn-list/warn-list.component'
;
@
Component
({
@
Component
({
selector
:
'smart-alarm-list'
,
selector
:
'smart-alarm-list'
,
templateUrl
:
'./alarm-list.component.html'
,
templateUrl
:
'./alarm-list.component.html'
,
styles
:
[]
styles
:
[
`
`
]
})
})
export
class
AlarmListComponent
implements
OnInit
{
export
class
AlarmListComponent
implements
OnInit
{
@
ViewChild
(
'warnList'
)
warnList
:
WarnListComponent
;
eventList
=
[];
eventList
=
[];
pageNum
=
1
;
pageNum
=
1
;
pageCount
=
pageSize
;
pageCount
=
pageSize
;
...
@@ -17,19 +20,8 @@ export class AlarmListComponent implements OnInit {
...
@@ -17,19 +20,8 @@ export class AlarmListComponent implements OnInit {
}
}
ngOnInit
()
{
ngOnInit
()
{
this
.
getList
();
const
obj
=
{};
}
this
.
warnList
.
getList
(
obj
);
getList
()
{
const
data
=
{
pageNum
:
this
.
pageNum
,
pageCount
:
this
.
pageCount
,
};
this
.
alarmSer
.
eventFind
(
data
).
subscribe
(
(
res
)
=>
{
}
);
}
}
}
}
src/main/webapp/app/alarm/alarm.module.ts
deleted
100644 → 0
View file @
f327cbed
import
{
NgModule
}
from
'@angular/core'
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
NgxEchartsModule
}
from
"ngx-echarts"
;
import
{
AlarmManageComponent
}
from
'./alarm-manage/alarm-manage.component'
;
import
{
AlarmListComponent
}
from
'./alarm-list/alarm-list.component'
;
import
{
AlarmLogComponent
}
from
'./alarm-log/alarm-log.component'
;
import
{
AlarmSetComponent
}
from
'./alarm-set/alarm-set.component'
;
import
{
NowAlarmComponent
}
from
'./now-alarm/now-alarm.component'
;
import
{
SendSetComponent
}
from
'./send-set/send-set.component'
;
import
{
AlarmService
}
from
'./alarm.service'
;
import
{
FormsModule
,
ReactiveFormsModule
}
from
'@angular/forms'
;
import
{
NgZorroAntdModule
}
from
'ng-zorro-antd'
;
import
{
SendLogComponent
}
from
'./modal/send-log/send-log.component'
;
@
NgModule
({
imports
:
[
CommonModule
,
NgxEchartsModule
,
FormsModule
,
ReactiveFormsModule
,
NgZorroAntdModule
.
forRoot
()
],
declarations
:
[
AlarmManageComponent
,
AlarmListComponent
,
AlarmLogComponent
,
AlarmSetComponent
,
NowAlarmComponent
,
SendSetComponent
,
SendLogComponent
],
providers
:[
AlarmService
]
})
export
class
AlarmModule
{
}
src/main/webapp/app/alarm/now-alarm/now-alarm.component.html
View file @
ac4ade89
...
@@ -25,44 +25,6 @@
...
@@ -25,44 +25,6 @@
</div>
</div>
</div>
</div>
<nz-table
#
nzTable
[
nzData
]="
warnList
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageNum
"
[
nzPageSize
]="
pageCount
"
(
nzPageIndexChange
)="
change
($
event
)"
[
nzLoading
]="
loading
"
>
<smart-warn-list
#
warnList
></smart-warn-list>
<thead>
<tr>
<th
nzShowSort
>
产生时间
</th>
<th>
级别
</th>
<th>
名称
</th>
<th
nzWidth=
"15%"
>
告警信息
</th>
<th>
类别
</th>
<th>
资源分组
</th>
<th>
持续时间
</th>
<th>
产生事件
</th>
<th>
状态
</th>
<th>
发送记录
</th>
</tr>
</thead>
<tbody>
<tr
*
ngFor=
"let data of warnList"
>
<td>
<nz-timeline-item>
{{data.clock}}
</nz-timeline-item>
</td>
<td>
<ng-container
*
ngIf=
" data.priority == 4 || data.priority == 5"
>
<nz-tag
[
nzColor
]="'#
cf5c4b
'"
></nz-tag>
</ng-container>
<ng-container
*
ngIf=
" data.priority == 2 || data.priority == 3"
>
<nz-tag
[
nzColor
]="'#
f18633
'"
></nz-tag>
</ng-container>
</td>
<td>
{{data.hostName}}
</td>
<td>
{{data.description}}
</td>
<td>
类别
</td>
<td>
资源分组
</td>
<td>
{{data.continuedTime}}
</td>
<td>
产生事件
</td>
<td>
{{data.stateName}}
</td>
<td
class=
"list-icon"
(
click
)="
showModal
(
data
)"
><i
class=
"anticon anticon-profile"
></i></td>
</tr>
</tbody>
</nz-table>
<smart-send-log
#
sendLog
></smart-send-log>
<smart-send-log
#
sendLog
></smart-send-log>
\ No newline at end of file
src/main/webapp/app/alarm/now-alarm/now-alarm.component.ts
View file @
ac4ade89
...
@@ -3,23 +3,19 @@ import {AlarmService} from '../alarm.service';
...
@@ -3,23 +3,19 @@ import {AlarmService} from '../alarm.service';
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
import
{
SendLogComponent
}
from
'../modal/send-log/send-log.component'
;
import
{
SendLogComponent
}
from
'../modal/send-log/send-log.component'
;
import
{
pageSize
}
from
'../../app.constants'
;
import
{
pageSize
}
from
'../../app.constants'
;
import
{
WarnListComponent
}
from
'../../modal/warn-list/warn-list.component'
;
@
Component
({
@
Component
({
selector
:
'smart-now-alarm'
,
selector
:
'smart-now-alarm'
,
templateUrl
:
'./now-alarm.component.html'
,
templateUrl
:
'./now-alarm.component.html'
,
styles
:
[
styles
:
[
`
`
.list-icon{
font-size: 20px;
text-align: center;
color: #8cb6ce;
}
`
`
]
]
})
})
export
class
NowAlarmComponent
implements
OnInit
{
export
class
NowAlarmComponent
implements
OnInit
{
@
ViewChild
(
'sendLog'
)
sendLog
:
SendLogComponent
;
@
ViewChild
(
'sendLog'
)
sendLog
:
SendLogComponent
;
warnList
=
[]
;
@
ViewChild
(
'warnList'
)
warnList
:
WarnListComponent
;
loading
=
false
;
loading
=
false
;
pageCount
=
pageSize
;
pageCount
=
pageSize
;
...
@@ -30,39 +26,22 @@ export class NowAlarmComponent implements OnInit {
...
@@ -30,39 +26,22 @@ export class NowAlarmComponent implements OnInit {
}
}
ngOnInit
()
{
ngOnInit
()
{
this
.
findWarning
();
this
.
search
();
}
}
findWarning
()
{
search
(){
this
.
loading
=
true
;
const
obj
=
{
const
data
=
{
isWaring
:
'yes'
obj
:{
}
isWaring
:
'yes'
this
.
warnList
.
getList
(
obj
);
},
pageCount
:
this
.
pageCount
,
pageNum
:
this
.
pageNum
};
this
.
alarmSer
.
eventFind
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
=
10000
)
{
this
.
warnList
=
res
.
data
.
data
;
this
.
totalNum
=
res
.
data
.
totalNum
;
}
else
{
this
.
message
.
info
(
res
.
errMsg
);
}
this
.
loading
=
false
;
}
);
}
}
change
(
e
){
change
(
e
){
this
.
pageNum
=
e
;
this
.
pageNum
=
e
;
this
.
findWarning
();
}
}
//打开modal
//打开modal
showModal
(
data
){
showModal
(
data
){
this
.
sendLog
.
showModal
(
data
);
this
.
sendLog
.
showModal
(
data
);
}
}
}
}
src/main/webapp/app/app.main.module.ts
0 → 100644
View file @
ac4ade89
import
{
RouterModule
}
from
"@angular/router"
;
import
{
CUSTOM_ELEMENTS_SCHEMA
,
NgModule
}
from
'@angular/core'
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
NgxEchartsModule
}
from
"ngx-echarts"
;
import
{
FormsModule
,
ReactiveFormsModule
}
from
'@angular/forms'
;
import
{
NgZorroAntdModule
}
from
'ng-zorro-antd'
;
import
{
AlarmListComponent
}
from
'./alarm/alarm-list/alarm-list.component'
;
import
{
AlarmLogComponent
}
from
'./alarm/alarm-log/alarm-log.component'
;
import
{
AlarmManageComponent
}
from
'./alarm/alarm-manage/alarm-manage.component'
;
import
{
AlarmSetComponent
}
from
'./alarm/alarm-set/alarm-set.component'
;
import
{
SendLogComponent
}
from
'./alarm/modal/send-log/send-log.component'
;
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'
;
import
{
PowerComponent
}
from
'./system/power/power.component'
;
import
{
BasiCheckComponent
}
from
'./modal/basi-check/basi-check.component'
;
import
{
BasicEditComponent
}
from
'./modal/basic-edit/basic-edit.component'
;
import
{
BasicKeyComponent
}
from
'./modal/basic-key/basic-key.component'
;
import
{
CreateGroupComponent
}
from
'./modal/create-group/create-group.component'
;
import
{
NewTypeComponent
}
from
'./modal/new-type/new-type.component'
;
import
{
WarnListComponent
}
from
'./modal/warn-list/warn-list.component'
;
import
{
JhiMainComponent
,
NavbarComponent
,
SidebarComponent
}
from
'./layouts'
;
import
{
OverAllService
}
from
'./overAll/overAll.service'
;
import
{
SystemService
}
from
'./system/system.service'
;
import
{
AlarmService
}
from
'./alarm/alarm.service'
;
@
NgModule
({
imports
:
[
RouterModule
,
CommonModule
,
NgxEchartsModule
,
FormsModule
,
ReactiveFormsModule
,
NgZorroAntdModule
.
forRoot
()
],
declarations
:
[
JhiMainComponent
,
NavbarComponent
,
SidebarComponent
,
AlarmListComponent
,
AlarmLogComponent
,
AlarmManageComponent
,
AlarmSetComponent
,
SendLogComponent
,
NowAlarmComponent
,
SendSetComponent
,
BasicDetailComponent
,
BasicComponent
,
MonitorComponent
,
SecurityComponent
,
AuditComponent
,
ExamineComponent
,
GroupComponent
,
PowerComponent
,
BasiCheckComponent
,
BasicEditComponent
,
BasicKeyComponent
,
CreateGroupComponent
,
NewTypeComponent
,
WarnListComponent
,
],
providers
:[
OverAllService
,
SystemService
,
AlarmService
],
exports
:[
BasiCheckComponent
,
BasicEditComponent
,
BasicKeyComponent
,
CreateGroupComponent
,
NewTypeComponent
,
WarnListComponent
],
schemas
:
[
CUSTOM_ELEMENTS_SCHEMA
],
})
export
class
AppMainModule
{
}
src/main/webapp/app/app.module.ts
View file @
ac4ade89
import
'./vendor.ts'
;
import
'./vendor.ts'
;
import
{
NgModule
,
Injector
,
CUSTOM_ELEMENTS_SCHEMA
}
from
'@angular/core'
;
import
{
NgModule
,
Injector
,
CUSTOM_ELEMENTS_SCHEMA
}
from
'@angular/core'
;
import
{
BrowserModule
}
from
'@angular/platform-browser'
;
import
{
BrowserModule
}
from
'@angular/platform-browser'
;
import
{
BrowserAnimationsModule
}
from
"@angular/platform-browser/animations"
;
import
{
BrowserAnimationsModule
}
from
"@angular/platform-browser/animations"
;
...
@@ -19,78 +18,46 @@ import { PaginationConfig } from './blocks/config/uib-pagination.config';
...
@@ -19,78 +18,46 @@ import { PaginationConfig } from './blocks/config/uib-pagination.config';
import
{
FileUploadModule
}
from
'ng2-file-upload'
;
import
{
FileUploadModule
}
from
'ng2-file-upload'
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
LayoutService
}
from
"./layouts/layout.service"
;
import
{
LayoutService
}
from
"./layouts/layout.service"
;
import
{
NgZorroAntdModule
}
from
'ng-zorro-antd'
;
import
{
NgxEchartsModule
}
from
"ngx-echarts"
;
import
{
NgxEchartsModule
}
from
"ngx-echarts"
;
import
{
import
{
JhiMainComponent
,
NavbarComponent
,
SidebarComponent
,
FooterComponent
,
FooterComponent
,
ProfileService
,
ProfileService
,
PageRibbonComponent
,
PageRibbonComponent
,
ErrorComponent
ErrorComponent
}
from
'./layouts'
;
}
from
'./layouts'
;
import
{
SystemModule
}
from
"./system/system.module"
;
import
{
SystemService
}
from
"./system/system.service"
;
import
{
AppComponent
}
from
"./app.component"
;
import
{
AppComponent
}
from
"./app.component"
;
import
{
RouterModule
}
from
"@angular/router"
;
import
{
RouterModule
}
from
"@angular/router"
;
import
{
DEBUG_INFO_ENABLED
}
from
"./app.constants"
;
import
{
DEBUG_INFO_ENABLED
}
from
"./app.constants"
;
import
{
route
}
from
"./app.route"
;
import
{
route
}
from
"./app.route"
;
import
{
LoginGuard
}
from
"./shared/common/loginGuard"
;
import
{
LoginGuard
}
from
"./shared/common/loginGuard"
;
import
{
AlarmModule
}
from
'./alarm/alarm.module'
;
import
{
AppMainModule
}
from
'./app.main.module'
;
import
{
OverAllModule
}
from
'./overAll/overAll.module'
;
import
{
CreateGroupComponent
}
from
'./modal/create-group/create-group.component'
;
import
{
SecurityComponent
}
from
'./overAll/security/security.component'
;
import
{
MonitorComponent
}
from
'./overAll/monitor/monitor.component'
;
import
{
BasiCheckComponent
}
from
'./modal/basi-check/basi-check.component'
;
import
{
BasicComponent
}
from
'./overAll/basic/basic.component'
;
import
{
NewTypeComponent
}
from
'./modal/new-type/new-type.component'
;
import
{
BasicDetailComponent
}
from
'./overAll/basic/basic-detail/basic-detail.component'
;
import
{
BasicKeyComponent
}
from
'./modal/basic-key/basic-key.component'
;
import
{
BasicEditComponent
}
from
'./modal/basic-edit/basic-edit.component'
;
@
NgModule
({
@
NgModule
({
imports
:
[
imports
:
[
AlarmModule
,
AppMainModule
,
OverAllModule
,
BrowserModule
,
BrowserModule
,
NgxEchartsModule
,
NgxEchartsModule
,
HttpModule
,
HttpModule
,
BrowserAnimationsModule
,
BrowserAnimationsModule
,
SystemModule
,
RouterModule
,
RouterModule
,
Ng2Webstorage
.
forRoot
({
prefix
:
'
jhi
'
,
separator
:
'-'
}),
Ng2Webstorage
.
forRoot
({
prefix
:
'
smart
'
,
separator
:
'-'
}),
BootappSharedModule
,
BootappSharedModule
,
BootappHomeModule
,
BootappHomeModule
,
FileUploadModule
,
FileUploadModule
,
CommonModule
,
CommonModule
,
FormsModule
,
FormsModule
,
ReactiveFormsModule
,
ReactiveFormsModule
,
NgZorroAntdModule
.
forRoot
(),
RouterModule
.
forRoot
(
route
,
{
useHash
:
true
,
enableTracing
:
DEBUG_INFO_ENABLED
})
RouterModule
.
forRoot
(
route
,
{
useHash
:
true
,
enableTracing
:
DEBUG_INFO_ENABLED
})
],
],
declarations
:
[
declarations
:
[
JhiMainComponent
,
NavbarComponent
,
ErrorComponent
,
ErrorComponent
,
PageRibbonComponent
,
PageRibbonComponent
,
FooterComponent
,
FooterComponent
,
SidebarComponent
,
BasicComponent
,
SecurityComponent
,
MonitorComponent
,
BasicDetailComponent
,
BasiCheckComponent
,
BasicKeyComponent
,
BasicEditComponent
,
CreateGroupComponent
,
NewTypeComponent
,
AppComponent
,
AppComponent
,
],
],
providers
:
[
providers
:
[
LayoutService
,
LayoutService
,
SystemService
,
ProfileService
,
ProfileService
,
PaginationConfig
,
PaginationConfig
,
LoginGuard
,
LoginGuard
,
...
@@ -133,6 +100,8 @@ import {BasicEditComponent} from './modal/basic-edit/basic-edit.component';
...
@@ -133,6 +100,8 @@ import {BasicEditComponent} from './modal/basic-edit/basic-edit.component';
],
],
bootstrap
:
[
AppComponent
],
bootstrap
:
[
AppComponent
],
schemas
:
[
CUSTOM_ELEMENTS_SCHEMA
]
schemas
:
[
CUSTOM_ELEMENTS_SCHEMA
],
exports
:[
]
})
})
export
class
BootappAppModule
{}
export
class
BootappAppModule
{}
src/main/webapp/app/layouts/sidebar/sidebar.component.ts
View file @
ac4ade89
...
@@ -32,7 +32,9 @@ export class SidebarComponent implements OnInit {
...
@@ -32,7 +32,9 @@ export class SidebarComponent implements OnInit {
getMenu
(){
getMenu
(){
this
.
layoutSer
.
getMenu
().
subscribe
(
this
.
layoutSer
.
getMenu
().
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
menuList
=
this
.
listToTree
(
'id'
,
'parentId'
,
res
.
data
);
if
(
res
.
errCode
==
10000
){
this
.
menuList
=
this
.
listToTree
(
'id'
,
'parentId'
,
res
.
data
);
}
}
}
)
)
}
}
...
...
src/main/webapp/app/modal/basic-edit/basic-edit.component.html
View file @
ac4ade89
...
@@ -109,7 +109,7 @@
...
@@ -109,7 +109,7 @@
<nz-form-control
[
nzSpan
]="
20
"
>
<nz-form-control
[
nzSpan
]="
20
"
>
<div
nz-row
[
nzGutter
]="
12
"
>
<div
nz-row
[
nzGutter
]="
12
"
>
<ng-container
*
ngFor=
"let item of interfaceslist;let i = index;"
>
<ng-container
*
ngFor=
"let item of interfaceslist;let i = index;"
>
<nz-form-control
nz-col
[
nzSpan
]="
4
"
>
<nz-form-control
nz-col
[
nzSpan
]="
2
"
>
<nz-select
name=
"main"
nzPlaceHolder=
"选择接口类型"
[(
ngModel
)]="
item
.
main
"
>
<nz-select
name=
"main"
nzPlaceHolder=
"选择接口类型"
[(
ngModel
)]="
item
.
main
"
>
<nz-option
nzValue=
"1"
nzLabel=
"默认"
></nz-option>
<nz-option
nzValue=
"1"
nzLabel=
"默认"
></nz-option>
<nz-option
nzValue=
"0"
nzLabel=
"不默认"
></nz-option>
<nz-option
nzValue=
"0"
nzLabel=
"不默认"
></nz-option>
...
@@ -129,9 +129,12 @@
...
@@ -129,9 +129,12 @@
<nz-option
nzValue=
"4"
nzLabel=
"IPMI接口"
></nz-option>
<nz-option
nzValue=
"4"
nzLabel=
"IPMI接口"
></nz-option>
</nz-select>
</nz-select>
</nz-form-control>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
3
"
>
<nz-form-control
nz-col
[
nzSpan
]="
2
"
>
<input
type=
"text"
placeholder=
"端口"
nz-input
name=
"port"
[(
ngModel
)]="
item
.
port
"
>
<input
type=
"text"
placeholder=
"端口"
nz-input
name=
"port"
[(
ngModel
)]="
item
.
port
"
>
</nz-form-control>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
3
"
>
<label
nz-checkbox
[(
ngModel
)]="
checked
"
>
使用大量请求
</label>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
2
"
>
<nz-form-control
nz-col
[
nzSpan
]="
2
"
>
<span
class=
"cursor"
(
click
)="
deleteInterfaces
(
i
)"
>
X
</span>
<span
class=
"cursor"
(
click
)="
deleteInterfaces
(
i
)"
>
X
</span>
</nz-form-control>
</nz-form-control>
...
...
src/main/webapp/app/modal/warn-list/warn-list.component.html
0 → 100644
View file @
ac4ade89
<nz-table
#
nzTable
[
nzData
]="
warnList
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageNum
"
[
nzPageSize
]="
pageCount
"
(
nzPageIndexChange
)="
change
($
event
)"
[
nzLoading
]="
loading
"
>
<thead>
<tr>
<th
nzShowSort
>
产生时间
</th>
<th>
级别
</th>
<th>
名称
</th>
<th
nzWidth=
"15%"
>
告警信息
</th>
<th>
类别
</th>
<th>
资源分组
</th>
<th>
持续时间
</th>
<th>
产生事件
</th>
<th>
状态
</th>
<th
style=
"text-align: center"
>
发送记录
</th>
</tr>
</thead>
<tbody>
<tr
*
ngFor=
"let data of warnList"
>
<td>
{{data.lastchangeDate}}
</td>
<td>
级别
</td>
<td>
名称
</td>
<td>
{{data.description}}
</td>
<td>
类别
</td>
<td>
资源分组
</td>
<td>
{{data.continuedTime}}
</td>
<td>
产生事件
</td>
<td>
{{data.stateName}}
</td>
<td
class=
"list-icon"
(
click
)="
showLog
(
data
)"
><i
class=
"anticon anticon-profile"
></i></td>
</tr>
</tbody>
</nz-table>
<smart-send-log
#
sendLog
></smart-send-log>
\ No newline at end of file
src/main/webapp/app/modal/warn-list/warn-list.component.ts
0 → 100644
View file @
ac4ade89
import
{
Component
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
AlarmService
}
from
'../../alarm/alarm.service'
;
import
{
pageSize
}
from
'../../app.constants'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
import
{
SendLogComponent
}
from
'../../alarm/modal/send-log/send-log.component'
;
@
Component
({
selector
:
'smart-warn-list'
,
templateUrl
:
'./warn-list.component.html'
,
styles
:
[
` .list-icon{
font-size: 20px;
text-align: center;
color: #8cb6ce;
}
`
]
})
export
class
WarnListComponent
implements
OnInit
{
@
ViewChild
(
'sendLog'
)
sendLog
:
SendLogComponent
;
warnList
=
[];
obj
;
pageNum
=
1
;
pageCount
=
pageSize
;
totalNum
;
loading
=
false
;
constructor
(
public
alarmSer
:
AlarmService
,
public
message
:
NzMessageService
)
{
}
ngOnInit
()
{
// this.getList();
}
getList
(
obj
)
{
this
.
obj
=
obj
;
this
.
loading
=
true
;
const
data
=
{
pageNum
:
this
.
pageNum
,
pageCount
:
this
.
pageCount
,
obj
:
obj
};
this
.
alarmSer
.
eventFind
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
this
.
warnList
=
res
.
data
.
data
;
this
.
totalNum
=
res
.
data
.
totalNum
;
}
else
{
this
.
message
.
info
(
res
.
errMsg
);
}
this
.
loading
=
false
;
}
);
}
change
(
e
){
this
.
pageNum
=
e
;
this
.
getList
(
this
.
obj
);
}
showLog
(
data
){
this
.
sendLog
.
showModal
(
data
);
}
}
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.html
View file @
ac4ade89
...
@@ -26,8 +26,7 @@
...
@@ -26,8 +26,7 @@
<!--<button nz-button nzType="default">编辑</button>-->
<!--<button nz-button nzType="default">编辑</button>-->
<button
nz-button
nzType=
"default"
>
删除
</button>
<button
nz-button
nzType=
"default"
>
删除
</button>
</div>
</div>
<nz-tabset
>
<nz-tabset
class=
"tabs-smart"
>
<nz-tab
nzTitle=
"资源详情"
>
<nz-tab
nzTitle=
"资源详情"
>
<section>
<section>
资源显示名称
资源显示名称
...
@@ -165,12 +164,12 @@
...
@@ -165,12 +164,12 @@
</nz-table>
</nz-table>
</div>
</div>
</nz-tab>
</nz-tab>
<
!--<nz-tab nzTitle="历史告警">--
>
<
nz-tab
#
thirdTabs
nzTitle=
"历史告警"
>
<smart-warn-list
#
warnList
></smart-warn-list>
<
!--</nz-tab>--
>
<
/nz-tab
>
<
!--<nz-tab nzTitle="资产运维">--
>
<
nz-tab
nzTitle=
"资产运维"
>
<!--Content of Tab Pane 3-->
Content of Tab Pane 3
<
!--</nz-tab>--
>
<
/nz-tab
>
</nz-tabset>
</nz-tabset>
</div>
</div>
...
...
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.ts
View file @
ac4ade89
import
{
Component
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
AfterViewInit
,
Component
,
ElementRef
,
OnInit
,
Renderer
,
ViewChild
,
}
from
'@angular/core'
;
import
{
ActivatedRoute
}
from
'@angular/router'
;
import
{
ActivatedRoute
}
from
'@angular/router'
;
import
{
OverAllService
}
from
'../../overAll.service'
;
import
{
OverAllService
}
from
'../../overAll.service'
;
import
{
FormBuilder
,
FormGroup
,
Validators
}
from
'@angular/forms'
;
import
{
FormBuilder
,
FormGroup
,
Validators
}
from
'@angular/forms'
;
...
@@ -6,6 +6,8 @@ import {NzMessageService} from 'ng-zorro-antd';
...
@@ -6,6 +6,8 @@ import {NzMessageService} from 'ng-zorro-antd';
import
{
BasiCheckComponent
}
from
'../../../modal/basi-check/basi-check.component'
;
import
{
BasiCheckComponent
}
from
'../../../modal/basi-check/basi-check.component'
;
import
{
NzModalService
}
from
'ng-zorro-antd'
;
import
{
NzModalService
}
from
'ng-zorro-antd'
;
import
{
pageSize
}
from
'../../../app.constants'
;
import
{
pageSize
}
from
'../../../app.constants'
;
import
{
WarnListComponent
}
from
'../../../modal/warn-list/warn-list.component'
;
@
Component
({
@
Component
({
selector
:
'jhi-basic-detail'
,
selector
:
'jhi-basic-detail'
,
...
@@ -14,14 +16,16 @@ import {pageSize} from '../../../app.constants';
...
@@ -14,14 +16,16 @@ import {pageSize} from '../../../app.constants';
`
`
.checkTags {
.checkTags {
position: absolute;
position: absolute;
top: 1
6
px;
top: 1
2
px;
left: 233px;
left: 233px;
}
}
`
`
]
]
})
})
export
class
BasicDetailComponent
implements
OnInit
{
export
class
BasicDetailComponent
implements
OnInit
,
AfterViewInit
{
@
ViewChild
(
'smartCheck'
)
smartCheck
:
BasiCheckComponent
;
@
ViewChild
(
'smartCheck'
)
smartCheck
:
BasiCheckComponent
;
@
ViewChild
(
'thirdTabs'
)
thirdTabs
:
ElementRef
;
@
ViewChild
(
'warnList'
)
warnList
:
WarnListComponent
;
loading
=
false
;
loading
=
false
;
hostId
:
string
;
hostId
:
string
;
hostType
:
string
;
hostType
:
string
;
...
@@ -36,10 +40,9 @@ export class BasicDetailComponent implements OnInit {
...
@@ -36,10 +40,9 @@ export class BasicDetailComponent implements OnInit {
secondOptionLeft
;
secondOptionLeft
;
secondOptionRight
;
secondOptionRight
;
dataSet
:
any
[];
dataSet
:
any
[];
tabs
=
[
'资源详情'
,
'监测点列表'
,
'历史告警'
,
'资产运维'
];
panel1
=
{
active
:
true
,
name
:
'响应时间与丢包率'
,
disabled
:
false
};
panel1
=
{
active
:
true
,
name
:
'响应时间与丢包率'
,
disabled
:
false
};
panel2
=
{
active
:
true
,
disabled
:
false
,
name
:
'CPU使用率及内存使用率'
};
panel2
=
{
active
:
true
,
name
:
'CPU使用率及内存使用率'
};
panel3
=
{
active
:
true
,
disabled
:
false
,
name
:
'磁盘使用率'
};
panel3
=
{
active
:
true
,
name
:
'磁盘使用率'
,
disabled
:
false
};
//监控点
//监控点
isBasicEdit
;
isBasicEdit
;
...
@@ -66,17 +69,21 @@ export class BasicDetailComponent implements OnInit {
...
@@ -66,17 +69,21 @@ export class BasicDetailComponent implements OnInit {
isGrapha
=
false
;
isGrapha
=
false
;
chartOptionGrapha
;
chartOptionGrapha
;
//分页
pageIndex
=
1
;
//当前页数
pageSize
=
pageSize
;
pageSize
=
pageSize
;
//分页--监控点
pageIndex
=
1
;
//当前页数
totalNum
;
//总数据长度
totalNum
;
//总数据长度
totalPage
;
//总页数
applicationId
;
//分类ID
applicationId
;
//分类ID
//分页--告警
warn_totalNum
;
warn_pageNum
=
1
;
validateForm
:
FormGroup
;
validateForm
:
FormGroup
;
constructor
(
private
routerInfo
:
ActivatedRoute
,
private
message
:
NzMessageService
,
constructor
(
private
routerInfo
:
ActivatedRoute
,
private
message
:
NzMessageService
,
private
overAllSer
:
OverAllService
,
private
overAllSer
:
OverAllService
,
private
renderer
:
Renderer
,
private
fb
:
FormBuilder
,
private
modalService
:
NzModalService
)
{
private
fb
:
FormBuilder
,
private
modalService
:
NzModalService
)
{
}
}
...
@@ -97,6 +104,14 @@ export class BasicDetailComponent implements OnInit {
...
@@ -97,6 +104,14 @@ export class BasicDetailComponent implements OnInit {
this
.
getCheckList
();
this
.
getCheckList
();
this
.
getCheckStatus
();
this
.
getCheckStatus
();
this
.
findItemType
();
this
.
findItemType
();
//历史告警
const
obj
=
{};
this
.
warnList
.
getList
(
obj
);
}
ngAfterViewInit
()
{
// this.renderer.setElementStyle(this.thirdTabs.nativeElement,'margin-left','108px');
}
}
//平均响应时间
//平均响应时间
...
@@ -593,7 +608,6 @@ export class BasicDetailComponent implements OnInit {
...
@@ -593,7 +608,6 @@ export class BasicDetailComponent implements OnInit {
(
res
)
=>
{
(
res
)
=>
{
this
.
checkList
=
res
.
data
.
data
;
this
.
checkList
=
res
.
data
.
data
;
this
.
totalNum
=
res
.
data
.
totalNum
;
this
.
totalNum
=
res
.
data
.
totalNum
;
this
.
totalPage
=
res
.
data
.
totalPage
;
this
.
loading
=
false
;
this
.
loading
=
false
;
}
}
);
);
...
...
src/main/webapp/app/overAll/overAll.module.ts
deleted
100644 → 0
View file @
f327cbed
import
{
NgModule
}
from
'@angular/core'
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
NgxEchartsModule
}
from
"ngx-echarts"
;
import
{
OverAllService
}
from
'./overAll.service'
;
@
NgModule
({
imports
:
[
CommonModule
,
NgxEchartsModule
],
declarations
:
[
],
providers
:[
OverAllService
,
]
})
export
class
OverAllModule
{
}
src/main/webapp/app/shared/common/loginGuard.ts
View file @
ac4ade89
...
@@ -9,7 +9,6 @@ export class LoginGuard implements CanActivate {
...
@@ -9,7 +9,6 @@ export class LoginGuard implements CanActivate {
}
}
canActivate
(
route
:
ActivatedRouteSnapshot
,
state
:
RouterStateSnapshot
):
boolean
{
canActivate
(
route
:
ActivatedRouteSnapshot
,
state
:
RouterStateSnapshot
):
boolean
{
console
.
log
(
'canActivite'
);
let
isLogin
:
boolean
;
let
isLogin
:
boolean
;
// 判断用户是否登入
// 判断用户是否登入
const
user
=
this
.
localStorage
.
retrieve
(
'accessToken'
);
const
user
=
this
.
localStorage
.
retrieve
(
'accessToken'
);
...
...
src/main/webapp/app/system/system.module.ts
deleted
100644 → 0
View file @
f327cbed
import
{
CUSTOM_ELEMENTS_SCHEMA
,
NgModule
,}
from
'@angular/core'
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
AuditComponent
}
from
"./audit/audit.component"
;
import
{
ExamineComponent
}
from
"./examine/examine.component"
;
import
{
GroupComponent
}
from
"./group/group.component"
;
import
{
PowerComponent
}
from
"./power/power.component"
;
import
{
NgZorroAntdModule
}
from
'ng-zorro-antd'
;
import
{
FormsModule
,
ReactiveFormsModule
}
from
'@angular/forms'
;
@
NgModule
({
imports
:
[
CommonModule
,
FormsModule
,
ReactiveFormsModule
,
NgZorroAntdModule
.
forRoot
()
],
declarations
:
[
AuditComponent
,
ExamineComponent
,
GroupComponent
,
PowerComponent
],
schemas
:
[
CUSTOM_ELEMENTS_SCHEMA
]
})
export
class
SystemModule
{
}
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