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
e4163f54
Commit
e4163f54
authored
Aug 08, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pipe
parent
f04460a2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
75 additions
and
28 deletions
+75
-28
app.main.module.ts
src/main/webapp/app/app.main.module.ts
+2
-0
basic-detail.component.html
...pp/overAll/basic/basic-detail/basic-detail.component.html
+1
-25
basic.component.ts
src/main/webapp/app/overAll/basic/basic.component.ts
+0
-0
server.component.html
...ain/webapp/app/overAll/modal/server/server.component.html
+2
-2
common.service.ts
src/main/webapp/app/shared/common/common.service.ts
+19
-0
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 @
e4163f54
...
@@ -120,6 +120,7 @@ import {CostComponent} from './work/modal/cost/cost.component';
...
@@ -120,6 +120,7 @@ import {CostComponent} from './work/modal/cost/cost.component';
import
{
CommonProblemComponent
}
from
'./knowladge/common-problem/common-problem.component'
;
import
{
CommonProblemComponent
}
from
'./knowladge/common-problem/common-problem.component'
;
import
{
InformationTechComponent
}
from
'./knowladge/information-tech/information-tech.component'
;
import
{
InformationTechComponent
}
from
'./knowladge/information-tech/information-tech.component'
;
import
{
ManagementSystemComponent
}
from
'./knowladge/management-system/management-system.component'
;
import
{
ManagementSystemComponent
}
from
'./knowladge/management-system/management-system.component'
;
import
{
PipeModule
}
from
'./shared/pipe/pipe.module'
;
@
NgModule
({
@
NgModule
({
imports
:
[
imports
:
[
...
@@ -128,6 +129,7 @@ import {ManagementSystemComponent} from './knowladge/management-system/managemen
...
@@ -128,6 +129,7 @@ import {ManagementSystemComponent} from './knowladge/management-system/managemen
NgxEchartsModule
,
NgxEchartsModule
,
FormsModule
,
FormsModule
,
ReactiveFormsModule
,
ReactiveFormsModule
,
PipeModule
,
NgZorroAntdModule
.
forRoot
()
NgZorroAntdModule
.
forRoot
()
],
],
declarations
:
[
declarations
:
[
...
...
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.html
View file @
e4163f54
...
@@ -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.component.ts
View file @
e4163f54
This diff is collapsed.
Click to expand it.
src/main/webapp/app/overAll/modal/server/server.component.html
View file @
e4163f54
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
</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>
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
</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"
>
{{server?.
ip
|| '-'}}
</nz-col>
<nz-col
nzSpan=
"16"
>
{{server?.
host
|| '-'}}
</nz-col>
</nz-row>
</nz-row>
<nz-row>
<nz-row>
<nz-col
nzSpan=
"8"
>
设备类型:
</nz-col>
<nz-col
nzSpan=
"8"
>
设备类型:
</nz-col>
...
...
src/main/webapp/app/shared/common/common.service.ts
View file @
e4163f54
...
@@ -225,4 +225,23 @@ export class CommonService implements OnInit {
...
@@ -225,4 +225,23 @@ export class CommonService implements OnInit {
}
}
return
obj
;
return
obj
;
}
}
//内存单位换算
unitConversion
(
unit
){
let
res
;
let
Gbps
=
1000
*
1000
*
1000
;
let
Mbps
=
1000
*
1000
;
let
kbps
=
1000
;
let
size
=
Math
.
abs
(
unit
);
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/pipe/pipe.module.ts
0 → 100644
View file @
e4163f54
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 @
e4163f54
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 @
e4163f54
...
@@ -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