mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-20 20:02:17 +02:00
ONOS-2901 - Added fix to ignore reserved global keys, when activating a topo overlay.
Change-Id: I9bcd15e4a5e6d688683e0ac703328dc4f840c461
This commit is contained in:
parent
b4916d0503
commit
71892221d1
@ -173,6 +173,23 @@
|
||||
keyHandler.viewGestures = [];
|
||||
}
|
||||
|
||||
function checkNotGlobal(o) {
|
||||
var oops = [];
|
||||
if (fs.isO(o)) {
|
||||
angular.forEach(o, function (val, key) {
|
||||
if (keyHandler.globalKeys[key]) {
|
||||
oops.push(key);
|
||||
}
|
||||
});
|
||||
if (oops.length) {
|
||||
$log.warn('Ignoring reserved global key(s):', oops.join(','));
|
||||
oops.forEach(function (key) {
|
||||
delete o[key];
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
angular.module('onosUtil')
|
||||
.factory('KeyService',
|
||||
['$log', 'FnService', 'ThemeService', 'NavService',
|
||||
@ -208,7 +225,8 @@
|
||||
},
|
||||
enableKeys: function (b) {
|
||||
enabled = b;
|
||||
}
|
||||
},
|
||||
checkNotGlobal: checkNotGlobal
|
||||
};
|
||||
}]);
|
||||
|
||||
|
@ -95,6 +95,9 @@
|
||||
// and include them in the quick-help panel
|
||||
function mergeKeys(extra) {
|
||||
var _hf = actionMap._helpFormat[2];
|
||||
|
||||
ks.checkNotGlobal(extra);
|
||||
|
||||
extra._keyOrder.forEach(function (k) {
|
||||
var d = extra[k],
|
||||
cb = d && d.cb,
|
||||
|
Loading…
x
Reference in New Issue
Block a user