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
8ed14360
Commit
8ed14360
authored
Dec 07, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
327d3283
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
158 additions
and
30 deletions
+158
-30
flow-trend.component.html
...bapp/app/netTopology/flow-trend/flow-trend.component.html
+12
-8
flow-trend.component.ts
...webapp/app/netTopology/flow-trend/flow-trend.component.ts
+122
-13
ne-topology.component.html
...pp/app/netTopology/ne-topology/ne-topology.component.html
+0
-0
topology-img.component.html
.../app/netTopology/topology-img/topology-img.component.html
+0
-1
basic-detail.component.ts
.../app/overAll/basic/basic-detail/basic-detail.component.ts
+1
-3
role.component.html
src/main/webapp/app/system/modal/role/role.component.html
+1
-1
role.component.ts
src/main/webapp/app/system/modal/role/role.component.ts
+14
-2
power.component.ts
src/main/webapp/app/system/power/power.component.ts
+8
-2
No files found.
src/main/webapp/app/netTopology/flow-trend/flow-trend.component.html
View file @
8ed14360
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
</nz-select>
</nz-select>
</div>
</div>
<div
nz-col
nzSpan=
"3"
>
<div
nz-col
nzSpan=
"3"
>
<nz-select
style=
"width: 100%;"
nzShowSearch
nzAllowClear
nzPlaceHolder=
"选择告资源"
[(
ngModel
)]="
obj
.
hostid
"
(
ngModelChange
)="
getListIO
(
$
event
)"
>
<nz-select
style=
"width: 100%;"
nzShowSearch
nzAllowClear
nzPlaceHolder=
"选择告资源"
[(
ngModel
)]="
obj
.
hostid
"
(
ngModelChange
)="
getListIO
()"
>
<ng-container
*
ngFor=
"let item of hostList;"
>
<ng-container
*
ngFor=
"let item of hostList;"
>
<nz-option
nzLabel=
"{{item.name}}"
nzValue=
"{{item.hostid}}"
></nz-option>
<nz-option
nzLabel=
"{{item.name}}"
nzValue=
"{{item.hostid}}"
></nz-option>
</ng-container>
</ng-container>
...
@@ -57,9 +57,10 @@
...
@@ -57,9 +57,10 @@
></nz-date-picker>
></nz-date-picker>
</div>
</div>
</div>
</div>
<div
echarts
[
options
]="
chartOption
"
style=
"height: 420px;width: 100%"
></div>
<nz-tabset
[
nzTabPosition
]="'
top
'"
[
nzType
]="'
card
'"
>
<nz-tabset
[
nzTabPosition
]="'
top
'"
[
nzType
]="'
card
'"
>
<nz-tab
nzTitle=
"接收流量排行"
>
<nz-tab
nzTitle=
"接收流量排行"
>
<nz-table
#
nzTable
[
nzData
]="
inList
"
[
nzLoading
]="
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
inTotalNum
"
[
nzPageIndex
]="
inPageNum
"
[
nzPageSize
]="
inPageCount
"
(
nzPageIndexChange
)="
getInList
(
)"
>
<nz-table
#
nzTable
[
nzData
]="
inList
"
[
nzLoading
]="
inLoading
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
inTotalNum
"
[
nzPageIndex
]="
inPageNum
"
[
nzPageSize
]="
inPageCount
"
(
nzPageIndexChange
)="
inChnagePage
($
event
)"
>
<thead>
<thead>
<tr>
<tr>
<th
nzWidth=
"20%"
>
监测点名称
</th>
<th
nzWidth=
"20%"
>
监测点名称
</th>
...
@@ -69,17 +70,20 @@
...
@@ -69,17 +70,20 @@
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
<tr
*
ngFor=
"let data of inList"
>
<ng-container
*
ngFor=
"let item of inList"
>
<td>
{{data.itemName}}
</td>
<tr
(
click
)="
getEcharts
(
item
)"
>
<td>
{{data.max}}
</td>
<td>
{{item.itemName}}
</td>
<td>
{{data.min}}
</td>
<td>
{{item.max}}
</td>
<td>
{{data.avg}}
</td>
<td>
{{item.min}}
</td>
<td>
{{item.avg}}
</td>
</tr>
</tr>
</ng-container>
</tbody>
</tbody>
</nz-table>
</nz-table>
</nz-tab>
</nz-tab>
<nz-tab
nzTitle=
"发送流量排行"
>
<nz-tab
nzTitle=
"发送流量排行"
>
<nz-table
#
nzTable
[
nzData
]="
outList
"
[
nz
FrontPagination
]="
false
"
[
nzTotal
]="
outTotalNum
"
[
nzPageIndex
]="
outPageNum
"
[
nzPageSize
]="
outPageCount
"
(
nzPageIndexChange
)="
getOutList
(
)"
>
<nz-table
#
nzTable
[
nzData
]="
outList
"
[
nz
Loading
]="
outLoading
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
outTotalNum
"
[
nzPageIndex
]="
outPageNum
"
[
nzPageSize
]="
outPageCount
"
(
nzPageIndexChange
)="
outChnagePage
($
event
)"
>
<thead>
<thead>
<tr>
<tr>
<th
nzWidth=
"20%"
>
监测点名称
</th>
<th
nzWidth=
"20%"
>
监测点名称
</th>
...
...
src/main/webapp/app/netTopology/flow-trend/flow-trend.component.ts
View file @
8ed14360
...
@@ -25,14 +25,14 @@ export class FlowTrendComponent implements OnInit {
...
@@ -25,14 +25,14 @@ export class FlowTrendComponent implements OnInit {
//in
//in
inList
=
[];
inList
=
[];
inPageNum
=
1
;
inPageNum
=
1
;
inPageCount
=
pageSize
;
inPageCount
=
'5'
;
inTotalNum
;
inTotalNum
;
inLoading
;
inLoading
;
//out
//out
outList
=
[];
outList
=
[];
outPageNum
=
1
;
outPageNum
=
1
;
outPageCount
=
pageSize
;
outPageCount
=
'5'
;
outTotalNum
;
outTotalNum
;
outLoading
;
outLoading
;
...
@@ -40,6 +40,9 @@ export class FlowTrendComponent implements OnInit {
...
@@ -40,6 +40,9 @@ export class FlowTrendComponent implements OnInit {
timeBegin
;
timeBegin
;
timeEnd
;
timeEnd
;
//图表
chartOption
;
constructor
(
private
topologySer
:
TopologyService
,
private
overAllSer
:
OverAllService
,
constructor
(
private
topologySer
:
TopologyService
,
private
overAllSer
:
OverAllService
,
private
message
:
NzMessageService
,
private
datePipe
:
DatePipe
)
{
private
message
:
NzMessageService
,
private
datePipe
:
DatePipe
)
{
}
}
...
@@ -79,19 +82,106 @@ export class FlowTrendComponent implements OnInit {
...
@@ -79,19 +82,106 @@ export class FlowTrendComponent implements OnInit {
);
);
}
}
getEcharts
()
{
//获取图标数据
const
data
=
{
getEcharts
(
item
)
{
itemid
:
''
,
const
data
=
{
itemid
:
item
.
itemid
,
endTime
:
this
.
obj
.
endTime
,
endTime
:
this
.
obj
.
endTime
,
startTime
:
this
.
obj
.
startTime
startTime
:
this
.
obj
.
startTime
};
};
this
.
topologySer
.
findTrendData
(
data
).
subscribe
(
this
.
topologySer
.
findTrendData
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
this
.
setEacharts
();
}
else
{
this
.
message
.
warning
(
res
.
errMsg
);
}
}
}
);
);
}
}
//
setEacharts
(){
let
xAxisData
=
[];
let
data1
=
[];
let
data2
=
[];
let
data3
=
[];
let
data4
=
[];
for
(
let
i
=
0
;
i
<
10
;
i
++
)
{
xAxisData
.
push
(
'Class'
+
i
);
data1
.
push
((
Math
.
random
()
*
2
).
toFixed
(
2
));
data2
.
push
(
-
Math
.
random
().
toFixed
(
2
));
data3
.
push
((
Math
.
random
()
*
5
).
toFixed
(
2
));
data4
.
push
((
Math
.
random
()
+
0.3
).
toFixed
(
2
));
}
let
itemStyle
=
{
normal
:
{
},
emphasis
:
{
barBorderWidth
:
1
,
shadowBlur
:
10
,
shadowOffsetX
:
0
,
shadowOffsetY
:
0
,
shadowColor
:
'rgba(0,0,0,0.5)'
}
};
this
.
chartOption
=
{
backgroundColor
:
'#eee'
,
tooltip
:
{},
xAxis
:
{
data
:
xAxisData
,
name
:
'X Axis'
,
silent
:
false
,
axisLine
:
{
onZero
:
true
},
splitLine
:
{
show
:
false
},
splitArea
:
{
show
:
false
}
},
yAxis
:
{
inverse
:
true
,
splitArea
:
{
show
:
false
}
},
grid
:
{
left
:
100
},
series
:
[
{
name
:
'bar'
,
type
:
'bar'
,
stack
:
'one'
,
itemStyle
:
itemStyle
,
data
:
data1
},
{
name
:
'bar2'
,
type
:
'bar'
,
stack
:
'one'
,
itemStyle
:
itemStyle
,
data
:
data2
},
{
name
:
'bar3'
,
type
:
'bar'
,
stack
:
'two'
,
itemStyle
:
itemStyle
,
data
:
data3
},
{
name
:
'bar4'
,
type
:
'bar'
,
stack
:
'two'
,
itemStyle
:
itemStyle
,
data
:
data4
}
]
};
console
.
log
(
this
.
chartOption
);
}
//获取流量
//获取流量
getList
(
e
)
{
getList
(
e
)
{
this
.
obj
.
hostid
=
null
;
this
.
obj
.
hostid
=
null
;
...
@@ -105,22 +195,37 @@ export class FlowTrendComponent implements OnInit {
...
@@ -105,22 +195,37 @@ export class FlowTrendComponent implements OnInit {
this
.
getOutList
();
this
.
getOutList
();
}
}
//in改变页数
inChnagePage
(
e
){
this
.
inPageNum
=
e
;
this
.
getInList
();
}
//out改变页数
outChnagePage
(
e
){
this
.
outPageNum
=
e
;
this
.
getOutList
();
}
//进口流量
//进口流量
getInList
()
{
getInList
()
{
this
.
inLoading
=
true
;
this
.
inLoading
=
true
;
const
data
=
{
const
data
=
{
obj
:{
type
:
'in'
,
type
:
'in'
,
pageNum
:
this
.
inPageNum
,
pageCount
:
this
.
inPageCount
,
hostid
:
this
.
obj
.
hostid
,
hostid
:
this
.
obj
.
hostid
,
startTime
:
this
.
obj
.
startTime
,
startTime
:
this
.
obj
.
startTime
,
endTime
:
this
.
obj
.
endTime
,
endTime
:
this
.
obj
.
endTime
,
groupid
:
this
.
obj
.
groupid
groupid
:
this
.
obj
.
groupid
},
pageNum
:
this
.
inPageNum
,
pageCount
:
this
.
inPageCount
,
};
};
this
.
topologySer
.
findTrend
(
data
).
subscribe
(
this
.
topologySer
.
findTrend
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
inList
=
res
.
data
;
this
.
inList
=
res
.
data
.
data
;
this
.
inTotalNum
=
res
.
data
.
totalNum
;
}
else
{
}
else
{
this
.
message
.
warning
(
res
.
errMsg
);
this
.
message
.
warning
(
res
.
errMsg
);
}
}
...
@@ -133,18 +238,22 @@ export class FlowTrendComponent implements OnInit {
...
@@ -133,18 +238,22 @@ export class FlowTrendComponent implements OnInit {
getOutList
()
{
getOutList
()
{
this
.
outLoading
=
true
;
this
.
outLoading
=
true
;
const
data
=
{
const
data
=
{
type
:
'out'
,
obj
:
{
pageNum
:
this
.
outPageNum
,
type
:
'out'
,
pageCount
:
this
.
outPageCount
,
hostid
:
this
.
obj
.
hostid
,
hostid
:
this
.
obj
.
hostid
,
startTime
:
this
.
obj
.
startTime
,
startTime
:
this
.
obj
.
startTime
,
endTime
:
this
.
obj
.
endTime
,
endTime
:
this
.
obj
.
endTime
,
groupid
:
this
.
obj
.
groupid
groupid
:
this
.
obj
.
groupid
},
pageNum
:
this
.
outPageNum
,
pageCount
:
this
.
outPageCount
,
};
};
this
.
topologySer
.
findTrend
(
data
).
subscribe
(
this
.
topologySer
.
findTrend
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
outList
=
res
.
data
;
this
.
outList
=
res
.
data
.
data
;
this
.
outTotalNum
=
res
.
data
.
totalNum
;
}
else
{
}
else
{
this
.
message
.
warning
(
res
.
errMsg
);
this
.
message
.
warning
(
res
.
errMsg
);
}
}
...
...
src/main/webapp/app/netTopology/ne-topology/ne-topology.component.html
View file @
8ed14360
This diff is collapsed.
Click to expand it.
src/main/webapp/app/netTopology/topology-img/topology-img.component.html
View file @
8ed14360
...
@@ -18,7 +18,6 @@
...
@@ -18,7 +18,6 @@
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-arrows-alt"
></i></button>
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-arrows-alt"
></i></button>
</div>
</div>
</div>
</div>
<div
nz-row
class=
"search-form"
>
<div
nz-row
class=
"search-form"
>
<div
nz-col
nzSpan=
"12"
>
<div
nz-col
nzSpan=
"12"
>
<nz-select
style=
"width: 200px;"
nzShowSearch
nzAllowClear
nzPlaceHolder=
"选择类型"
(
ngModelChange
)="
getList
()"
>
<nz-select
style=
"width: 200px;"
nzShowSearch
nzAllowClear
nzPlaceHolder=
"选择类型"
(
ngModelChange
)="
getList
()"
>
...
...
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.ts
View file @
8ed14360
...
@@ -121,7 +121,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -121,7 +121,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
this
.
inOutInfo
();
this
.
inOutInfo
();
//监测点
//监测点
this
.
getList
()
this
.
getList
()
;
//历史告警
//历史告警
const
obj
=
{};
const
obj
=
{};
...
@@ -129,9 +129,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -129,9 +129,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
}
}
ngAfterViewInit
()
{
ngAfterViewInit
()
{
console
.
log
(
this
.
colorEle
.
nativeElement
.
offsetWidth
);
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'
;
console
.
log
(
this
.
checkEle
.
nativeElement
.
children
[
1
].
children
[
0
].
children
[
0
].
children
[
2
].
children
[
0
].
children
[
0
].
children
[
2
].
style
.
marginRight
);
}
}
//平均响应时间
//平均响应时间
...
...
src/main/webapp/app/system/modal/role/role.component.html
View file @
8ed14360
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
<nz-form-label
[
nzSm
]="
6
"
[
nzXs
]="
24
"
nzRequired
nzFor=
"comments"
>
角色说明
</nz-form-label>
<nz-form-label
[
nzSm
]="
6
"
[
nzXs
]="
24
"
nzRequired
nzFor=
"comments"
>
角色说明
</nz-form-label>
<nz-form-control
[
nzSm
]="
14
"
[
nzXs
]="
24
"
>
<nz-form-control
[
nzSm
]="
14
"
[
nzXs
]="
24
"
>
<textarea
id=
"comments"
row=
"4"
nz-input
formControlName=
"comments"
></textarea>
<textarea
id=
"comments"
row=
"4"
nz-input
formControlName=
"comments"
></textarea>
<nz-form-explain
*
ngIf=
"validateForm.get('comments').dirty && validateForm.get('comments').errors"
>
Please select your gender
!
</nz-form-explain>
<nz-form-explain
*
ngIf=
"validateForm.get('comments').dirty && validateForm.get('comments').errors"
>
请输入角色说明
!
</nz-form-explain>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<!--<nz-form-item>-->
<!--<nz-form-item>-->
...
...
src/main/webapp/app/system/modal/role/role.component.ts
View file @
8ed14360
...
@@ -41,12 +41,24 @@ export class RoleComponent implements OnInit {
...
@@ -41,12 +41,24 @@ export class RoleComponent implements OnInit {
this
.
isVisible
=
false
;
this
.
isVisible
=
false
;
}
}
handleOk
()
:
void
{
handleOk
()
{
for
(
let
i
in
this
.
validateForm
.
controls
)
{
for
(
let
i
in
this
.
validateForm
.
controls
)
{
this
.
validateForm
.
controls
[
i
].
markAsDirty
();
this
.
validateForm
.
controls
[
i
].
markAsDirty
();
this
.
validateForm
.
controls
[
i
].
updateValueAndValidity
();
this
.
validateForm
.
controls
[
i
].
updateValueAndValidity
();
}
}
this
.
systemSer
.
addRole
(
this
.
validateForm
.
value
).
subscribe
(
if
(
this
.
validateForm
.
invalid
)
{
return
false
;
}
const
data
=
{
role
:{
name
:
this
.
validateForm
.
value
.
name
,
status
:
this
.
validateForm
.
value
.
status
,
comments
:
this
.
validateForm
.
value
.
comments
,
},
resources
:[],
menus
:[]
};
this
.
systemSer
.
addRole
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
isVisible
=
false
;
this
.
isVisible
=
false
;
...
...
src/main/webapp/app/system/power/power.component.ts
View file @
8ed14360
import
{
Component
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
Component
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
SystemService
}
from
'../system.service'
;
import
{
SystemService
}
from
'../system.service'
;
import
{
RoleComponent
}
from
'../modal/role/role.component'
;
import
{
RoleComponent
}
from
'../modal/role/role.component'
;
import
{
NzModalService
}
from
'ng-zorro-antd'
;
import
{
NzM
essageService
,
NzM
odalService
}
from
'ng-zorro-antd'
;
@
Component
({
@
Component
({
selector
:
'jhi-power'
,
selector
:
'jhi-power'
,
...
@@ -13,7 +13,7 @@ export class PowerComponent implements OnInit {
...
@@ -13,7 +13,7 @@ export class PowerComponent implements OnInit {
dataSet
:
any
[];
dataSet
:
any
[];
isVisible
=
false
;
isVisible
=
false
;
constructor
(
private
systemSer
:
SystemService
,
constructor
(
private
systemSer
:
SystemService
,
private
message
:
NzMessageService
,
private
modalSer
:
NzModalService
)
{
private
modalSer
:
NzModalService
)
{
}
}
...
@@ -44,6 +44,12 @@ export class PowerComponent implements OnInit {
...
@@ -44,6 +44,12 @@ export class PowerComponent implements OnInit {
nzOnOk
:()
=>
{
nzOnOk
:()
=>
{
this
.
systemSer
.
deleteRole
(
data
.
id
).
subscribe
(
this
.
systemSer
.
deleteRole
(
data
.
id
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
this
.
message
.
success
(
"删除成功"
);
this
.
getRole
();
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
}
}
);
);
},
},
...
...
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