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
233fea0c
Commit
233fea0c
authored
Jan 15, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
templateid
parent
d48ba054
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
flow-trend.component.ts
...webapp/app/netTopology/flow-trend/flow-trend.component.ts
+10
-6
No files found.
src/main/webapp/app/netTopology/flow-trend/flow-trend.component.ts
View file @
233fea0c
...
...
@@ -64,6 +64,12 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
today
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
today
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
this
.
getGroup
();
this
.
time_
=
setInterval
(()
=>
{
if
(
this
.
obj
.
hostid
){
this
.
findByTime
();
}
},
5000
)
}
//获取流量
...
...
@@ -123,9 +129,6 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
this
.
obj
.
hostid
=
this
.
hostList
[
0
].
hostid
+
''
;
this
.
getEcharts
(
null
);
this
.
setNowEchart
();
this
.
time_
=
setInterval
(()
=>
{
this
.
findByTime
();
},
6000
);
}
else
{
this
.
message
.
warning
(
'当前资源组无资源'
);
}
...
...
@@ -239,7 +242,7 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
this
.
flashEcharts
();
}
else
{
this
.
message
.
warning
(
res
.
errMsg
);
clearInterval
(
this
.
time_
);
//
clearInterval(this.time_);
}
}
);
...
...
@@ -345,8 +348,9 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
//页面离开
ngOnDestroy
()
{
//销毁定时任务
console
.
log
(
"销毁定时任务"
);
clearInterval
(
this
.
time_
);
if
(
this
.
time_
){
clearInterval
(
this
.
time_
);
}
}
//获取趋势数据
...
...
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