Topo2 - clicking device details header navigates to the device view with the device highlighted
JIRA Tasks; ONOS-6281
Change-Id: I17aae2e898e59bfb98becf23c5d5f6fd94014690
diff --git a/web/gui/src/main/webapp/app/view/topo2/topo2DeviceDetailsPanel.js b/web/gui/src/main/webapp/app/view/topo2/topo2DeviceDetailsPanel.js
index e8778ed..df67061 100644
--- a/web/gui/src/main/webapp/app/view/topo2/topo2DeviceDetailsPanel.js
+++ b/web/gui/src/main/webapp/app/view/topo2/topo2DeviceDetailsPanel.js
@@ -23,13 +23,14 @@
'use strict';
// Injected Services
- var panel, gs, wss, flash, bs, fs, ns, ls;
+ var panel, gs, wss, flash, bs, fs, ns, ls, ns;
// Internal State
var detailsPanel;
// configuration
var id = 'topo2-p-detail',
+ devicePath = 'device',
handlerMap = {
'showDetails': showDetails
};
@@ -103,10 +104,16 @@
detailsPanel.emptyRegions();
+
+ var navFn = function () {
+ ns.navTo(devicePath, { devId: data.id });
+ };
+
var svg = detailsPanel.appendToHeader('div')
.classed('icon clickable', true)
.append('svg'),
title = detailsPanel.appendToHeader('h2')
+ .on('click', navFn)
.classed('clickable', true),
table = detailsPanel.appendToBody('table'),
tbody = table.append('tbody');