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
43458f66
Commit
43458f66
authored
Aug 13, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Plain Diff
bug 修正
parents
b5d9bb59
065e2802
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
157 additions
and
121 deletions
+157
-121
app.main.module.ts
src/main/webapp/app/app.main.module.ts
+14
-11
app.service.ts
src/main/webapp/app/app.service.ts
+1
-1
basic-detail.component.html
...pp/overAll/basic/basic-detail/basic-detail.component.html
+1
-25
basic-detail.component.ts
.../app/overAll/basic/basic-detail/basic-detail.component.ts
+69
-61
server.component.html
...ain/webapp/app/overAll/modal/server/server.component.html
+9
-14
switch.component.html
...ain/webapp/app/overAll/modal/switch/switch.component.html
+11
-6
switch.component.ts
src/main/webapp/app/overAll/modal/switch/switch.component.ts
+1
-2
pipe.module.ts
src/main/webapp/app/shared/pipe/pipe.module.ts
+21
-0
unit-conversion.pipe.ts
...p/app/shared/pipe/unit-conversion/unit-conversion.pipe.ts
+27
-0
shared.module.ts
src/main/webapp/app/shared/shared.module.ts
+3
-1
No files found.
src/main/webapp/app/app.main.module.ts
View file @
43458f66
import
{
RouterModule
}
from
"@angular/router"
;
import
{
RouterModule
}
from
'@angular/router'
;
import
{
CUSTOM_ELEMENTS_SCHEMA
,
NgModule
,
NO_ERRORS_SCHEMA
}
from
'@angular/core'
;
import
{
CUSTOM_ELEMENTS_SCHEMA
,
NgModule
,
NO_ERRORS_SCHEMA
}
from
'@angular/core'
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
NgxEchartsModule
}
from
"ngx-echarts"
;
import
{
NgxEchartsModule
}
from
'ngx-echarts'
;
import
{
FormsModule
,
ReactiveFormsModule
}
from
'@angular/forms'
;
import
{
FormsModule
,
ReactiveFormsModule
}
from
'@angular/forms'
;
import
{
NgZorroAntdModule
,
NZ_I18N
,
zh_CN
}
from
'ng-zorro-antd'
;
import
{
NgZorroAntdModule
,
NZ_I18N
,
zh_CN
}
from
'ng-zorro-antd'
;
import
{
AlarmListComponent
}
from
'./alarm/alarm-list/alarm-list.component'
;
import
{
AlarmListComponent
}
from
'./alarm/alarm-list/alarm-list.component'
;
import
{
AlarmLogComponent
}
from
'./alarm/alarm-log/alarm-log.component'
;
import
{
AlarmLogComponent
}
from
'./alarm/alarm-log/alarm-log.component'
;
import
{
AlarmSetComponent
}
from
'./alarm/alarm-set/alarm-set.component'
;
import
{
AlarmSetComponent
}
from
'./alarm/alarm-set/alarm-set.component'
;
...
@@ -111,14 +111,16 @@ import {DisableControlDirective} from './shared/common/disable-control.directive
...
@@ -111,14 +111,16 @@ import {DisableControlDirective} from './shared/common/disable-control.directive
import
{
SelectTriggerComponent
}
from
'./modal/select-trigger/select-trigger.component'
;
import
{
SelectTriggerComponent
}
from
'./modal/select-trigger/select-trigger.component'
;
import
{
WebModalComponent
}
from
'./modal/web-modal/web-modal.component'
;
import
{
WebModalComponent
}
from
'./modal/web-modal/web-modal.component'
;
import
{
WorkReportComponent
}
from
'./business/modal/work-report/work-report.component'
;
import
{
WorkReportComponent
}
from
'./business/modal/work-report/work-report.component'
;
import
{
SignalComponent
}
from
'./shared/signal/signal.component'
;
import
{
ServerComponent
}
from
'./overAll/modal/server/server.component'
;
import
{
ServerComponent
}
from
'./overAll/modal/server/server.component'
;
import
{
DatabaseComponent
}
from
'./overAll/modal/database/database.component'
;
import
{
DatabaseComponent
}
from
'./overAll/modal/database/database.component'
;
import
{
SwitchComponent
}
from
'./overAll/modal/switch/switch.component'
;
import
{
SwitchComponent
}
from
'./overAll/modal/switch/switch.component'
;
import
{
PipeModule
}
from
'./shared/pipe/pipe.module'
;
import
{
SignalComponent
}
from
'./shared/signal/signal.component'
;
import
{
MineComponent
}
from
'./mine/mine.component'
;
import
{
MineComponent
}
from
'./mine/mine.component'
;
@
NgModule
({
@
NgModule
({
imports
:
[
imports
:
[
PipeModule
,
RouterModule
,
RouterModule
,
CommonModule
,
CommonModule
,
NgxEchartsModule
,
NgxEchartsModule
,
...
@@ -229,13 +231,13 @@ import {MineComponent} from './mine/mine.component';
...
@@ -229,13 +231,13 @@ import {MineComponent} from './mine/mine.component';
SelectTriggerComponent
,
SelectTriggerComponent
,
WebModalComponent
,
WebModalComponent
,
WorkReportComponent
,
WorkReportComponent
,
SignalComponent
,
ServerComponent
,
ServerComponent
,
DatabaseComponent
,
DatabaseComponent
,
SwitchComponent
,
SwitchComponent
,
SignalComponent
,
MineComponent
,
MineComponent
,
],
],
providers
:[
providers
:
[
OverAllService
,
OverAllService
,
SystemService
,
SystemService
,
AlarmService
,
AlarmService
,
...
@@ -243,9 +245,9 @@ import {MineComponent} from './mine/mine.component';
...
@@ -243,9 +245,9 @@ import {MineComponent} from './mine/mine.component';
AnalysisService
,
AnalysisService
,
WorkService
,
WorkService
,
BusinessService
,
BusinessService
,
{
provide
:
NZ_I18N
,
useValue
:
zh_CN
},
{
provide
:
NZ_I18N
,
useValue
:
zh_CN
},
],
],
exports
:[
exports
:
[
BasiCheckComponent
,
BasiCheckComponent
,
BasicEditComponent
,
BasicEditComponent
,
BasicKeyComponent
,
BasicKeyComponent
,
...
@@ -254,6 +256,7 @@ import {MineComponent} from './mine/mine.component';
...
@@ -254,6 +256,7 @@ import {MineComponent} from './mine/mine.component';
WarnListComponent
,
WarnListComponent
,
PauseComponent
PauseComponent
],
],
schemas
:
[
CUSTOM_ELEMENTS_SCHEMA
,
NO_ERRORS_SCHEMA
],
schemas
:
[
CUSTOM_ELEMENTS_SCHEMA
,
NO_ERRORS_SCHEMA
],
})
})
export
class
AppMainModule
{
}
export
class
AppMainModule
{
}
src/main/webapp/app/app.service.ts
View file @
43458f66
...
@@ -4,7 +4,7 @@ import {BehaviorSubject, Subscription} from 'rxjs';
...
@@ -4,7 +4,7 @@ import {BehaviorSubject, Subscription} from 'rxjs';
@
Injectable
()
@
Injectable
()
export
class
AppService
{
export
class
AppService
{
private
themeSource
:
BehaviorSubject
<
string
>
=
new
BehaviorSubject
(
'
white
'
);
private
themeSource
:
BehaviorSubject
<
string
>
=
new
BehaviorSubject
(
'
dark
'
);
public
theme
=
this
.
themeSource
.
asObservable
();
public
theme
=
this
.
themeSource
.
asObservable
();
public
setTheme
(
value
:
string
){
public
setTheme
(
value
:
string
){
...
...
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.html
View file @
43458f66
...
@@ -119,30 +119,6 @@
...
@@ -119,30 +119,6 @@
</nz-collapse-panel>
</nz-collapse-panel>
</nz-collapse>
</nz-collapse>
</div>
</div>
<!--<div nz-row>-->
<!--<nz-table #basicTable [nzData]="dataSet" [nzFrontPagination]="false" [nzTotal]="totalNumInOut" [nzPageIndex]="pageNum" [nzPageSize]="pageCount" (nzPageIndexChange)="changeInoutInfo($event)" [nzLoading]="inOutLoading">-->
<!--<thead>-->
<!--<tr>-->
<!--<th>状态</th>-->
<!--<th>接口</th>-->
<!--<th>进流量</th>-->
<!--<th>出流量</th>-->
<!--<th>状态变更时间</th>-->
<!--<!–<th nzWidth="150px">图表</th>–>-->
<!--</tr>-->
<!--</thead>-->
<!--<tbody>-->
<!--<tr *ngFor="let data of basicTable.data">-->
<!--<td>{{data.state}}</td>-->
<!--<td>{{data.name}}</td>-->
<!--<td>{{data.in}}</td>-->
<!--<td>{{data.out}}</td>-->
<!--<td>{{data.changeState}}</td>-->
<!--<!–<td>图表</td>–>-->
<!--</tr>-->
<!--</tbody>-->
<!--</nz-table>-->
<!--</div>-->
</section>
</section>
</nz-tab>
</nz-tab>
<nz-tab
nzTitle=
"监测点列表"
>
<nz-tab
nzTitle=
"监测点列表"
>
...
@@ -151,7 +127,7 @@
...
@@ -151,7 +127,7 @@
<button
(
click
)="
getCheckList
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-search"
style=
"color: #6097b7"
></i>
搜索
</button>
<button
(
click
)="
getCheckList
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-search"
style=
"color: #6097b7"
></i>
搜索
</button>
</div>
</div>
<div
class=
"padding-15-0"
>
<div
class=
"padding-15-0"
>
<nz-radio-group
[(
ngModel
)]="
itemTypeValue
"
[
nzButtonStyle
]="'
solid
'"
>
<nz-radio-group
[(
ngModel
)]="
itemTypeValue
"
>
<label
*
ngFor=
"let item of itemTypeList"
(
click
)="
changeType
(
item
)"
nz-radio-button
[
nzValue
]="
item
.
applicationid
"
>
{{item.name}}
</label>
<label
*
ngFor=
"let item of itemTypeList"
(
click
)="
changeType
(
item
)"
nz-radio-button
[
nzValue
]="
item
.
applicationid
"
>
{{item.name}}
</label>
</nz-radio-group>
</nz-radio-group>
</div>
</div>
...
...
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.ts
View file @
43458f66
...
@@ -21,26 +21,22 @@ import {ThresholdComponent} from '../../../modal/threshold/threshold.component';
...
@@ -21,26 +21,22 @@ import {ThresholdComponent} from '../../../modal/threshold/threshold.component';
left: 233px;
left: 233px;
z-index: 989;
z-index: 989;
}
}
.time-select{
.time-select {
position: absolute;
position: absolute;
top: 55px;
top: 55px;
right: 15px;
right: 15px;
z-index: 999;
z-index: 999;
}
}
.select-border{
.select-border {
border: 1px solid #6097b7;
border: 1px solid #6097b7;
border-radius: 5px;
border-radius: 5px;
padding: 2px;
padding: 2px;
margin-right: 5px;
margin-right: 5px;
}
}
:host ::ng-deep .tabs-smart .ant-tabs-nav-scroll div.ant-tabs-tab:nth-child(3){
:host ::ng-deep .tabs-smart .ant-tabs-nav-scroll div.ant-tabs-tab:nth-child(3) {
margin-right: 180px !important;
margin-right: 180px !important;
}
}
:host ::ng-deep .ant-radio-button-wrapper{
:host ::ng-deep .ant-radio-button-wrapper {
margin: 4px;
margin: 4px;
}
}
`
`
...
@@ -51,8 +47,8 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -51,8 +47,8 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
@
ViewChild
(
'smartThreshold'
)
smartThreshold
:
ThresholdComponent
;
@
ViewChild
(
'smartThreshold'
)
smartThreshold
:
ThresholdComponent
;
@
ViewChild
(
'thirdTabs'
)
thirdTabs
:
ElementRef
;
@
ViewChild
(
'thirdTabs'
)
thirdTabs
:
ElementRef
;
@
ViewChild
(
'warnList'
)
warnList
:
WarnListComponent
;
@
ViewChild
(
'warnList'
)
warnList
:
WarnListComponent
;
@
ViewChild
(
'colorEle'
)
colorEle
:
ElementRef
;
@
ViewChild
(
'colorEle'
)
colorEle
:
ElementRef
;
@
ViewChild
(
'checkEle'
)
checkEle
:
ElementRef
;
@
ViewChild
(
'checkEle'
)
checkEle
:
ElementRef
;
color
=
color
;
color
=
color
;
loading
=
false
;
loading
=
false
;
hostId
:
string
;
hostId
:
string
;
...
@@ -73,7 +69,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -73,7 +69,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
secondOptionRight
;
secondOptionRight
;
dataSet
:
any
[];
dataSet
:
any
[];
panel1
=
{
active
:
true
,
name
:
'响应时间与丢包率'
,
disabled
:
false
};
panel1
=
{
active
:
true
,
name
:
'响应时间与丢包率'
,
disabled
:
false
};
panel2
=
{
active
:
true
,
name
:
'CPU使用率及内存使用率'
,
disabled
:
false
};
panel2
=
{
active
:
true
,
name
:
'CPU使用率及内存使用率'
,
disabled
:
false
};
panel3
=
{
active
:
true
,
name
:
'磁盘使用情况'
,
disabled
:
false
};
panel3
=
{
active
:
true
,
name
:
'磁盘使用情况'
,
disabled
:
false
};
//监控点
//监控点
...
@@ -127,17 +123,17 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -127,17 +123,17 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
units
;
//图表单位
units
;
//图表单位
constructor
(
private
routerInfo
:
ActivatedRoute
,
private
message
:
NzMessageService
,
constructor
(
private
routerInfo
:
ActivatedRoute
,
private
message
:
NzMessageService
,
private
overAllSer
:
OverAllService
,
private
renderer
:
Renderer
,
private
router
:
Router
,
private
overAllSer
:
OverAllService
,
private
renderer
:
Renderer
,
private
router
:
Router
,
private
fb
:
FormBuilder
,
private
modalService
:
NzModalService
,
private
datePipe
:
DatePipe
)
{
private
fb
:
FormBuilder
,
private
modalService
:
NzModalService
,
private
datePipe
:
DatePipe
)
{
this
.
routerInfo
.
queryParams
.
subscribe
(
queryParams
=>
{
this
.
routerInfo
.
queryParams
.
subscribe
(
queryParams
=>
{
this
.
hostId
=
queryParams
.
hostId
;
this
.
hostId
=
queryParams
.
hostId
;
this
.
overAllSer
.
findDetailed
(
this
.
hostId
).
subscribe
(
this
.
overAllSer
.
findDetailed
(
this
.
hostId
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
let
data
=
res
.
data
[
0
]
;
let
data
=
res
.
data
[
0
]
this
.
hostName
=
data
.
name
;
//显示名
this
.
hostName
=
data
.
name
;
//显示名
this
.
realName
=
data
.
host
;
//主机名
this
.
realName
=
data
.
host
;
//主机名
}
}
)
;
)
});
});
}
}
...
@@ -159,7 +155,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -159,7 +155,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
}
}
ngAfterViewInit
()
{
ngAfterViewInit
()
{
this
.
checkEle
.
nativeElement
.
children
[
1
].
children
[
0
].
children
[
0
].
children
[
2
].
children
[
0
].
children
[
0
].
children
[
2
].
style
.
marginRight
=
this
.
colorEle
.
nativeElement
.
offsetWidth
+
'px'
;
this
.
checkEle
.
nativeElement
.
children
[
1
].
children
[
0
].
children
[
0
].
children
[
2
].
children
[
0
].
children
[
0
].
children
[
2
].
style
.
marginRight
=
this
.
colorEle
.
nativeElement
.
offsetWidth
+
'px'
;
}
}
//平均响应时间
//平均响应时间
...
@@ -224,7 +220,10 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -224,7 +220,10 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
}
}
]
]
};
};
}
else
{
this
.
message
.
info
(
res
.
errMsg
);
}
}
}
}
);
);
}
}
...
@@ -291,7 +290,10 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -291,7 +290,10 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
}
}
]
]
};
};
}
else
{
this
.
message
.
info
(
res
.
errMsg
);
}
}
}
}
);
);
}
}
...
@@ -361,7 +363,10 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -361,7 +363,10 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
}
}
]
]
};
};
}
else
{
this
.
message
.
info
(
res
.
errMsg
);
}
}
}
}
);
);
}
}
...
@@ -477,10 +482,10 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -477,10 +482,10 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
data
:
res
.
data
.
disks
.
map
((
item
)
=>
{
data
:
res
.
data
.
disks
.
map
((
item
)
=>
{
return
item
.
name
;
return
item
.
name
;
}),
}),
axisLabel
:
res
.
data
.
disks
.
map
((
item
)
=>
{
axisLabel
:
res
.
data
.
disks
.
map
((
item
)
=>
{
let
data
=
item
.
name
;
let
data
=
item
.
name
;
if
(
data
.
length
>
5
)
{
if
(
data
.
length
>
5
)
{
data
=
data
.
substring
(
0
,
4
)
+
'..'
;
data
=
data
.
substring
(
0
,
4
)
+
".."
;
}
}
return
data
;
return
data
;
}),
}),
...
@@ -507,7 +512,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -507,7 +512,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
},
},
},
},
data
:
res
.
data
.
disks
.
map
((
item
)
=>
{
data
:
res
.
data
.
disks
.
map
((
item
)
=>
{
const
pre
=
(
(
item
.
used
/
item
.
total
)
*
100
).
toFixed
(
2
);
//已使用百分比
const
pre
=
(
(
item
.
used
/
item
.
total
)
*
100
).
toFixed
(
2
);
//已使用百分比
return
pre
;
return
pre
;
})
})
},
},
...
@@ -532,7 +537,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -532,7 +537,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
},
},
},
},
data
:
res
.
data
.
disks
.
map
((
item
)
=>
{
data
:
res
.
data
.
disks
.
map
((
item
)
=>
{
const
pre
=
(
(
item
.
total
-
item
.
used
)
/
(
item
.
total
)
*
100
).
toFixed
(
2
);
//剩余百分比
const
pre
=
(
(
item
.
total
-
item
.
used
)
/
(
item
.
total
)
*
100
).
toFixed
(
2
);
//剩余百分比
return
pre
;
return
pre
;
})
})
},
},
...
@@ -551,12 +556,12 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -551,12 +556,12 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
const
arr
=
[
const
arr
=
[
{
{
name
:
'已使用'
,
name
:
"已使用"
,
value
:
used
,
value
:
used
,
},
},
{
{
name
:
'未使用'
,
name
:
"未使用"
,
value
:
total
,
value
:
total
,
}
}
];
];
...
@@ -569,7 +574,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -569,7 +574,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
trigger
:
'item'
,
trigger
:
'item'
,
formatter
:
'{a} <br/>{b} : {c} ({d}%)'
formatter
:
'{a} <br/>{b} : {c} ({d}%)'
},
},
color
:
[
'#3194e0'
,
'#bfbfbf'
],
color
:
[
'#3194e0'
,
'#bfbfbf'
],
series
:
[
series
:
[
{
{
name
:
''
,
name
:
''
,
...
@@ -604,6 +609,10 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -604,6 +609,10 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
);
);
}
}
extension
(){
}
add
(
arr
)
{
add
(
arr
)
{
let
total
=
0
;
let
total
=
0
;
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
...
@@ -616,19 +625,19 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -616,19 +625,19 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
inOutInfo
()
{
inOutInfo
()
{
this
.
inOutLoading
=
true
;
this
.
inOutLoading
=
true
;
const
data
=
{
const
data
=
{
obj
:
{
obj
:{
hostid
:
Number
(
this
.
hostId
)
hostid
:
Number
(
this
.
hostId
)
},
},
pageNum
:
this
.
pageNum
,
pageNum
:
this
.
pageNum
,
pageCount
:
this
.
pageCount
pageCount
:
this
.
pageCount
}
;
}
this
.
overAllSer
.
inOutInfoSnmp
(
data
).
subscribe
(
this
.
overAllSer
.
inOutInfoSnmp
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
dataSet
=
res
.
data
.
data
;
this
.
dataSet
=
res
.
data
.
data
;
this
.
inOutLoading
=
false
;
this
.
inOutLoading
=
false
;
this
.
totalNumInOut
=
res
.
data
.
totalNum
;
this
.
totalNumInOut
=
res
.
data
.
totalNum
;
}
else
{
}
else
{
this
.
message
.
info
(
res
.
errMsg
);
this
.
message
.
info
(
res
.
errMsg
);
}
}
}
}
...
@@ -636,33 +645,33 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -636,33 +645,33 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
}
}
//进出口流量 翻页
//进出口流量 翻页
changeInoutInfo
(
e
)
{
changeInoutInfo
(
e
){
this
.
pageNum
=
e
;
this
.
pageNum
=
e
;
// this.inOutInfo();
// this.inOutInfo();
}
}
//添加监测点
//添加监测点
showCheckModal
()
{
showCheckModal
()
{
this
.
smartCheck
.
showAddModal
(
this
.
hostId
,
this
.
realName
,
'添加监测点'
);
this
.
smartCheck
.
showAddModal
(
this
.
hostId
,
this
.
realName
,
'添加监测点'
);
}
}
//编辑监测点
//编辑监测点
showEditModal
(
item
)
{
showEditModal
(
item
){
this
.
smartCheck
.
showEditModal
(
this
.
hostId
,
item
.
itemid
,
this
.
realName
,
item
.
templateid
,
'编辑监测点'
);
this
.
smartCheck
.
showEditModal
(
this
.
hostId
,
item
.
itemid
,
this
.
realName
,
item
.
templateid
,
'编辑监测点'
);
}
}
//添加阈值
//添加阈值
showAddThresholdModal
(
item
)
{
showAddThresholdModal
(
item
){
this
.
smartThreshold
.
showAddModal
(
'添加阈值'
,
item
.
itemid
,
this
.
realName
);
this
.
smartThreshold
.
showAddModal
(
"添加阈值"
,
item
.
itemid
,
this
.
realName
);
}
}
//编辑阈值
//编辑阈值
showEditThresholdModal
(
item
)
{
showEditThresholdModal
(
item
){
this
.
smartThreshold
.
showEditModal
(
'编辑阈值'
,
item
.
itemid
,
this
.
hostId
,
this
.
realName
);
this
.
smartThreshold
.
showEditModal
(
"编辑阈值"
,
item
.
itemid
,
this
.
hostId
,
this
.
realName
);
}
}
//添加or编辑监测点 之后
//添加or编辑监测点 之后
getList
()
{
getList
(){
this
.
getCheckList
();
this
.
getCheckList
();
this
.
findItemType
();
this
.
findItemType
();
}
}
...
@@ -682,11 +691,11 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -682,11 +691,11 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
const
data
=
{
const
data
=
{
pageNum
:
this
.
pageIndex
,
pageNum
:
this
.
pageIndex
,
pageCount
:
pageSize
,
pageCount
:
pageSize
,
obj
:
{
obj
:{
applicationid
:
this
.
applicationId
,
applicationid
:
this
.
applicationId
,
hostid
:
this
.
hostId
,
hostid
:
this
.
hostId
,
priorityName
:
this
.
changeStates
,
priorityName
:
this
.
changeStates
,
name
:
this
.
searchName
name
:
this
.
searchName
}
}
};
};
this
.
overAllSer
.
findCheckByType
(
data
).
subscribe
(
this
.
overAllSer
.
findCheckByType
(
data
).
subscribe
(
...
@@ -698,7 +707,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -698,7 +707,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
);
);
}
}
changeState
(
state
)
{
changeState
(
state
){
this
.
tabNum
=
1
;
this
.
tabNum
=
1
;
this
.
changeStates
=
state
;
this
.
changeStates
=
state
;
this
.
getCheckList
();
this
.
getCheckList
();
...
@@ -712,7 +721,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -712,7 +721,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
changeType
(
item
)
{
changeType
(
item
)
{
this
.
pageIndex
=
1
;
this
.
pageIndex
=
1
;
if
(
item
.
name
==
'全部'
)
{
if
(
item
.
name
==
"全部"
)
{
this
.
changeStates
=
null
;
this
.
changeStates
=
null
;
}
}
this
.
applicationId
=
item
.
applicationid
;
this
.
applicationId
=
item
.
applicationid
;
...
@@ -723,7 +732,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -723,7 +732,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
getCheckStatus
()
{
getCheckStatus
()
{
this
.
overAllSer
.
findItemCount
(
this
.
hostId
).
subscribe
(
this
.
overAllSer
.
findItemCount
(
this
.
hostId
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
checkStatus
=
res
.
data
;
this
.
checkStatus
=
res
.
data
;
}
}
}
}
...
@@ -739,8 +748,8 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -739,8 +748,8 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
nzOkType
:
'danger'
,
nzOkType
:
'danger'
,
nzOnOk
:
()
=>
{
nzOnOk
:
()
=>
{
const
data
=
{
const
data
=
{
itemids
:
[
item
.
itemid
],
itemids
:[
item
.
itemid
],
templateid
:
item
.
templateid
templateid
:
item
.
templateid
};
};
this
.
overAllSer
.
deleteItem
(
data
).
subscribe
(
this
.
overAllSer
.
deleteItem
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
...
@@ -767,9 +776,9 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -767,9 +776,9 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
}
}
//获取图表数据
//获取图表数据
getGraphDate
()
{
getGraphDate
(){
const
data
=
{
const
data
=
{
date
:
this
.
datePipe
.
transform
(
this
.
imageSelectDate
,
'yyyy-MM-dd'
),
date
:
this
.
datePipe
.
transform
(
this
.
imageSelectDate
,
'yyyy-MM-dd'
),
itemid
:
this
.
selectGraphadata
.
itemid
itemid
:
this
.
selectGraphadata
.
itemid
};
};
this
.
overAllSer
.
findGraphData
(
data
).
subscribe
(
this
.
overAllSer
.
findGraphData
(
data
).
subscribe
(
...
@@ -792,9 +801,9 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -792,9 +801,9 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
splitLine
:
{
splitLine
:
{
show
:
false
show
:
false
},
},
axisLabel
:
{
//Y轴数据
axisLabel
:{
//Y轴数据
formatter
:
(
value
)
=>
{
formatter
:
(
value
)
=>
{
return
value
+
' '
+
this
.
selectGraphadata
.
units
;
//负数取绝对值变正数
return
value
+
" "
+
this
.
selectGraphadata
.
units
;
//负数取绝对值变正数
},
},
},
},
},
},
...
@@ -806,7 +815,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -806,7 +815,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
series
:
{
series
:
{
type
:
'line'
,
type
:
'line'
,
data
:
result
.
map
((
item
)
=>
{
data
:
result
.
map
((
item
)
=>
{
return
item
.
value
;
return
item
.
value
;
}),
}),
}
}
...
@@ -831,10 +840,10 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -831,10 +840,10 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
(
res
)
=>
{
(
res
)
=>
{
this
.
itemTypeList
=
res
.
data
;
this
.
itemTypeList
=
res
.
data
;
const
data
=
{
const
data
=
{
applicationid
:
''
,
applicationid
:
''
,
name
:
'全部'
name
:
'全部'
};
};
if
(
null
!=
res
.
data
)
{
if
(
null
!=
res
.
data
)
{
this
.
itemTypeList
.
unshift
(
data
);
this
.
itemTypeList
.
unshift
(
data
);
}
}
this
.
itemTypeValue
=
''
;
this
.
itemTypeValue
=
''
;
...
@@ -878,7 +887,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -878,7 +887,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
nzOkType
:
'danger'
,
nzOkType
:
'danger'
,
nzOnOk
:
()
=>
{
nzOnOk
:
()
=>
{
const
data
=
{
const
data
=
{
hostids
:
[]
hostids
:[]
};
};
data
.
hostids
.
push
(
this
.
hostId
);
data
.
hostids
.
push
(
this
.
hostId
);
this
.
overAllSer
.
deleteHostPost
(
data
).
subscribe
(
this
.
overAllSer
.
deleteHostPost
(
data
).
subscribe
(
...
@@ -897,4 +906,3 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -897,4 +906,3 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
});
});
}
}
}
}
src/main/webapp/app/overAll/modal/server/server.component.html
View file @
43458f66
...
@@ -23,12 +23,13 @@
...
@@ -23,12 +23,13 @@
<div
class=
"padding-10"
style=
"height: 40%;position: relative"
>
<div
class=
"padding-10"
style=
"height: 40%;position: relative"
>
<p
class=
"host-item-title"
>
分区
</p>
<p
class=
"host-item-title"
>
分区
</p>
<div
class=
"time-group"
style=
"top: 18px;"
>
<div
class=
"time-group"
style=
"top: 18px;"
>
<nz-select
style=
"width: 150px;"
nzPlaceHolder=
"选择磁盘"
<nz-select
style=
"width: 150px;"
nzPlaceHolder=
"选择磁盘"
(
ngModelChange
)="
setDiskChart
($
event
)"
(
ngModelChange
)="
setDiskChart
($
event
)"
[(
ngModel
)]="
diskType
"
>
[(
ngModel
)]="
diskType
"
>
<ng-container
*
ngFor=
"let disk of hostObj.disk;let i = index;"
>
<ng-container
*
ngFor=
"let disk of hostObj.disk;let i = index;"
>
<nz-option
[
nzLabel
]="
disk
.
name
"
[
nzValue
]="
i
"
></nz-option>
<nz-option
[
nzLabel
]="
disk
.
name
"
[
nzValue
]="
i
"
></nz-option>
</ng-container>
</ng-container>
</nz-select>
</nz-select>
</div>
</div>
<div
class=
"host-item-content"
style=
"height: 300px;"
>
<div
class=
"host-item-content"
style=
"height: 300px;"
>
<ng-container
*
ngIf=
"noData"
>
<ng-container
*
ngIf=
"noData"
>
...
@@ -44,15 +45,15 @@
...
@@ -44,15 +45,15 @@
</div>
</div>
<nz-row>
<nz-row>
<nz-col
nzSpan=
"12"
>
总大小:
</nz-col>
<nz-col
nzSpan=
"12"
>
总大小:
</nz-col>
<nz-col
nzSpan=
"12"
>
{{hostObj.disk[diskType].total |
| '-'
}}
</nz-col>
<nz-col
nzSpan=
"12"
>
{{hostObj.disk[diskType].total |
unitConversion
}}
</nz-col>
</nz-row>
</nz-row>
<nz-row>
<nz-row>
<nz-col
nzSpan=
"12"
>
已用大小:
</nz-col>
<nz-col
nzSpan=
"12"
>
已用大小:
</nz-col>
<nz-col
nzSpan=
"12"
>
{{hostObj.disk[diskType].use
|| '-'
}}
</nz-col>
<nz-col
nzSpan=
"12"
>
{{hostObj.disk[diskType].use
d | unitConversion
}}
</nz-col>
</nz-row>
</nz-row>
<nz-row>
<nz-row>
<nz-col
nzSpan=
"12"
>
剩余容量:
</nz-col>
<nz-col
nzSpan=
"12"
>
剩余容量:
</nz-col>
<nz-col
nzSpan=
"12"
>
{{(hostObj.disk[diskType].total - hostObj.disk[diskType].use
) || '-'
}}
</nz-col>
<nz-col
nzSpan=
"12"
>
{{(hostObj.disk[diskType].total - hostObj.disk[diskType].use
d) | unitConversion
}}
</nz-col>
</nz-row>
</nz-row>
</nz-spin>
</nz-spin>
</ng-container>
</ng-container>
...
@@ -63,6 +64,7 @@
...
@@ -63,6 +64,7 @@
<nz-col
class=
"padding-right-10"
nzSpan=
"12"
>
<nz-col
class=
"padding-right-10"
nzSpan=
"12"
>
<p
class=
"host-item-title"
>
基本信息
</p>
<p
class=
"host-item-title"
>
基本信息
</p>
<div
class=
"host-item-content"
style=
"height: 300px;"
>
<div
class=
"host-item-content"
style=
"height: 300px;"
>
<nz-row>
<nz-row>
<nz-col
nzSpan=
"8"
>
资源状态:
</nz-col>
<nz-col
nzSpan=
"8"
>
资源状态:
</nz-col>
<nz-col
nzSpan=
"16"
>
{{server?.waringName}}
</nz-col>
<nz-col
nzSpan=
"16"
>
{{server?.waringName}}
</nz-col>
...
@@ -81,7 +83,8 @@
...
@@ -81,7 +83,8 @@
</nz-row>
</nz-row>
<nz-row>
<nz-row>
<nz-col
nzSpan=
"8"
>
资产编号:
</nz-col>
<nz-col
nzSpan=
"8"
>
资产编号:
</nz-col>
<nz-col
nzSpan=
"16"
>
{{server?.inventory?.no || '-'}}
</nz-col>
<nz-col
nzSpan=
"16"
>
{{server?.inventory?.inventoryNo || '-'}}
</nz-col>
</nz-row>
</nz-row>
<nz-row>
<nz-row>
<nz-col
nzSpan=
"8"
>
负责人:
</nz-col>
<nz-col
nzSpan=
"8"
>
负责人:
</nz-col>
...
@@ -105,14 +108,6 @@
...
@@ -105,14 +108,6 @@
<nz-col
nzSpan=
"16"
>
内存利用率(%):
</nz-col>
<nz-col
nzSpan=
"16"
>
内存利用率(%):
</nz-col>
<nz-col
nzSpan=
"8"
>
{{hostObj.used || '-'}}
</nz-col>
<nz-col
nzSpan=
"8"
>
{{hostObj.used || '-'}}
</nz-col>
</nz-row>
</nz-row>
<!-- <nz-row>-->
<!-- <nz-col nzSpan="16">CPU个数:</nz-col>-->
<!-- <nz-col nzSpan="8">100</nz-col>-->
<!-- </nz-row>-->
<!-- <nz-row>-->
<!-- <nz-col nzSpan="16">接口数:</nz-col>-->
<!-- <nz-col nzSpan="8">100</nz-col>-->
<!-- </nz-row>-->
</div>
</div>
</nz-col>
</nz-col>
...
...
src/main/webapp/app/overAll/modal/switch/switch.component.html
View file @
43458f66
...
@@ -32,7 +32,9 @@
...
@@ -32,7 +32,9 @@
</nz-row>
</nz-row>
<nz-row>
<nz-row>
<nz-col
nzSpan=
"8"
>
IP地址:
</nz-col>
<nz-col
nzSpan=
"8"
>
IP地址:
</nz-col>
<nz-col
nzSpan=
"16"
>
{{switch?.ip || '-'}}
</nz-col>
<nz-col
nzSpan=
"16"
>
{{switch?.host || '-'}}
</nz-col>
</nz-row>
</nz-row>
<nz-row>
<nz-row>
<nz-col
nzSpan=
"8"
>
设备类型:
</nz-col>
<nz-col
nzSpan=
"8"
>
设备类型:
</nz-col>
...
@@ -40,7 +42,8 @@
...
@@ -40,7 +42,8 @@
</nz-row>
</nz-row>
<nz-row>
<nz-row>
<nz-col
nzSpan=
"8"
>
资产编号:
</nz-col>
<nz-col
nzSpan=
"8"
>
资产编号:
</nz-col>
<nz-col
nzSpan=
"16"
>
{{switch?.inventory?.no || '-'}}
</nz-col>
<nz-col
nzSpan=
"16"
>
{{switch?.inventory?.inventoryNo || '-'}}
</nz-col>
</nz-row>
</nz-row>
<nz-row>
<nz-row>
<nz-col
nzSpan=
"8"
>
负责人:
</nz-col>
<nz-col
nzSpan=
"8"
>
负责人:
</nz-col>
...
@@ -53,19 +56,21 @@
...
@@ -53,19 +56,21 @@
<div
class=
"host-item-content"
style=
"height: 100%;"
>
<div
class=
"host-item-content"
style=
"height: 100%;"
>
<nz-row>
<nz-row>
<nz-col
nzSpan=
"8"
>
CPU利用率(%):
</nz-col>
<nz-col
nzSpan=
"8"
>
CPU利用率(%):
</nz-col>
<nz-col
nzSpan=
"16"
>
{{hostObj.cpu}}
</nz-col>
<nz-col
nzSpan=
"16"
>
{{hostObj.cpu || '-'}}
</nz-col>
</nz-row>
</nz-row>
<nz-row>
<nz-row>
<nz-col
nzSpan=
"8"
>
Ping延时(ms):
</nz-col>
<nz-col
nzSpan=
"8"
>
Ping延时(ms):
</nz-col>
<nz-col
nzSpan=
"16"
>
{{hostObj.response}}
</nz-col>
<nz-col
nzSpan=
"16"
>
{{hostObj.response
|| '-'
}}
</nz-col>
</nz-row>
</nz-row>
<nz-row>
<nz-row>
<nz-col
nzSpan=
"8"
>
丢包数:
</nz-col>
<nz-col
nzSpan=
"8"
>
丢包数:
</nz-col>
<nz-col
nzSpan=
"16"
>
{{hostObj.losed}}
</nz-col>
<nz-col
nzSpan=
"16"
>
{{hostObj.losed
|| '-'
}}
</nz-col>
</nz-row>
</nz-row>
<nz-row>
<nz-row>
<nz-col
nzSpan=
"8"
>
内存利用率(%):
</nz-col>
<nz-col
nzSpan=
"8"
>
内存利用率(%):
</nz-col>
<nz-col
nzSpan=
"16"
>
{{hostObj.used}}
</nz-col>
<nz-col
nzSpan=
"16"
>
{{hostObj.used || '-'}}
</nz-col>
</nz-row>
</nz-row>
</div>
</div>
</div>
</div>
...
...
src/main/webapp/app/overAll/modal/switch/switch.component.ts
View file @
43458f66
...
@@ -33,7 +33,6 @@ export class SwitchComponent implements OnInit {
...
@@ -33,7 +33,6 @@ export class SwitchComponent implements OnInit {
isNetworkLoading
=
false
;
isNetworkLoading
=
false
;
chartNetworkOption
;
chartNetworkOption
;
isTrendLoading
=
false
;
isTrendLoading
=
false
;
chartTrendOption
;
chartTrendOption
;
...
@@ -131,7 +130,7 @@ export class SwitchComponent implements OnInit {
...
@@ -131,7 +130,7 @@ export class SwitchComponent implements OnInit {
this
.
overAllSer
.
responseTime
(
this
.
hostId
).
subscribe
(
this
.
overAllSer
.
responseTime
(
this
.
hostId
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
data
)
{
if
(
res
.
data
)
{
this
.
hostObj
.
response
=
res
.
data
.
response
;
this
.
hostObj
.
response
=
res
.
data
.
response
Time
;
}
else
{
}
else
{
this
.
hostObj
.
response
=
0
;
this
.
hostObj
.
response
=
0
;
}
}
...
...
src/main/webapp/app/shared/pipe/pipe.module.ts
0 → 100644
View file @
43458f66
import
{
NgModule
,
CUSTOM_ELEMENTS_SCHEMA
}
from
'@angular/core'
;
import
{
UnitConversionPipe
}
from
'./unit-conversion/unit-conversion.pipe'
;
@
NgModule
({
imports
:
[
],
declarations
:
[
UnitConversionPipe
],
providers
:
[
],
entryComponents
:
[],
exports
:
[
UnitConversionPipe
],
schemas
:
[
CUSTOM_ELEMENTS_SCHEMA
]
})
export
class
PipeModule
{}
src/main/webapp/app/shared/pipe/unit-conversion/unit-conversion.pipe.ts
0 → 100644
View file @
43458f66
import
{
Pipe
,
PipeTransform
}
from
'@angular/core'
;
@
Pipe
({
name
:
'unitConversion'
})
export
class
UnitConversionPipe
implements
PipeTransform
{
transform
(
value
:
any
,
args
?:
any
):
any
{
console
.
log
(
value
);
let
res
=
''
;
let
Gbps
=
1000
*
1000
*
1000
;
let
Mbps
=
1000
*
1000
;
let
kbps
=
1000
;
let
size
=
Math
.
abs
(
value
);
if
(
size
/
Gbps
>
1
)
{
res
+=
(
size
/
Gbps
).
toFixed
(
2
)
+
'Gbps'
;
}
else
if
(
size
/
Mbps
>
1
)
{
res
+=
(
size
/
Mbps
).
toFixed
(
2
)
+
'Mbps'
;
}
else
if
(
size
/
kbps
>
1
)
{
res
+=
(
size
/
kbps
).
toFixed
(
2
)
+
'kbps'
;
}
else
{
res
+=
(
size
)
+
'bps'
;
}
return
res
;
}
}
src/main/webapp/app/shared/shared.module.ts
View file @
43458f66
...
@@ -19,13 +19,15 @@ import {ReactiveFormsModule} from '@angular/forms';
...
@@ -19,13 +19,15 @@ import {ReactiveFormsModule} from '@angular/forms';
import
{
CommonService
}
from
'./common/common.service'
;
import
{
CommonService
}
from
'./common/common.service'
;
import
{
UtilService
}
from
'./common/util.service'
;
import
{
UtilService
}
from
'./common/util.service'
;
import
{
DisableControlDirective
}
from
'./common/disable-control.directive'
;
import
{
DisableControlDirective
}
from
'./common/disable-control.directive'
;
import
{
PipeModule
}
from
'./pipe/pipe.module'
;
@
NgModule
({
@
NgModule
({
imports
:
[
imports
:
[
ReactiveFormsModule
,
ReactiveFormsModule
,
NgZorroAntdModule
,
NgZorroAntdModule
,
BootappSharedLibsModule
,
BootappSharedLibsModule
,
BootappSharedCommonModule
BootappSharedCommonModule
,
PipeModule
,
],
],
declarations
:
[
declarations
:
[
JhiLoginModalComponent
,
JhiLoginModalComponent
,
...
...
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