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-11 18:34:05 -0800
Browse Files
Options
Browse Files
Download
Plain Diff
Committed by
Gerrit Code Review
2014-11-11 18:34:05 -0800
Commit
b6a67d5aed04a36a57f6e12373ab2da80f994977
b6a67d5a
2 parents
d8aea862
f1fae003
Merge "Adding server-side code for sending device/host details to the client."
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
web/gui/src/main/java/org/onlab/onos/gui/TopologyMessages.java
web/gui/src/main/java/org/onlab/onos/gui/TopologyWebSocket.java
web/gui/src/main/java/org/onlab/onos/gui/TopologyMessages.java
View file @
b6a67d5
...
...
@@ -350,7 +350,6 @@ public abstract class TopologyMessages {
new
Prop
(
"Longitude"
,
annot
.
value
(
"longitude"
))));
}
// Produces a path message to the client.
protected
ObjectNode
pathMessage
(
Path
path
,
String
type
)
{
ObjectNode
payload
=
mapper
.
createObjectNode
();
...
...
web/gui/src/main/java/org/onlab/onos/gui/TopologyWebSocket.java
View file @
b6a67d5
...
...
@@ -110,8 +110,8 @@ public class TopologyWebSocket
try
{
ObjectNode
event
=
(
ObjectNode
)
mapper
.
reader
().
readTree
(
data
);
String
type
=
string
(
event
,
"event"
,
"unknown"
);
if
(
type
.
equals
(
"
show
Details"
))
{
show
Details
(
event
);
if
(
type
.
equals
(
"
request
Details"
))
{
request
Details
(
event
);
}
else
if
(
type
.
equals
(
"updateMeta"
))
{
updateMetaUi
(
event
);
}
else
if
(
type
.
equals
(
"requestPath"
))
{
...
...
@@ -165,9 +165,9 @@ public class TopologyWebSocket
}
// Sends back device or host details.
private
void
show
Details
(
ObjectNode
event
)
{
private
void
request
Details
(
ObjectNode
event
)
{
ObjectNode
payload
=
payload
(
event
);
String
type
=
string
(
payload
,
"
type
"
,
"unknown"
);
String
type
=
string
(
payload
,
"
class
"
,
"unknown"
);
if
(
type
.
equals
(
"device"
))
{
sendMessage
(
deviceDetails
(
deviceId
(
string
(
payload
,
"id"
)),
number
(
event
,
"sid"
)));
...
...
Please
register
or
login
to post a comment