ONOS-1678 - Detail Panel issue - Actually FIXED it this time.
Change-Id: Id08e9405cc224afc9786f5df4e43aca487e50208
diff --git a/web/gui/src/main/webapp/app/view/topo/topo.js b/web/gui/src/main/webapp/app/view/topo/topo.js
index cec7cef..2415282 100644
--- a/web/gui/src/main/webapp/app/view/topo/topo.js
+++ b/web/gui/src/main/webapp/app/view/topo/topo.js
@@ -46,7 +46,7 @@
actionMap = {
I: [toggleInstances, 'Toggle ONOS instances panel'],
O: [toggleSummary, 'Toggle ONOS summary panel'],
- D: [toggleDetails, 'Disable / enable details panel'],
+ D: [toggleUseDetailsFlag, 'Disable / enable details panel'],
H: [toggleHosts, 'Toggle host visibility'],
M: [toggleOffline, 'Toggle offline visibility'],
@@ -105,8 +105,8 @@
updatePrefsState('summary', tps.toggleSummary(x));
}
- function toggleDetails(x) {
- updatePrefsState('detail', tps.toggleDetails(x));
+ function toggleUseDetailsFlag(x) {
+ updatePrefsState('detail', tps.toggleUseDetailsFlag(x));
}
function toggleHosts(x) {
@@ -303,10 +303,7 @@
flash.enable(false);
toggleInstances(prefsState.insts);
toggleSummary(prefsState.summary);
- // NOTE: the detail flag means "use data if you have it"; it does not
- // mean the panel is on-screen. So, assume that it always starts
- // off-screen since nothing is selected initially...
- toggleDetails(false);
+ toggleUseDetailsFlag(prefsState.detail);
toggleSprites(prefsState.spr);
flash.enable(true);
}
diff --git a/web/gui/src/main/webapp/app/view/topo/topoPanel.js b/web/gui/src/main/webapp/app/view/topo/topoPanel.js
index af6e879..bce9e8e 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoPanel.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoPanel.js
@@ -303,7 +303,7 @@
dp.up = function (cb) { dp._move(dp.ypos.up, cb); };
}
- function toggleDetails(x) {
+ function toggleUseDetailsFlag(x) {
var kev = (x === 'keyev'),
verb;
@@ -337,6 +337,7 @@
ps.destroyPanel(idSum);
ps.destroyPanel(idDet);
summaryPanel = detailPanel = null;
+ haveDetails = false;
}
// ==========================
@@ -362,7 +363,7 @@
showSummary: showSummary,
toggleSummary: toggleSummary,
- toggleDetails: toggleDetails,
+ toggleUseDetailsFlag: toggleUseDetailsFlag,
displaySingle: displaySingle,
displayMulti: displayMulti,
addAction: addAction,
diff --git a/web/gui/src/main/webapp/tests/app/view/topo/topoPanel-spec.js b/web/gui/src/main/webapp/tests/app/view/topo/topoPanel-spec.js
index 1b2a573..bd1c172 100644
--- a/web/gui/src/main/webapp/tests/app/view/topo/topoPanel-spec.js
+++ b/web/gui/src/main/webapp/tests/app/view/topo/topoPanel-spec.js
@@ -41,7 +41,7 @@
'destroyPanels',
'showSummary',
'toggleSummary',
- 'toggleDetails',
+ 'toggleUseDetailsFlag',
'displaySingle',
'displayMulti',
'addAction',