ONOS-1678 - Detail Panel issue - Actually FIXED it this time.
Change-Id: Id08e9405cc224afc9786f5df4e43aca487e50208
Showing
3 changed files
with
8 additions
and
10 deletions
... | @@ -46,7 +46,7 @@ | ... | @@ -46,7 +46,7 @@ |
46 | actionMap = { | 46 | actionMap = { |
47 | I: [toggleInstances, 'Toggle ONOS instances panel'], | 47 | I: [toggleInstances, 'Toggle ONOS instances panel'], |
48 | O: [toggleSummary, 'Toggle ONOS summary panel'], | 48 | O: [toggleSummary, 'Toggle ONOS summary panel'], |
49 | - D: [toggleDetails, 'Disable / enable details panel'], | 49 | + D: [toggleUseDetailsFlag, 'Disable / enable details panel'], |
50 | 50 | ||
51 | H: [toggleHosts, 'Toggle host visibility'], | 51 | H: [toggleHosts, 'Toggle host visibility'], |
52 | M: [toggleOffline, 'Toggle offline visibility'], | 52 | M: [toggleOffline, 'Toggle offline visibility'], |
... | @@ -105,8 +105,8 @@ | ... | @@ -105,8 +105,8 @@ |
105 | updatePrefsState('summary', tps.toggleSummary(x)); | 105 | updatePrefsState('summary', tps.toggleSummary(x)); |
106 | } | 106 | } |
107 | 107 | ||
108 | - function toggleDetails(x) { | 108 | + function toggleUseDetailsFlag(x) { |
109 | - updatePrefsState('detail', tps.toggleDetails(x)); | 109 | + updatePrefsState('detail', tps.toggleUseDetailsFlag(x)); |
110 | } | 110 | } |
111 | 111 | ||
112 | function toggleHosts(x) { | 112 | function toggleHosts(x) { |
... | @@ -303,10 +303,7 @@ | ... | @@ -303,10 +303,7 @@ |
303 | flash.enable(false); | 303 | flash.enable(false); |
304 | toggleInstances(prefsState.insts); | 304 | toggleInstances(prefsState.insts); |
305 | toggleSummary(prefsState.summary); | 305 | toggleSummary(prefsState.summary); |
306 | - // NOTE: the detail flag means "use data if you have it"; it does not | 306 | + toggleUseDetailsFlag(prefsState.detail); |
307 | - // mean the panel is on-screen. So, assume that it always starts | ||
308 | - // off-screen since nothing is selected initially... | ||
309 | - toggleDetails(false); | ||
310 | toggleSprites(prefsState.spr); | 307 | toggleSprites(prefsState.spr); |
311 | flash.enable(true); | 308 | flash.enable(true); |
312 | } | 309 | } | ... | ... |
... | @@ -303,7 +303,7 @@ | ... | @@ -303,7 +303,7 @@ |
303 | dp.up = function (cb) { dp._move(dp.ypos.up, cb); }; | 303 | dp.up = function (cb) { dp._move(dp.ypos.up, cb); }; |
304 | } | 304 | } |
305 | 305 | ||
306 | - function toggleDetails(x) { | 306 | + function toggleUseDetailsFlag(x) { |
307 | var kev = (x === 'keyev'), | 307 | var kev = (x === 'keyev'), |
308 | verb; | 308 | verb; |
309 | 309 | ||
... | @@ -337,6 +337,7 @@ | ... | @@ -337,6 +337,7 @@ |
337 | ps.destroyPanel(idSum); | 337 | ps.destroyPanel(idSum); |
338 | ps.destroyPanel(idDet); | 338 | ps.destroyPanel(idDet); |
339 | summaryPanel = detailPanel = null; | 339 | summaryPanel = detailPanel = null; |
340 | + haveDetails = false; | ||
340 | } | 341 | } |
341 | 342 | ||
342 | // ========================== | 343 | // ========================== |
... | @@ -362,7 +363,7 @@ | ... | @@ -362,7 +363,7 @@ |
362 | showSummary: showSummary, | 363 | showSummary: showSummary, |
363 | toggleSummary: toggleSummary, | 364 | toggleSummary: toggleSummary, |
364 | 365 | ||
365 | - toggleDetails: toggleDetails, | 366 | + toggleUseDetailsFlag: toggleUseDetailsFlag, |
366 | displaySingle: displaySingle, | 367 | displaySingle: displaySingle, |
367 | displayMulti: displayMulti, | 368 | displayMulti: displayMulti, |
368 | addAction: addAction, | 369 | addAction: addAction, | ... | ... |
... | @@ -41,7 +41,7 @@ describe('factory: view/topo/topoPanel.js', function() { | ... | @@ -41,7 +41,7 @@ describe('factory: view/topo/topoPanel.js', function() { |
41 | 'destroyPanels', | 41 | 'destroyPanels', |
42 | 'showSummary', | 42 | 'showSummary', |
43 | 'toggleSummary', | 43 | 'toggleSummary', |
44 | - 'toggleDetails', | 44 | + 'toggleUseDetailsFlag', |
45 | 'displaySingle', | 45 | 'displaySingle', |
46 | 'displayMulti', | 46 | 'displayMulti', |
47 | 'addAction', | 47 | 'addAction', | ... | ... |
-
Please register or login to post a comment