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
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
88 additions
and
60 deletions
+88
-60
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
+0
-0
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
{
CommonModule
}
from
'@angular/common'
;
import
{
NgxEchartsModule
}
from
"ngx-echarts"
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
NgxEchartsModule
}
from
'ngx-echarts'
;
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
{
AlarmLogComponent
}
from
'./alarm/alarm-log/alarm-log.component'
;
import
{
AlarmSetComponent
}
from
'./alarm/alarm-set/alarm-set.component'
;
...
...
@@ -111,14 +111,16 @@ import {DisableControlDirective} from './shared/common/disable-control.directive
import
{
SelectTriggerComponent
}
from
'./modal/select-trigger/select-trigger.component'
;
import
{
WebModalComponent
}
from
'./modal/web-modal/web-modal.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
{
DatabaseComponent
}
from
'./overAll/modal/database/database.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'
;
@
NgModule
({
imports
:
[
PipeModule
,
RouterModule
,
CommonModule
,
NgxEchartsModule
,
...
...
@@ -229,13 +231,13 @@ import {MineComponent} from './mine/mine.component';
SelectTriggerComponent
,
WebModalComponent
,
WorkReportComponent
,
SignalComponent
,
ServerComponent
,
DatabaseComponent
,
SwitchComponent
,
SignalComponent
,
MineComponent
,
],
providers
:[
providers
:
[
OverAllService
,
SystemService
,
AlarmService
,
...
...
@@ -243,9 +245,9 @@ import {MineComponent} from './mine/mine.component';
AnalysisService
,
WorkService
,
BusinessService
,
{
provide
:
NZ_I18N
,
useValue
:
zh_CN
},
{
provide
:
NZ_I18N
,
useValue
:
zh_CN
},
],
exports
:[
exports
:
[
BasiCheckComponent
,
BasicEditComponent
,
BasicKeyComponent
,
...
...
@@ -254,6 +256,7 @@ import {MineComponent} from './mine/mine.component';
WarnListComponent
,
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';
@
Injectable
()
export
class
AppService
{
private
themeSource
:
BehaviorSubject
<
string
>
=
new
BehaviorSubject
(
'
white
'
);
private
themeSource
:
BehaviorSubject
<
string
>
=
new
BehaviorSubject
(
'
dark
'
);
public
theme
=
this
.
themeSource
.
asObservable
();
public
setTheme
(
value
:
string
){
...
...
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.html
View file @
43458f66
...
...
@@ -119,30 +119,6 @@
</nz-collapse-panel>
</nz-collapse>
</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>
</nz-tab>
<nz-tab
nzTitle=
"监测点列表"
>
...
...
@@ -151,7 +127,7 @@
<button
(
click
)="
getCheckList
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-search"
style=
"color: #6097b7"
></i>
搜索
</button>
</div>
<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>
</nz-radio-group>
</div>
...
...
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.ts
View file @
43458f66
This diff is collapsed.
Click to expand it.
src/main/webapp/app/overAll/modal/server/server.component.html
View file @
43458f66
...
...
@@ -23,12 +23,13 @@
<div
class=
"padding-10"
style=
"height: 40%;position: relative"
>
<p
class=
"host-item-title"
>
分区
</p>
<div
class=
"time-group"
style=
"top: 18px;"
>
<nz-select
style=
"width: 150px;"
nzPlaceHolder=
"选择磁盘"
(
ngModelChange
)="
setDiskChart
($
event
)"
[(
ngModel
)]="
diskType
"
>
<nz-select
style=
"width: 150px;"
nzPlaceHolder=
"选择磁盘"
(
ngModelChange
)="
setDiskChart
($
event
)"
[(
ngModel
)]="
diskType
"
>
<ng-container
*
ngFor=
"let disk of hostObj.disk;let i = index;"
>
<nz-option
[
nzLabel
]="
disk
.
name
"
[
nzValue
]="
i
"
></nz-option>
</ng-container>
</nz-select>
</div>
<div
class=
"host-item-content"
style=
"height: 300px;"
>
<ng-container
*
ngIf=
"noData"
>
...
...
@@ -44,15 +45,15 @@
</div>
<nz-row>
<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-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-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-spin>
</ng-container>
...
...
@@ -63,6 +64,7 @@
<nz-col
class=
"padding-right-10"
nzSpan=
"12"
>
<p
class=
"host-item-title"
>
基本信息
</p>
<div
class=
"host-item-content"
style=
"height: 300px;"
>
<nz-row>
<nz-col
nzSpan=
"8"
>
资源状态:
</nz-col>
<nz-col
nzSpan=
"16"
>
{{server?.waringName}}
</nz-col>
...
...
@@ -81,7 +83,8 @@
</nz-row>
<nz-row>
<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-col
nzSpan=
"8"
>
负责人:
</nz-col>
...
...
@@ -105,14 +108,6 @@
<nz-col
nzSpan=
"16"
>
内存利用率(%):
</nz-col>
<nz-col
nzSpan=
"8"
>
{{hostObj.used || '-'}}
</nz-col>
</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>
</nz-col>
...
...
src/main/webapp/app/overAll/modal/switch/switch.component.html
View file @
43458f66
...
...
@@ -32,7 +32,9 @@
</nz-row>
<nz-row>
<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-col
nzSpan=
"8"
>
设备类型:
</nz-col>
...
...
@@ -40,7 +42,8 @@
</nz-row>
<nz-row>
<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-col
nzSpan=
"8"
>
负责人:
</nz-col>
...
...
@@ -53,19 +56,21 @@
<div
class=
"host-item-content"
style=
"height: 100%;"
>
<nz-row>
<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-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-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-col
nzSpan=
"8"
>
内存利用率(%):
</nz-col>
<nz-col
nzSpan=
"16"
>
{{hostObj.used}}
</nz-col>
<nz-col
nzSpan=
"16"
>
{{hostObj.used || '-'}}
</nz-col>
</nz-row>
</div>
</div>
...
...
src/main/webapp/app/overAll/modal/switch/switch.component.ts
View file @
43458f66
...
...
@@ -33,7 +33,6 @@ export class SwitchComponent implements OnInit {
isNetworkLoading
=
false
;
chartNetworkOption
;
isTrendLoading
=
false
;
chartTrendOption
;
...
...
@@ -131,7 +130,7 @@ export class SwitchComponent implements OnInit {
this
.
overAllSer
.
responseTime
(
this
.
hostId
).
subscribe
(
(
res
)
=>
{
if
(
res
.
data
)
{
this
.
hostObj
.
response
=
res
.
data
.
response
;
this
.
hostObj
.
response
=
res
.
data
.
response
Time
;
}
else
{
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';
import
{
CommonService
}
from
'./common/common.service'
;
import
{
UtilService
}
from
'./common/util.service'
;
import
{
DisableControlDirective
}
from
'./common/disable-control.directive'
;
import
{
PipeModule
}
from
'./pipe/pipe.module'
;
@
NgModule
({
imports
:
[
ReactiveFormsModule
,
NgZorroAntdModule
,
BootappSharedLibsModule
,
BootappSharedCommonModule
BootappSharedCommonModule
,
PipeModule
,
],
declarations
:
[
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