aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/web/gui/src/main/webapp/app/fw
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/onos/web/gui/src/main/webapp/app/fw')
-rw-r--r--framework/src/onos/web/gui/src/main/webapp/app/fw/svg/glyph.js30
-rw-r--r--framework/src/onos/web/gui/src/main/webapp/app/fw/svg/icon.js6
-rw-r--r--framework/src/onos/web/gui/src/main/webapp/app/fw/util/keys.js30
3 files changed, 63 insertions, 3 deletions
diff --git a/framework/src/onos/web/gui/src/main/webapp/app/fw/svg/glyph.js b/framework/src/onos/web/gui/src/main/webapp/app/fw/svg/glyph.js
index 838a2ac0..28f262a1 100644
--- a/framework/src/onos/web/gui/src/main/webapp/app/fw/svg/glyph.js
+++ b/framework/src/onos/web/gui/src/main/webapp/app/fw/svg/glyph.js
@@ -55,6 +55,15 @@
unknown: "M35,40a5,5,0,0,1,5-5h30a5,5,0,0,1,5,5v30a5,5,0,0,1-5,5" +
"h-30a5,5,0,0,1-5-5z",
+ query: "M51.4,69.9c0-0.9,0-1.6,0-2.1c0-2.7,0.4-5.1,1.2-7.1" +
+ "c0.6-1.5,1.5-3,2.8-4.5c0.9-1.1,2.6-2.7,5.1-4.8c2.4-2.1,4-3.8," +
+ "4.8-5.1 c0.7-1.3,1.1-2.6,1.1-4.1c0-2.7-1.1-5.1-3.2-7.1c-2.1-2" +
+ "-4.8-3.1-7.9-3.1c-3,0-5.5,0.9-7.5,2.8c-2,1.9-3.3,4.8-4,8.7l-7.2" +
+ "-0.8 c0.7-5.3,2.6-9.3,5.8-12.1c3.2-2.8,7.5-4.2,12.8-4.2c5.6,0," +
+ "10.1,1.5,13.4,4.5c3.3,3,5,6.7,5,10.9c0,2.5-0.6,4.8-1.8,6.8 " +
+ "s-3.5,4.6-6.9,7.6c-2.3,2-3.8,3.5-4.5,4.4c-0.7,1-1.2,2-1.6,3.3" +
+ "c-0.3,1.2-0.5,3.2-0.6,6H51.4z M51,83.8v-7.9h8v7.9H51z",
+
node: "M15,100a5,5,0,0,1-5-5v-65a5,5,0,0,1,5-5h80a5,5,0,0,1,5,5" +
"v65a5,5,0,0,1-5,5zM14,22.5l11-11a10,3,0,0,1,10-2h40a10,3,0,0,1," +
"10,2l11,11zM16,35a5,5,0,0,1,10,0a5,5,0,0,1-10,0z",
@@ -84,6 +93,22 @@
"M50,29l12,0,0-8,18,13-18,13,0-8-12,0zM60,57l-12,0,0-8-18,13," +
"18,13,0-8,12,0z",
+ microwave: "M85,71.2c-8.9,10.5-29.6,8.7-45.3-3.5C23.9,55.4,19.8," +
+ "37,28.6,26.5C29.9,38.6,71.5,69.9,85,71.2z M92.7,76.2M16.2,15 " +
+ "M69.5,100.7v-4c0-1.4-1.2-2.2-2.6-2.2H19.3c-1.4,0-2.8,0.7-2.8,2.2" +
+ "v3.9c0,0.7,0.8,1,1.5,1h50.3C69,101.5,69.5,101.3,69.5,100.7z " +
+ "M77.3,7.5l0,3.7c9,0.1,16.3,7.1,16.2,15.7l3.9,0C97.5,16.3,88.5," +
+ "7.6,77.3,7.5z M77.6,14.7l0,2.5c5.3,0,9.7,4.2,9.6,9.3l2.6,0C89.9" +
+ ",20,84.4,14.7,77.6,14.7z M82.3,22.2c-1.3-1.2-2.9-1.9-4.7-1.9" +
+ "l0,1.2c1.4,0,2.8,0.6,3.8,1.5c1,1,1.6,2.3,1.6,3.7l1.3,0C84.3,25.1," +
+ "83.6,23.4,82.3,22.2z M38.9,69.5l-5.1,23h16.5l-2.5-17.2C44.1,73.3," +
+ "38.9,69.5,38.9,69.5zM58.1,54.1c13.7,10.1,26.5,16.8,29.2,13.7" +
+ "c2.7-3.1-5.6-13-19.3-24.4 M62.9,34.2 M62,37.9C47.7,27.3,33.7,20," +
+ "31,23.1c-2.7,3.2,7,14.2,20.6,26 M73.9,25.7c-2.9,0.1-5.2,2.3-5.1," +
+ "4.8c0,0.7,0.2,1.4,0.6,2l0,0L53.8,49.7l3.3,2.5L72.7,35l-0.4-0.3" +
+ "c0.6,0.2,1.3,0.3,1.9,0.3c2.9-0.1,5.2-2.3,5.1-4.9C79.3,27.6,76.8," +
+ "25.6,73.9,25.7z",
+
chain: "M60.4,77.6c-4.9,5.2-9.6,11.3-15.3,16.3c-8.6,7.5-20.4,6.8" +
"-28-0.8c-7.7-7.7-8.4-19.6-0.8-28.4c6.5-7.4,13.5-14.4,20.9-20.9" +
"c7.5-6.7,19.2-6.7,26.5-0.8c3.5,2.8,4.4,6.1,2.2,8.7c-2.7,3.1" +
@@ -570,6 +595,10 @@
return glyphs.get(id);
}
+ function glyphDefined(id) {
+ return glyphs.has(id);
+ }
+
// Note: defs should be a D3 selection of a single <defs> element
function loadDefs(defs, glyphIds, noClear) {
var list = fs.isA(glyphIds) || ids(),
@@ -633,6 +662,7 @@
registerGlyphSet: registerGlyphSet,
ids: ids,
glyph: glyph,
+ glyphDefined: glyphDefined,
loadDefs: loadDefs,
addGlyph: addGlyph
};
diff --git a/framework/src/onos/web/gui/src/main/webapp/app/fw/svg/icon.js b/framework/src/onos/web/gui/src/main/webapp/app/fw/svg/icon.js
index ba794313..15b44bc9 100644
--- a/framework/src/onos/web/gui/src/main/webapp/app/fw/svg/icon.js
+++ b/framework/src/onos/web/gui/src/main/webapp/app/fw/svg/icon.js
@@ -64,7 +64,8 @@
nav_devs: 'switch',
nav_links: 'ports',
nav_hosts: 'endstation',
- nav_intents: 'relatedIntents'
+ nav_intents: 'relatedIntents',
+ nav_processors: 'allTraffic'
};
function ensureIconLibDefs() {
@@ -162,6 +163,7 @@
// Returns the D3 selection of the icon.
function addDeviceIcon(elem, glyphId) {
var cfg = config.device,
+ gid = gs.glyphDefined(glyphId) ? glyphId : 'query',
g = elem.append('g')
.attr('class', 'svgIcon deviceIcon');
@@ -174,7 +176,7 @@
});
g.append('use').attr({
- 'xlink:href': '#' + glyphId,
+ 'xlink:href': '#' + gid,
width: cfg.dim,
height: cfg.dim
});
diff --git a/framework/src/onos/web/gui/src/main/webapp/app/fw/util/keys.js b/framework/src/onos/web/gui/src/main/webapp/app/fw/util/keys.js
index 2985565c..5ff4f7f4 100644
--- a/framework/src/onos/web/gui/src/main/webapp/app/fw/util/keys.js
+++ b/framework/src/onos/web/gui/src/main/webapp/app/fw/util/keys.js
@@ -25,6 +25,7 @@
// internal state
var enabled = true,
+ globalEnabled = true,
keyHandler = {
globalKeys: {},
maskedKeys: {},
@@ -116,6 +117,9 @@
}
function quickHelp(view, key, code, ev) {
+ if (!globalEnabled) {
+ return false;
+ }
qhs.showQuickHelp(keyHandler);
return true;
}
@@ -126,6 +130,9 @@
}
function toggleTheme(view, key, code, ev) {
+ if (!globalEnabled) {
+ return false;
+ }
ts.toggleTheme();
return true;
}
@@ -173,6 +180,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 +232,11 @@
},
enableKeys: function (b) {
enabled = b;
- }
+ },
+ enableGlobalKeys: function (b) {
+ globalEnabled = b;
+ },
+ checkNotGlobal: checkNotGlobal
};
}]);