Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
alshabib
2014-10-30 17:27:00 +0100
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
e171d534387dfae725194b9fbfa0cec5993cc870
e171d534
2 parents
3460da1c
73171375
Merge branch 'master' of
ssh://gerrit.onlab.us:29418/onos-next
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
66 deletions
web/gui/src/main/java/org/onlab/onos/gui/TopologyResource.java
web/gui/src/main/webapp/network.js
web/gui/src/main/java/org/onlab/onos/gui/TopologyResource.java
View file @
e171d53
...
...
@@ -209,9 +209,13 @@ public class TopologyResource extends BaseResource {
// Produces JSON for a link.
private
ObjectNode
json
(
ObjectMapper
mapper
,
AggLink
aggLink
)
{
Link
link
=
aggLink
.
link
;
ConnectPoint
src
=
link
.
src
();
ConnectPoint
dst
=
link
.
dst
();
return
mapper
.
createObjectNode
()
.
put
(
"src"
,
link
.
src
().
deviceId
().
toString
())
.
put
(
"dst"
,
link
.
dst
().
deviceId
().
toString
())
.
put
(
"src"
,
src
.
deviceId
().
toString
())
.
put
(
"srcPort"
,
src
.
port
().
toString
())
.
put
(
"dst"
,
dst
.
deviceId
().
toString
())
.
put
(
"dstPort"
,
dst
.
port
().
toString
())
.
put
(
"type"
,
link
.
type
().
toString
().
toLowerCase
())
.
put
(
"linkWidth"
,
aggLink
.
links
.
size
());
}
...
...
web/gui/src/main/webapp/network.js
View file @
e171d53
...
...
@@ -28,73 +28,73 @@
// configuration data
var
config
=
{
debugOn
:
false
,
debug
:
{
showNodeXY
:
false
,
showKeyHandler
:
true
debugOn
:
false
,
debug
:
{
showNodeXY
:
false
,
showKeyHandler
:
true
},
options
:
{
layering
:
true
,
collisionPrevention
:
true
},
jsonUrl
:
'rs/topology/graph'
,
jsonPrefix
:
''
,
XjsonUrl
:
'json/network.json'
,
XjsonPrefix
:
'json/'
,
iconUrl
:
{
device
:
'img/device.png'
,
host
:
'img/host.png'
,
pkt
:
'img/pkt.png'
,
opt
:
'img/opt.png'
},
mastHeight
:
36
,
force
:
{
note
:
'node.class or link.class is used to differentiate'
,
linkDistance
:
{
infra
:
200
,
host
:
40
},
options
:
{
layering
:
true
,
collisionPrevention
:
true
linkStrength
:
{
infra
:
1.0
,
host
:
1.0
},
jsonUrl
:
'rs/topology/graph'
,
jsonPrefix
:
''
,
XjsonUrl
:
'json/network.json'
,
XjsonPrefix
:
'json/'
,
iconUrl
:
{
device
:
'img/device.png'
,
host
:
'img/host.png'
,
pkt
:
'img/pkt.png'
,
opt
:
'img/opt.png'
charge
:
{
device
:
-
800
,
host
:
-
1000
},
mastHeight
:
36
,
force
:
{
note
:
'node.class or link.class is used to differentiate'
,
linkDistance
:
{
infra
:
200
,
host
:
40
},
linkStrength
:
{
infra
:
1.0
,
host
:
1.0
},
charge
:
{
device
:
-
800
,
host
:
-
1000
},
ticksWithoutCollisions
:
50
,
marginLR
:
20
,
marginTB
:
20
,
translate
:
function
()
{
return
'translate('
+
config
.
force
.
marginLR
+
','
+
config
.
force
.
marginTB
+
')'
;
}
},
labels
:
{
imgPad
:
16
,
padLR
:
8
,
padTB
:
6
,
marginLR
:
3
,
marginTB
:
2
},
icons
:
{
w
:
32
,
h
:
32
,
xoff
:
-
12
,
yoff
:
-
8
},
constraints
:
{
ypos
:
{
host
:
0.05
,
switch
:
0.3
,
roadm
:
0.7
}
},
hostLinkWidth
:
1.0
,
hostRadius
:
7
,
mouseOutTimerDelayMs
:
120
};
ticksWithoutCollisions
:
50
,
marginLR
:
20
,
marginTB
:
20
,
translate
:
function
()
{
return
'translate('
+
config
.
force
.
marginLR
+
','
+
config
.
force
.
marginTB
+
')'
;
}
},
labels
:
{
imgPad
:
16
,
padLR
:
8
,
padTB
:
6
,
marginLR
:
3
,
marginTB
:
2
},
icons
:
{
w
:
32
,
h
:
32
,
xoff
:
-
12
,
yoff
:
-
8
},
constraints
:
{
ypos
:
{
host
:
0.05
,
switch
:
0.3
,
roadm
:
0.7
}
},
hostLinkWidth
:
1.0
,
hostRadius
:
7
,
mouseOutTimerDelayMs
:
120
};
// state variables
var
view
=
{},
...
...
Please
register
or
login
to post a comment