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
fffd7722
Commit
fffd7722
authored
Jan 15, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
67ad5acc
3ce873e1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
22 deletions
+44
-22
flow-trend.component.ts
...webapp/app/netTopology/flow-trend/flow-trend.component.ts
+16
-15
jtopo-editor.js
src/main/webapp/content/javascript/jtopo/js/jtopo-editor.js
+28
-7
No files found.
src/main/webapp/app/netTopology/flow-trend/flow-trend.component.ts
View file @
fffd7722
...
@@ -68,7 +68,7 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
...
@@ -68,7 +68,7 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
if
(
this
.
obj
.
hostid
){
if
(
this
.
obj
.
hostid
){
this
.
findByTime
();
this
.
findByTime
();
}
}
},
5000
)
},
1000
*
60
*
4
)
}
}
...
@@ -128,6 +128,7 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
...
@@ -128,6 +128,7 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
if
(
this
.
hostList
)
{
if
(
this
.
hostList
)
{
this
.
obj
.
hostid
=
this
.
hostList
[
0
].
hostid
+
''
;
this
.
obj
.
hostid
=
this
.
hostList
[
0
].
hostid
+
''
;
this
.
getEcharts
(
null
);
this
.
getEcharts
(
null
);
this
.
findByTime
();
this
.
setNowEchart
();
this
.
setNowEchart
();
}
else
{
}
else
{
this
.
message
.
warning
(
'当前资源组无资源'
);
this
.
message
.
warning
(
'当前资源组无资源'
);
...
@@ -208,7 +209,7 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
...
@@ -208,7 +209,7 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
stack
:
'one'
,
stack
:
'one'
,
itemStyle
:
itemStyle
,
itemStyle
:
itemStyle
,
data
:
this
.
inNowEchartData
.
map
(
e
=>
{
data
:
this
.
inNowEchartData
.
map
(
e
=>
{
return
e
.
avg
;
return
e
.
sumValue
;
})
})
},
},
{
{
...
@@ -217,7 +218,7 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
...
@@ -217,7 +218,7 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
stack
:
'one'
,
stack
:
'one'
,
itemStyle
:
itemStyle
,
itemStyle
:
itemStyle
,
data
:
this
.
outNowEchartData
.
map
(
e
=>
{
data
:
this
.
outNowEchartData
.
map
(
e
=>
{
return
-
e
.
avg
;
return
-
e
.
sumValue
;
})
})
}
}
]
]
...
@@ -229,16 +230,16 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
...
@@ -229,16 +230,16 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
this
.
topologySer
.
findByTime
(
this
.
obj
.
hostid
).
subscribe
(
this
.
topologySer
.
findByTime
(
this
.
obj
.
hostid
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
const
inData
=
{
//
const inData = {
clock
:
this
.
datePipe
.
transform
(
res
.
data
.
time
,
"HH:mm:ss"
),
//
clock:this.datePipe.transform(res.data.time,"HH:mm:ss"),
avg
:(
res
.
data
.
in
)
//
avg:(res.data.in)
};
//
};
this
.
inNowEchartData
.
push
(
inData
)
;
this
.
inNowEchartData
=
res
.
data
.
in
;
const
outData
=
{
//
const outData = {
clock
:
this
.
datePipe
.
transform
(
res
.
data
.
time
,
"HH:mm:ss"
),
//
clock:this.datePipe.transform(res.data.time,"HH:mm:ss"),
avg
:(
res
.
data
.
out
)
//
avg:(res.data.out)
};
//
};
this
.
outNowEchartData
.
push
(
outData
)
;
this
.
outNowEchartData
=
res
.
data
.
out
;
this
.
flashEcharts
();
this
.
flashEcharts
();
}
else
{
}
else
{
this
.
message
.
warning
(
res
.
errMsg
);
this
.
message
.
warning
(
res
.
errMsg
);
...
@@ -329,7 +330,7 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
...
@@ -329,7 +330,7 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
stack
:
'one'
,
stack
:
'one'
,
itemStyle
:
itemStyle
,
itemStyle
:
itemStyle
,
data
:
this
.
inNowEchartData
.
map
(
e
=>
{
data
:
this
.
inNowEchartData
.
map
(
e
=>
{
return
e
.
avg
;
return
e
.
sumValue
;
})
})
},
},
{
{
...
@@ -338,7 +339,7 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
...
@@ -338,7 +339,7 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
stack
:
'one'
,
stack
:
'one'
,
itemStyle
:
itemStyle
,
itemStyle
:
itemStyle
,
data
:
this
.
outNowEchartData
.
map
(
e
=>
{
data
:
this
.
outNowEchartData
.
map
(
e
=>
{
return
-
e
.
avg
;
return
-
e
.
sumValue
;
})
})
}
}
]
]
...
...
src/main/webapp/content/javascript/jtopo/js/jtopo-editor.js
View file @
fffd7722
...
@@ -88,13 +88,34 @@ TopologyPanel.prototype.loadTopologyByJson = function (topologyJson, backImg) {
...
@@ -88,13 +88,34 @@ TopologyPanel.prototype.loadTopologyByJson = function (topologyJson, backImg) {
var
alarmList
=
editor
.
utils
.
getAllNodes
();
var
alarmList
=
editor
.
utils
.
getAllNodes
();
for
(
var
i
=
0
;
i
<
alarmList
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
alarmList
.
length
;
i
++
){
(
function
(
i
)
{
(
function
(
i
)
{
setInterval
(
function
(){
if
(
alarmList
[
i
].
alarm
==
'危险'
){
if
(
alarmList
[
i
].
alarm
==
'危险'
){
setInterval
(
function
(){
alarmList
[
i
].
alarm
=
''
;
if
(
alarmList
[
i
].
alarm
==
'危险'
){
}
else
if
(
alarmList
[
i
].
alarm
==
''
){
alarmList
[
i
].
alarm
=
''
;
alarmList
[
i
].
alarm
=
'危险'
}
else
if
(
alarmList
[
i
].
alarm
==
''
){
}
alarmList
[
i
].
alarm
=
'危险'
},
2000
);
}
},
2000
);
}
if
(
alarmList
[
i
].
alarm
==
'主机被删除,请及时清理'
){
setInterval
(
function
(){
if
(
alarmList
[
i
].
alarm
==
'主机被删除,请及时清理'
){
alarmList
[
i
].
alarm
=
''
;
}
else
if
(
alarmList
[
i
].
alarm
==
''
){
alarmList
[
i
].
alarm
=
'主机被删除,请及时清理'
}
},
2000
);
}
if
(
alarmList
[
i
].
alarm
==
'故障'
){
setInterval
(
function
(){
if
(
alarmList
[
i
].
alarm
==
'故障'
){
alarmList
[
i
].
alarm
=
''
;
}
else
if
(
alarmList
[
i
].
alarm
==
''
){
alarmList
[
i
].
alarm
=
'故障'
}
},
1000
);
}
})(
i
);
})(
i
);
}
}
...
...
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