mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-23 21:31:00 +02:00
GUI -- Cleaned up topoToolbar.
Change-Id: I07bb0248de27567101055977396b6aae072c979b
This commit is contained in:
parent
b91356eae7
commit
04b4140b10
@ -26,8 +26,7 @@
|
|||||||
|
|
||||||
var api, toolbar;
|
var api, toolbar;
|
||||||
|
|
||||||
// buttons (named for keystroke)
|
// buttons
|
||||||
var O, I, D, H, M, P, B;
|
|
||||||
var togSummary, togInstances, togDetails,
|
var togSummary, togInstances, togDetails,
|
||||||
togHosts, togOffline, togPorts, togBackground;
|
togHosts, togOffline, togPorts, togBackground;
|
||||||
|
|
||||||
@ -35,6 +34,10 @@
|
|||||||
api = _api_;
|
api = _api_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: fix toggle and radio sets to be selected based on the current state
|
||||||
|
// current bug: first toggle button, then toggle with key, toggle button doesn't update appearance
|
||||||
|
|
||||||
|
|
||||||
function getActions() {
|
function getActions() {
|
||||||
togSummary = api.getActionEntry('O');
|
togSummary = api.getActionEntry('O');
|
||||||
togInstances = api.getActionEntry('I');
|
togInstances = api.getActionEntry('I');
|
||||||
@ -54,13 +57,10 @@
|
|||||||
return entry[1];
|
return entry[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
function createToolbar() {
|
function addFirstRow() {
|
||||||
getActions();
|
|
||||||
// in actions, function reference is entry[0], tooltip is entry[1]
|
|
||||||
toolbar = tbs.createToolbar('topo-tbar');
|
|
||||||
toolbar.addToggle('summary-tog', 'unknown', true,
|
toolbar.addToggle('summary-tog', 'unknown', true,
|
||||||
entryCallback(togSummary), entryToolTip(togSummary));
|
entryCallback(togSummary), entryToolTip(togSummary));
|
||||||
toolbar.addToggle('instance-tog', 'unknown', true,
|
toolbar.addToggle('instance-tog', 'uiAttached', true,
|
||||||
entryCallback(togInstances), entryToolTip(togInstances));
|
entryCallback(togInstances), entryToolTip(togInstances));
|
||||||
toolbar.addToggle('details-tog', 'unknown', true,
|
toolbar.addToggle('details-tog', 'unknown', true,
|
||||||
entryCallback(togDetails), entryToolTip(togDetails));
|
entryCallback(togDetails), entryToolTip(togDetails));
|
||||||
@ -68,14 +68,19 @@
|
|||||||
|
|
||||||
toolbar.addToggle('hosts-tog', 'endstation', false,
|
toolbar.addToggle('hosts-tog', 'endstation', false,
|
||||||
entryCallback(togHosts), entryToolTip(togHosts));
|
entryCallback(togHosts), entryToolTip(togHosts));
|
||||||
toolbar.addToggle('offline-tog', 'unknown', true,
|
toolbar.addToggle('offline-tog', 'switch', true,
|
||||||
entryCallback(togOffline), entryToolTip(togOffline));
|
entryCallback(togOffline), entryToolTip(togOffline));
|
||||||
toolbar.addToggle('ports-tog', 'unknown', true,
|
toolbar.addToggle('ports-tog', 'unknown', true,
|
||||||
entryCallback(togPorts), entryToolTip(togPorts));
|
entryCallback(togPorts), entryToolTip(togPorts));
|
||||||
toolbar.addToggle('bkgrnd-tog', 'unknown', true,
|
toolbar.addToggle('bkgrnd-tog', 'unknown', true,
|
||||||
entryCallback(togBackground), entryToolTip(togBackground));
|
entryCallback(togBackground), entryToolTip(togBackground));
|
||||||
|
}
|
||||||
|
|
||||||
toolbar.hide();
|
function createToolbar() {
|
||||||
|
getActions();
|
||||||
|
toolbar = tbs.createToolbar('topo-tbar');
|
||||||
|
addFirstRow();
|
||||||
|
toolbar.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
angular.module('ovTopo')
|
angular.module('ovTopo')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user