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
Thomas Vachuska
2014-11-21 13:02:00 -0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
60d72bf7deb462dfbe742e6fe4f5c12a54299c5b
60d72bf7
1 parent
209155ee
Fixed labels issue.
Change-Id: I9d213392c5ca337b1732ad23bfcb40d196a2acb8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
web/gui/src/main/java/org/onlab/onos/gui/TopologyViewMessages.java
web/gui/src/main/webapp/glyphs.js
web/gui/src/main/webapp/topo2.js
web/gui/src/main/java/org/onlab/onos/gui/TopologyViewMessages.java
View file @
60d72bf
...
...
@@ -302,6 +302,7 @@ public abstract class TopologyViewMessages {
// Generate labels: id, chassis id, no-label, optional-name
String
name
=
device
.
annotations
().
value
(
"name"
);
ArrayNode
labels
=
mapper
.
createArrayNode
();
labels
.
add
(
""
);
labels
.
add
(
isNullOrEmpty
(
name
)
?
device
.
id
().
toString
()
:
name
);
labels
.
add
(
device
.
id
().
toString
());
...
...
web/gui/src/main/webapp/glyphs.js
View file @
60d72bf
...
...
@@ -95,7 +95,7 @@
"a5 5 0 0 1 5 5 v65 a5 5 0 0 1 -5 5 z M-41 -32.5 l11 -11 "
+
"a10 3 0 0 1 10 -2 h40 a10 3 0 0 1 10 2 l11 11 z M-39 -20 "
+
"a5 5 0 0 1 10 0 a5 5 0 0 1 -10 0 z "
,
host
:
"M-45 -40 a5 5 0 0 1 5 -5 h65 a5 5 0 0 1 5 5 v80 "
+
endstation
:
"M-45 -40 a5 5 0 0 1 5 -5 h65 a5 5 0 0 1 5 5 v80 "
+
"a5 5 0 0 1 -5 5 h-65 a5 5 0 0 1 -5 -5 z M32.5 -41 l11 11 "
+
"a3 10 0 0 1 2 10 v40 a3 10 0 0 1 -2 10 l-11 11 z M-38 -36 "
+
"a2 2 0 0 1 2 -2 h56 a2 2 0 0 1 2 2 v26 a2 2 0 0 1 -2 2 h-56 "
+
...
...
web/gui/src/main/webapp/topo2.js
View file @
60d72bf
...
...
@@ -175,7 +175,7 @@
},
webSock
,
sid
=
0
,
deviceLabelCount
=
2
,
deviceLabelCount
=
3
,
hostLabelCount
=
2
,
deviceLabelIndex
=
0
,
hostLabelIndex
=
0
,
...
...
@@ -314,7 +314,7 @@
}
function
cycleLabels
()
{
deviceLabelIndex
=
(
deviceLabelIndex
===
network
.
deviceLabelCount
-
1
)
deviceLabelIndex
=
(
deviceLabelIndex
===
2
)
?
0
:
deviceLabelIndex
+
1
;
network
.
nodes
.
forEach
(
function
(
d
)
{
...
...
@@ -1237,8 +1237,6 @@
svgCls
=
type
?
'node device '
+
type
:
'node device'
,
labels
=
device
.
labels
||
[];
labels
.
unshift
(
''
);
// add 'no-label' to front of cycle
// Augment as needed...
node
.
class
=
'device'
;
node
.
svgClass
=
device
.
online
?
svgCls
+
' online'
:
svgCls
;
...
...
@@ -1517,12 +1515,12 @@
hostRadius
=
{
bgpSpeaker
:
14
,
router
:
14
,
host
:
14
endstation
:
14
},
hostGlyphId
=
{
bgpSpeaker
:
'bgpSpeaker'
,
router
:
'router'
,
host
:
'host
'
endstation
:
'endstation
'
};
...
...
Please
register
or
login
to post a comment