GUI: Added ESLint to gulp tasks. ONOS-6521
Commented out gulp tasks making this change uneffective
Fixed an error in the build script
Change-Id: I4f4f9762aa1a66304aa74b3ab208095b9c1d4515
diff --git a/web/gui/src/main/webapp/app/fw/layer/dialog.js b/web/gui/src/main/webapp/app/fw/layer/dialog.js
index 6b6f5df..0b165a8 100644
--- a/web/gui/src/main/webapp/app/fw/layer/dialog.js
+++ b/web/gui/src/main/webapp/app/fw/layer/dialog.js
@@ -23,12 +23,12 @@
'use strict';
// injected refs
- var $log, $window, fs, ps, bns, ks;
+ var $log, fs, ps, ks;
// configuration
var defaultSettings = {
width: 300,
- edge: 'left'
+ edge: 'left',
};
// internal state
@@ -92,7 +92,7 @@
appendHeader: hAppend,
appendBody: bAppend,
appendFooter: fAppend,
- destroy: destroy
+ destroy: destroy,
};
}
@@ -141,7 +141,7 @@
function _addOk(cb, text, chained) {
return addButton(cb, text || 'OK', 'enter', chained);
}
-
+
function addOk(cb, text) {
return _addOk(cb, text, false);
}
@@ -178,7 +178,7 @@
addCancel: addCancel,
bindKeys: function () {
ks.dialogKeys(keyBindings);
- }
+ },
};
return dApi;
}
@@ -207,25 +207,21 @@
angular.module('onosLayer')
.factory('DialogService',
- ['$log', '$window', 'FnService', 'PanelService', 'ButtonService',
- 'KeyService',
+ ['$log', 'FnService', 'PanelService', 'KeyService',
- // TODO: for now, $window is not used, but we should provide an option
- // to center the dialog on the window.
+ // TODO: use $window to provide an option to center the
+ // dialog on the window.
- function (_$log_, _$window_, _fs_, _ps_, _bns_, _ks_) {
+ function (_$log_, _fs_, _ps_, _ks_) {
$log = _$log_;
- $window = _$window_;
fs = _fs_;
ps = _ps_;
- bns = _bns_;
ks = _ks_;
return {
openDialog: openDialog,
closeDialog: closeDialog,
- createDiv: createDiv
+ createDiv: createDiv,
};
}]);
-
}());
diff --git a/web/gui/src/main/webapp/app/fw/layer/flash.js b/web/gui/src/main/webapp/app/fw/layer/flash.js
index 375c3ba..641da31 100644
--- a/web/gui/src/main/webapp/app/fw/layer/flash.js
+++ b/web/gui/src/main/webapp/app/fw/layer/flash.js
@@ -24,12 +24,12 @@
'use strict';
// injected references
- var $log, $timeout;
+ var $timeout;
// configuration
var defaultSettings = {
fade: 200,
- showFor: 1200
+ showFor: 1200,
},
w = '100%',
h = 200,
@@ -70,7 +70,7 @@
svg = flashDiv.append('svg').attr({
width: w,
height: h,
- viewBox: vbox
+ viewBox: vbox,
});
}
@@ -93,7 +93,7 @@
.append('g')
.attr({
class: 'flashItem',
- opacity: 0
+ opacity: 0,
})
.transition()
.duration(settings.fade)
@@ -151,9 +151,8 @@
}
angular.module('onosLayer')
- .factory('FlashService', ['$log', '$timeout',
- function (_$log_, _$timeout_) {
- $log = _$log_;
+ .factory('FlashService', ['$timeout',
+ function (_$timeout_) {
$timeout = _$timeout_;
function initFlash(opts) {
@@ -166,7 +165,7 @@
initFlash: initFlash,
flash: flash,
enable: enable,
- tempDiv: tempDiv
+ tempDiv: tempDiv,
};
}]);
diff --git a/web/gui/src/main/webapp/app/fw/layer/loading.js b/web/gui/src/main/webapp/app/fw/layer/loading.js
index b8bfc2e..9f02e84 100644
--- a/web/gui/src/main/webapp/app/fw/layer/loading.js
+++ b/web/gui/src/main/webapp/app/fw/layer/loading.js
@@ -23,7 +23,7 @@
'use strict';
// injected references
- var $log, $timeout, ts, fs;
+ var $timeout, ts, fs;
// constants
var id = 'loading-anim',
@@ -122,10 +122,9 @@
angular.module('onosLayer')
.factory('LoadingService',
- ['$log', '$timeout', 'ThemeService', 'FnService', 'WebSocketService',
+ ['$timeout', 'ThemeService', 'FnService', 'WebSocketService',
- function (_$log_, _$timeout_, _ts_, _fs_, wss) {
- $log = _$log_;
+ function (_$timeout_, _ts_, _fs_, wss) {
$timeout = _$timeout_;
ts = _ts_;
fs = _fs_;
@@ -135,10 +134,10 @@
var self = {
start: start,
stop: stop,
- waiting: waiting
+ waiting: waiting,
};
wss._setLoadingDelegate(self);
return self;
}]);
-}());
\ No newline at end of file
+}());
diff --git a/web/gui/src/main/webapp/app/fw/layer/panel.js b/web/gui/src/main/webapp/app/fw/layer/panel.js
index 2005cfd..91682aa 100644
--- a/web/gui/src/main/webapp/app/fw/layer/panel.js
+++ b/web/gui/src/main/webapp/app/fw/layer/panel.js
@@ -28,7 +28,7 @@
margin: 20,
hideMargin: 20,
xtnTime: 750,
- fade: true
+ fade: true,
};
var panels,
@@ -71,7 +71,7 @@
id: id,
settings: settings,
on: false,
- el: null
+ el: null,
},
api = {
show: showPanel,
@@ -84,7 +84,7 @@
bbox: panelBBox,
isVisible: panelIsVisible,
classed: classed,
- el: panelEl
+ el: panelEl,
};
p.el = panelLayer.append('div')
@@ -215,7 +215,7 @@
return {
init: init,
createPanel: createPanel,
- destroyPanel: destroyPanel
+ destroyPanel: destroyPanel,
};
}]);
}());
diff --git a/web/gui/src/main/webapp/app/fw/layer/quickhelp.js b/web/gui/src/main/webapp/app/fw/layer/quickhelp.js
index 8d47dde..46a5c79 100644
--- a/web/gui/src/main/webapp/app/fw/layer/quickhelp.js
+++ b/web/gui/src/main/webapp/app/fw/layer/quickhelp.js
@@ -27,7 +27,7 @@
// configuration
var defaultSettings = {
- fade: 500
+ fade: 500,
},
w = '100%',
h = '80%',
@@ -56,12 +56,12 @@
leftArrow: 'L-arrow',
upArrow: 'U-arrow',
rightArrow: 'R-arrow',
- downArrow: 'D-arrow'
+ downArrow: 'D-arrow',
};
// list of needed bindings to use in aggregateData
var neededBindings = [
- 'globalKeys', 'globalFormat', 'viewKeys', 'viewGestures'
+ 'globalKeys', 'globalFormat', 'viewKeys', 'viewGestures',
];
// ===========================================
@@ -88,7 +88,7 @@
aggKey = el.append('g').attr('visibility', 'hidden'),
gcol = el.append('g').attr({
'class': cls,
- transform: sus.translate(xCount, 0)
+ transform: sus.translate(xCount, 0),
});
c.forEach(function (j) {
@@ -101,12 +101,12 @@
gcol.append('text').text(k)
.attr({
'class': 'key',
- y: oy
+ y: oy,
});
gcol.append('text').text(v)
.attr({
'class': 'desc',
- y: oy
+ y: oy,
});
}
@@ -140,7 +140,7 @@
var entering = rows.enter()
.append('g')
.attr({
- 'class': 'qhrow'
+ 'class': 'qhrow',
});
entering.each(function (r, i) {
@@ -169,7 +169,7 @@
rect.attr({
width: paneW,
height: paneH,
- transform: sus.translate(-paneW/2-pad, 0)
+ transform: sus.translate(-paneW/2-pad, 0),
});
}
@@ -279,7 +279,7 @@
pane = svg.append('g')
.attr({
class: 'help',
- opacity: 0
+ opacity: 0,
});
rect = pane.append('rect')
@@ -290,7 +290,7 @@
.attr({
class: 'title',
dy: '1.2em',
- transform: sus.translate(-pad,0)
+ transform: sus.translate(-pad, 0),
});
items = pane.append('g');
@@ -316,7 +316,7 @@
.attr({
width: w,
height: h,
- viewBox: vbox
+ viewBox: vbox,
});
}
@@ -338,7 +338,7 @@
'needed bindings for help panel not provided:',
neededBindings
);
- return false
+ return false;
}
return true;
}
@@ -387,7 +387,7 @@
return {
initQuickHelp: initQuickHelp,
showQuickHelp: showQuickHelp,
- hideQuickHelp: hideQuickHelp
+ hideQuickHelp: hideQuickHelp,
};
}]);
diff --git a/web/gui/src/main/webapp/app/fw/layer/veil.js b/web/gui/src/main/webapp/app/fw/layer/veil.js
index b38c333..677ffc4 100644
--- a/web/gui/src/main/webapp/app/fw/layer/veil.js
+++ b/web/gui/src/main/webapp/app/fw/layer/veil.js
@@ -41,7 +41,7 @@
svg = veil.select('svg').attr({
width: ww,
- height: wh
+ height: wh,
}).style('opacity', 0.2);
gs.addGlyph(svg, 'bird', birdDim, false, [birdCenter, shrink/2]);
@@ -71,7 +71,7 @@
function lostServer(ctrlName, msg) {
if ($route.current.$$route.controller === ctrlName) {
$log.debug('VEIL-service: ', ctrlName);
- show(msg)
+ show(msg);
} else {
$log.debug('VEIL-service: IGNORING ', ctrlName);
}
@@ -92,7 +92,7 @@
init: init,
show: show,
hide: hide,
- lostServer: lostServer
+ lostServer: lostServer,
};
wss._setVeilDelegate(self);
return self;
diff --git a/web/gui/src/main/webapp/app/fw/mast/mast.js b/web/gui/src/main/webapp/app/fw/mast/mast.js
index 7686540..e305a02 100644
--- a/web/gui/src/main/webapp/app/fw/mast/mast.js
+++ b/web/gui/src/main/webapp/app/fw/mast/mast.js
@@ -24,7 +24,7 @@
var mastHeight = 48,
padMobile = 16,
dialogOpts = {
- edge: 'left'
+ edge: 'left',
};
var ls;
@@ -83,8 +83,8 @@
}
wss.bindHandlers({
- 'guiAdded': function () { triggerRefresh('add') },
- 'guiRemoved': function () { triggerRefresh('rem') }
+ 'guiAdded': function () { triggerRefresh('add'); },
+ 'guiRemoved': function () { triggerRefresh('rem'); },
});
// delegate to NavService
@@ -120,8 +120,8 @@
return {
mastHeight: function () {
return fs.isMobile() ? mastHeight + padMobile : mastHeight;
- }
- }
+ },
+ };
}]);
}());
diff --git a/web/gui/src/main/webapp/app/fw/nav/nav.js b/web/gui/src/main/webapp/app/fw/nav/nav.js
index c707b71..671fa91 100644
--- a/web/gui/src/main/webapp/app/fw/nav/nav.js
+++ b/web/gui/src/main/webapp/app/fw/nav/nav.js
@@ -79,7 +79,7 @@
self.hideNav = hideNav;
$log.log('NavCtrl has been created');
- }
+ },
])
.factory('NavService',
['$log', '$location', '$window', 'FnService',
@@ -95,7 +95,7 @@
hideNav: hideNav,
toggleNav: toggleNav,
hideIfShown: hideIfShown,
- navTo: navTo
+ navTo: navTo,
};
}]);
diff --git a/web/gui/src/main/webapp/app/fw/remote/rest.js b/web/gui/src/main/webapp/app/fw/remote/rest.js
index 3114faf..8c281d4 100644
--- a/web/gui/src/main/webapp/app/fw/remote/rest.js
+++ b/web/gui/src/main/webapp/app/fw/remote/rest.js
@@ -66,7 +66,7 @@
return {
get: get,
- post: post
+ post: post,
};
}]);
}());
diff --git a/web/gui/src/main/webapp/app/fw/remote/urlfn.js b/web/gui/src/main/webapp/app/fw/remote/urlfn.js
index d6b6cfb..be2fc1f 100644
--- a/web/gui/src/main/webapp/app/fw/remote/urlfn.js
+++ b/web/gui/src/main/webapp/app/fw/remote/urlfn.js
@@ -68,7 +68,7 @@
return {
rsUrl: rsUrl,
- wsUrl: wsUrl
+ wsUrl: wsUrl,
};
}]);
diff --git a/web/gui/src/main/webapp/app/fw/remote/websocket.js b/web/gui/src/main/webapp/app/fw/remote/websocket.js
index 18f4ea1..ff6c063 100644
--- a/web/gui/src/main/webapp/app/fw/remote/websocket.js
+++ b/web/gui/src/main/webapp/app/fw/remote/websocket.js
@@ -24,19 +24,19 @@
var $log, $loc, fs, ufs, wsock, vs, ls;
// internal state
- var webSockOpts, // web socket options
- ws = null, // web socket reference
- wsUp = false, // web socket is good to go
- handlers = {}, // event handler bindings
- pendingEvents = [], // events TX'd while socket not up
- host, // web socket host
- url, // web socket URL
- clusterNodes = [], // ONOS instances data for failover
- clusterIndex = -1, // the instance to which we are connected
- connectRetries = 0, // limit our attempts at reconnecting
- openListeners = {}, // registered listeners for websocket open()
- nextListenerId = 1, // internal ID for open listeners
- loggedInUser = null; // name of logged-in user
+ var webSockOpts, // web socket options
+ ws = null, // web socket reference
+ wsUp = false, // web socket is good to go
+ handlers = {}, // event handler bindings
+ pendingEvents = [], // events TX'd while socket not up
+ host, // web socket host
+ url, // web socket URL
+ clusterNodes = [], // ONOS instances data for failover
+ clusterIndex = -1, // the instance to which we are connected
+ connectRetries = 0, // limit our attempts at reconnecting
+ openListeners = {}, // registered listeners for websocket open()
+ nextListenerId = 1, // internal ID for open listeners
+ loggedInUser = null; // name of logged-in user
// built-in handlers
var builtinHandlers = {
@@ -62,9 +62,9 @@
vs && vs.show([
'Oops!',
'Server reports error...',
- m
+ m,
]);
- }
+ },
};
@@ -129,7 +129,7 @@
vs && vs.show([
'Oops!',
'Web-socket connection to server closed...',
- 'Try refreshing the page.'
+ 'Try refreshing the page.',
]);
}
}
@@ -210,7 +210,7 @@
ws.onmessage = handleMessage;
ws.onclose = handleClose;
- sendEvent('authentication', {token: onosAuth});
+ sendEvent('authentication', { token: onosAuth });
}
// Note: Wsock logs an error if the new WebSocket call fails
return url;
@@ -299,7 +299,7 @@
function sendEvent(evType, payload) {
var ev = {
event: evType,
- payload: payload || {}
+ payload: payload || {},
};
if (wsUp) {
@@ -347,9 +347,9 @@
loggedInUser: function () { return loggedInUser || '(no-one)'; },
_setVeilDelegate: setVeilDelegate,
- _setLoadingDelegate: setLoadingDelegate
+ _setLoadingDelegate: setLoadingDelegate,
};
- }
+ },
]);
}());
diff --git a/web/gui/src/main/webapp/app/fw/remote/wsock.js b/web/gui/src/main/webapp/app/fw/remote/wsock.js
index b0168c8..fe76be4 100644
--- a/web/gui/src/main/webapp/app/fw/remote/wsock.js
+++ b/web/gui/src/main/webapp/app/fw/remote/wsock.js
@@ -36,7 +36,7 @@
}
return {
- newWebSocket: newWebSocket
+ newWebSocket: newWebSocket,
};
}]);
}());
diff --git a/web/gui/src/main/webapp/app/fw/svg/geodata.js b/web/gui/src/main/webapp/app/fw/svg/geodata.js
index 31bef50..5270e00 100644
--- a/web/gui/src/main/webapp/app/fw/svg/geodata.js
+++ b/web/gui/src/main/webapp/app/fw/svg/geodata.js
@@ -93,7 +93,7 @@
promise.meta = {
id: id,
url: url,
- wasCached: false
+ wasCached: false,
};
promise.then(function (response) {
@@ -118,7 +118,7 @@
objectTag: 'states',
projection: d3.geo.mercator(),
logicalSize: 1000,
- mapFillScale: .95
+ mapFillScale: .95,
};
// converts given TopoJSON-format data into corresponding GeoJSON
@@ -138,7 +138,7 @@
return {
geodata: geoData,
pathgen: path,
- settings: settings
+ settings: settings,
};
}
@@ -181,7 +181,7 @@
clearCache: clearCache,
fetchTopoData: fetchTopoData,
createPathGenerator: createPathGenerator,
- rescaleProjection: rescaleProjection
+ rescaleProjection: rescaleProjection,
};
}]);
-}());
\ No newline at end of file
+}());
diff --git a/web/gui/src/main/webapp/app/fw/svg/glyph.js b/web/gui/src/main/webapp/app/fw/svg/glyph.js
index e029f12..a333929 100644
--- a/web/gui/src/main/webapp/app/fw/svg/glyph.js
+++ b/web/gui/src/main/webapp/app/fw/svg/glyph.js
@@ -29,8 +29,8 @@
// constants
var msgGS = 'GlyphService.',
- rg = "registerGlyphs(): ",
- rgs = "registerGlyphSet(): ";
+ rg = 'registerGlyphs(): ',
+ rgs = 'registerGlyphSet(): ';
// ----------------------------------------------------------------------
@@ -42,7 +42,7 @@
if (!overwrite && glyphs.get(key)) {
dups.push(key);
} else {
- glyphs.set(key, {id: key, vb: vbox, d: value});
+ glyphs.set(key, { id: key, vb: vbox, d: value });
}
}
@@ -166,7 +166,7 @@
width: sz,
height: sz,
'class': 'glyph',
- 'xlink:href': '#' + glyphId
+ 'xlink:href': '#' + glyphId,
};
if (xns) {
@@ -196,7 +196,7 @@
glyph: glyph,
glyphDefined: glyphDefined,
loadDefs: loadDefs,
- addGlyph: addGlyph
+ addGlyph: addGlyph,
};
return api;
}]
diff --git a/web/gui/src/main/webapp/app/fw/svg/glyphData.js b/web/gui/src/main/webapp/app/fw/svg/glyphData.js
index 3c80974..4d2cfbc 100644
--- a/web/gui/src/main/webapp/app/fw/svg/glyphData.js
+++ b/web/gui/src/main/webapp/app/fw/svg/glyphData.js
@@ -60,7 +60,7 @@
'm-0.6,7.4a21.3,21.3,0,0,0,5.9,11.7l5.7,5.7' +
'c3,3,9,4.1,11.9,1.3-3.3.9-5.9-1.2-7.9-3.2L34.3,88.1Z' +
'm3.5-12.4a16.6,16.6,0,0,0-2.3,3.6L57,100.8' +
- 'c3,3,9,4.1,11.9,1.3-3.3.9-5.9-1.2-7.9-3.2Z'
+ 'c3,3,9,4.1,11.9,1.3-3.3.9-5.9-1.2-7.9-3.2Z',
},
@@ -521,7 +521,7 @@
'L22,23.7z M97.9,46.5H77.2L88,23.7L97.9,46.5z',
xClose: 'M20,8l35,35,35-35,12,12-35,35,35,35-12,12-35-35-35,35' +
- '-12-12,35-35-35-35,12-12Z'
+ '-12-12,35-35-35-35,12-12Z',
},
badgeDataSet = {
@@ -545,7 +545,7 @@
play: 'M3,1.5l3.5,3.5l-3.5,3.5z',
- stop: 'M2.5,2.5h5v5h-5z'
+ stop: 'M2.5,2.5h5v5h-5z',
},
spriteData = {
@@ -560,7 +560,7 @@
'M93.6,74.7c10.2-2,10.7-14,5.8-18.3' +
'M71.1,79.3c11.2,7.6,24.6,6.4,22.1-11.7' +
'M36.4,76.8c3.4,13.3,35.4,11.6,36.1-1.4' +
- 'M70.4,31c11.8-10.4,26.2-5.2,24.7,10.1'
+ 'M70.4,31c11.8-10.4,26.2-5.2,24.7,10.1',
},
@@ -1282,7 +1282,7 @@
'M81.7,80.8H17.9a1.8,1.8,0,0,1-1.6-2.7l9.2-16.8' +
'a1.8,1.8,0,0,1,1.6-1h9.5a1.8,1.8,0,1,1,0,3.7H28.2L21,77.1H78.6' +
'L71.4,64H61.9a1.8,1.8,0,1,1,0-3.7H72.5a1.8,1.8,0,0,1,1.6,1' +
- 'l9.2,16.8A1.8,1.8,0,0,1,81.7,80.8Z'
+ 'l9.2,16.8A1.8,1.8,0,0,1,81.7,80.8Z',
},
extraGlyphs = {
@@ -1295,7 +1295,7 @@
'a175.5,175.5,0,0,0,58.6-10l3.9-1.4,3.9-1.5,3.9-1.7h0' +
'l3.9-1.7,2.8-1.3,2.7-1.4a175.6,175.6,0,0,0,95.9-155.1' +
'C372.4,226.7,358,290.1,286.5,289.9ZM110.1,237.7' +
- 'A33.6,33.6,0,1,1,143.7,204,33.6,33.6,0,0,1,110.1,237.7Z'
+ 'A33.6,33.6,0,1,1,143.7,204,33.6,33.6,0,0,1,110.1,237.7Z',
};
@@ -1317,7 +1317,7 @@
.factory('GlyphDataService',
[function () {
return {
- registerCoreGlyphs: registerCoreGlyphs
+ registerCoreGlyphs: registerCoreGlyphs,
};
}]
);
diff --git a/web/gui/src/main/webapp/app/fw/svg/icon.js b/web/gui/src/main/webapp/app/fw/svg/icon.js
index 67a557b..aabbc17 100644
--- a/web/gui/src/main/webapp/app/fw/svg/icon.js
+++ b/web/gui/src/main/webapp/app/fw/svg/icon.js
@@ -20,7 +20,7 @@
(function () {
'use strict';
- var $log, fs, gs, sus;
+ var $log, gs, sus;
var vboxSize = 50,
cornerSize = vboxSize / 10,
@@ -39,7 +39,6 @@
delta: 'delta',
nonzero: 'nonzero',
-
close: 'xClose',
topo: 'topo',
@@ -79,8 +78,8 @@
nav_links: 'ports',
nav_hosts: 'endstation',
nav_intents: 'relatedIntents',
- nav_tunnels: 'ports', // TODO: use tunnel glyph, when available
- nav_yang: 'yang'
+ nav_tunnels: 'ports', // TODO: use tunnel glyph, when available
+ nav_yang: 'yang',
};
function ensureIconLibDefs() {
@@ -115,24 +114,24 @@
'class': svgCls,
width: dim,
height: dim,
- viewBox: viewBox
+ viewBox: viewBox,
});
g = svg.append('g').attr({
- 'class': 'icon'
+ 'class': 'icon',
});
g.append('rect').attr({
width: vboxSize,
height: vboxSize,
- rx: cornerSize
+ rx: cornerSize,
});
g.append('use').attr({
width: vboxSize,
height: vboxSize,
'class': 'glyph',
- 'xlink:href': '#' + gid
+ 'xlink:href': '#' + gid,
});
}
@@ -159,7 +158,7 @@
return elem.append('use').attr({
'xlink:href': '#' + gid,
width: iconDim,
- height: iconDim
+ height: iconDim,
});
}
@@ -175,7 +174,7 @@
'xlink:href': '#' + glyphId,
width: dim,
height: dim,
- transform: sus.translate(xlate,xlate)
+ transform: sus.translate(xlate, xlate),
});
return g;
}
@@ -190,7 +189,7 @@
return {
asc: function (div) { _s(div, 'upArrow'); },
desc: function (div) { _s(div, 'downArrow'); },
- none: function (div) { div.remove(); }
+ none: function (div) { div.remove(); },
};
}
@@ -218,16 +217,15 @@
div.selectAll('*').remove();
is.loadEmbeddedIcon(div, attrs.iconId, attrs.iconSize);
});
- }
+ },
};
}])
- .factory('IconService', ['$log', 'FnService', 'GlyphService',
+ .factory('IconService', ['$log', 'GlyphService',
'SvgUtilService',
- function (_$log_, _fs_, _gs_, _sus_) {
+ function (_$log_, _gs_, _sus_) {
$log = _$log_;
- fs = _fs_;
gs = _gs_;
sus = _sus_;
@@ -238,7 +236,7 @@
addDeviceIcon: addDeviceIcon,
addHostIcon: addHostIcon,
sortIcons: sortIcons,
- registerIconMapping: registerIconMapping
+ registerIconMapping: registerIconMapping,
};
}]);
diff --git a/web/gui/src/main/webapp/app/fw/svg/map.js b/web/gui/src/main/webapp/app/fw/svg/map.js
index ea67428..3d79d64 100644
--- a/web/gui/src/main/webapp/app/fw/svg/map.js
+++ b/web/gui/src/main/webapp/app/fw/svg/map.js
@@ -35,7 +35,7 @@
'use strict';
// injected references
- var $log, $q, fs, gds;
+ var $log, $q, gds;
// NOTE: This method assumes the datafile has exactly the map data
// that you want to load; for example id="*continental_us"
@@ -87,7 +87,7 @@
// });
function loadMapRegionInto(mapLayer, opts) {
- var promise = gds.fetchTopoData("*countries"),
+ var promise = gds.fetchTopoData('*countries'),
deferredProjection = $q.defer();
if (!promise) {
@@ -105,7 +105,7 @@
country = features.filter(opts.countryFilter),
countryFeature = {
type: 'FeatureCollection',
- features: country
+ features: country,
},
path = d3.geo.path().projection(proj);
@@ -137,7 +137,7 @@
svg.style('background-color', bg);
paths.attr({
stroke: stroke,
- fill: fill
+ fill: fill,
});
} else {
svg.style('background-color', null);
@@ -145,17 +145,16 @@
}
angular.module('onosSvg')
- .factory('MapService', ['$log', '$q', 'FnService', 'GeoDataService',
- function (_$log_, _$q_, _fs_, _gds_) {
+ .factory('MapService', ['$log', '$q', 'GeoDataService',
+ function (_$log_, _$q_, _gds_) {
$log = _$log_;
$q = _$q_;
- fs = _fs_;
gds = _gds_;
return {
loadMapRegionInto: loadMapRegionInto,
loadMapInto: loadMapInto,
- reshade: reshade
+ reshade: reshade,
};
}]);
diff --git a/web/gui/src/main/webapp/app/fw/svg/sprite.js b/web/gui/src/main/webapp/app/fw/svg/sprite.js
index 3d088e1..edf1839 100644
--- a/web/gui/src/main/webapp/app/fw/svg/sprite.js
+++ b/web/gui/src/main/webapp/app/fw/svg/sprite.js
@@ -32,30 +32,30 @@
},
addRect: {
fill: 'gray1',
- stroke: 'none'
+ stroke: 'none',
},
addPath: {
fill: 'none',
- stroke: 'gray1'
- }
+ stroke: 'gray1',
+ },
},
layout: {
builder: {
- grid: 10 // grid square size (in layout coord-space)
+ grid: 10, // grid square size (in layout coord-space)
},
addSprite: {
- anchor: 'topleft' // topleft, center
+ anchor: 'topleft', // topleft, center
},
addLabel: {
- anchor: 'center', // center, left, right
- fontStyle: 'normal' // normal, italic, bold
- }
- }
+ anchor: 'center', // center, left, right
+ fontStyle: 'normal', // normal, italic, bold
+ },
+ },
};
// internal state
- var sprites, // sprite cache
- layouts, // layout cache
+ var sprites, // sprite cache
+ layouts, // layout cache
api;
// ----------------------------------------------------------------------
@@ -81,7 +81,7 @@
var o = angular.extend({}, optDefaults.sprite.addRect, opts);
rects.push({
- x: x, y: y, w: w, h: h, o: o
+ x: x, y: y, w: w, h: h, o: o,
});
return builder;
}
@@ -90,9 +90,9 @@
var o = angular.extend({}, optDefaults.sprite.addPath, opts);
if (fs.isS(d)) {
- paths.push({d: d, o: o});
+ paths.push({ d: d, o: o });
} else if (fs.isA(d)) {
- paths.push({d: d.join(''), o: o});
+ paths.push({ d: d.join(''), o: o });
} else {
$log.warn('addPath: path not a string or array', d);
}
@@ -110,7 +110,7 @@
id: id,
w: w,
h: h,
- opts: o
+ opts: o,
},
paths: paths,
rects: rects,
@@ -118,7 +118,7 @@
// builder API
addRect: addRect,
addPath: addPath,
- register: register
+ register: register,
};
return builder;
@@ -153,7 +153,7 @@
}
sprs.push({
- sprite: s, x: x, y: y, w: w, anchor: o.anchor
+ sprite: s, x: x, y: y, w: w, anchor: o.anchor,
});
return builder;
}
@@ -162,7 +162,7 @@
var o = angular.extend({}, optDefaults.layout.addLabel, opts);
labs.push({
- text: text, x: x, y: y, anchor: o.anchor, style: o.fontStyle
+ text: text, x: x, y: y, anchor: o.anchor, style: o.fontStyle,
});
return builder;
}
@@ -178,7 +178,7 @@
id: id,
w: w,
h: h,
- opts: o
+ opts: o,
},
sprites: sprs,
labels: labs,
@@ -186,7 +186,7 @@
// builder API
addSprite: addSprite,
addLabel: addLabel,
- register: register
+ register: register,
};
return builder;
@@ -246,7 +246,7 @@
function count() {
return {
sprites: sprites.size(),
- layouts: layouts.size()
+ layouts: layouts.size(),
};
}
@@ -278,7 +278,7 @@
sprite: sprite,
layout: layout,
count: count,
- dump: dump
+ dump: dump,
};
return api;
}]
diff --git a/web/gui/src/main/webapp/app/fw/svg/spriteData.js b/web/gui/src/main/webapp/app/fw/svg/spriteData.js
index 367baa7..30221c8 100644
--- a/web/gui/src/main/webapp/app/fw/svg/spriteData.js
+++ b/web/gui/src/main/webapp/app/fw/svg/spriteData.js
@@ -28,18 +28,18 @@
// TODO: define cloud sprite...
vbox: '0 0 305 186',
d: [
- "M91.2,48.4C121.2,6.3,187.9-13.4,219,45.6",
- "M43.1,139.6C21.8,142.9-15.6,108.4,26.1,79",
- "M103.7,150C89,205.2-11.2,167.4,30.5,138",
- "M192.3,147.3c-33.5,48-82.1,32.3-94.5-8.2",
- "M267.1,115c27.9,67.8-77.6,74.3-83.1,41",
- "M34.3,89.9C10.8,79,59.5,10.7,97.2,39.6",
- "M211.9,34.2c51.9-38.8,118,57.4,59,94.5"
+ 'M91.2,48.4C121.2,6.3,187.9-13.4,219,45.6',
+ 'M43.1,139.6C21.8,142.9-15.6,108.4,26.1,79',
+ 'M103.7,150C89,205.2-11.2,167.4,30.5,138',
+ 'M192.3,147.3c-33.5,48-82.1,32.3-94.5-8.2',
+ 'M267.1,115c27.9,67.8-77.6,74.3-83.1,41',
+ 'M34.3,89.9C10.8,79,59.5,10.7,97.2,39.6',
+ 'M211.9,34.2c51.9-38.8,118,57.4,59,94.5',
],
style: {
fill: 'none',
- 'stroke-miterlimit': 10
- }
+ 'stroke-miterlimit': 10,
+ },
};
// TODO: define other core sprites here...
@@ -55,12 +55,12 @@
// ----------------------------------------------------------$$$
// This following code is for initial development of Topo2 sprite layer
ssApi.createSprite('rack', 40, 50)
- .addRect(0, 0, 40, 50, {fill: 'gold1'})
+ .addRect(0, 0, 40, 50, { fill: 'gold1' })
.addPath([
'M5,20h30v5h-30z',
'M5,30h30v5h-30z',
- 'M5,40h30v5h-30z'
- ], {stroke: 'gray1'})
+ 'M5,40h30v5h-30z',
+ ], { stroke: 'gray1' })
.register();
ssApi.createLayout('segmentRouting', 130, 75)
@@ -68,13 +68,13 @@
.addSprite('rack', 40, 40, 20)
.addSprite('rack', 70, 40, 20)
.addSprite('rack', 100, 40, 20)
- .addLabel('Segment Routing', 120, 10, {anchor: 'right'})
+ .addLabel('Segment Routing', 120, 10, { anchor: 'right' })
.register();
ssApi.createLayout('segmentRoutingTwo', 70, 75)
.addSprite('rack', 10, 40, 20)
.addSprite('rack', 40, 40, 20)
- .addLabel('Segment Routing 2', 120, 10, {anchor: 'right'})
+ .addLabel('Segment Routing 2', 120, 10, { anchor: 'right' })
.register();
ssApi.createLayout('plain', 80, 60)
@@ -90,9 +90,9 @@
.factory('SpriteDataService', [
function () {
return {
- registerCoreSprites: registerCoreSprites
+ registerCoreSprites: registerCoreSprites,
};
- }
+ },
]);
}());
diff --git a/web/gui/src/main/webapp/app/fw/svg/svgUtil.js b/web/gui/src/main/webapp/app/fw/svg/svgUtil.js
index 84b6408..1bdb96b 100644
--- a/web/gui/src/main/webapp/app/fw/svg/svgUtil.js
+++ b/web/gui/src/main/webapp/app/fw/svg/svgUtil.js
@@ -82,8 +82,8 @@
}
drag = d3.behavior.drag()
- .origin(function(d) { return d; })
- .on('dragstart', function(d) {
+ .origin(function (d) { return d; })
+ .on('dragstart', function (d) {
if (clickEnabled() || dragEnabled()) {
d.oldX = d.x;
d.oldY = d.y;
@@ -92,7 +92,7 @@
d.dragStarted = true;
}
})
- .on('drag', function(d) {
+ .on('drag', function (d) {
if (dragEnabled()) {
d.px = d3.event.x;
d.py = d3.event.y;
@@ -103,7 +103,7 @@
}
}
})
- .on('dragend', function(d) {
+ .on('dragend', function (d) {
d3.event.sourceEvent.stopPropagation();
if (d.dragStarted) {
@@ -170,22 +170,22 @@
// Colors per Mojo-Design's color palette.. (version two)
// blue lt blue red green brown teal lime
- var lightNorm = ['#5b99d2', '#66cef6', '#d05a55', '#0f9d58', '#ba7941', '#3dc0bf', '#56af00' ],
- lightMute = ['#9ebedf', '#abdef5', '#d79a96', '#7cbe99', '#cdab8d', '#96d5d5', '#a0c96d' ],
+ var lightNorm = ['#5b99d2', '#66cef6', '#d05a55', '#0f9d58', '#ba7941', '#3dc0bf', '#56af00'],
+ lightMute = ['#9ebedf', '#abdef5', '#d79a96', '#7cbe99', '#cdab8d', '#96d5d5', '#a0c96d'],
- darkNorm = ['#5b99d2', '#66cef6', '#d05a55', '#0f9d58', '#ba7941', '#3dc0bf', '#56af00' ],
- darkMute = ['#9ebedf', '#abdef5', '#d79a96', '#7cbe99', '#cdab8d', '#96d5d5', '#a0c96d' ];
+ darkNorm = ['#5b99d2', '#66cef6', '#d05a55', '#0f9d58', '#ba7941', '#3dc0bf', '#56af00'],
+ darkMute = ['#9ebedf', '#abdef5', '#d79a96', '#7cbe99', '#cdab8d', '#96d5d5', '#a0c96d'];
var colors= {
light: {
norm: d3.scale.ordinal().range(lightNorm),
- mute: d3.scale.ordinal().range(lightMute)
+ mute: d3.scale.ordinal().range(lightMute),
},
dark: {
norm: d3.scale.ordinal().range(darkNorm),
- mute: d3.scale.ordinal().range(darkMute)
- }
+ mute: d3.scale.ordinal().range(darkMute),
+ },
};
function cat7() {
@@ -231,7 +231,7 @@
cx: x,
cy: y,
r: 5,
- fill: f
+ fill: f,
});
});
g.append('rect').attr({
@@ -240,13 +240,13 @@
width: 32,
height: 10,
rx: 2,
- fill: '#888'
+ fill: '#888',
});
g.append('text').text(theme + what)
.attr({
x: 142,
y: k * 20 + 2,
- fill: 'white'
+ fill: 'white',
})
.style('font-size', '4pt');
}
@@ -255,7 +255,7 @@
return {
testCard: testCard,
- getColor: getColor
+ getColor: getColor,
};
}
@@ -279,7 +279,7 @@
}
function stripPx(s) {
- return s.replace(/px$/,'');
+ return s.replace(/px$/, '');
}
function safeId(s) {
@@ -318,7 +318,7 @@
rotate: rotate,
stripPx: stripPx,
safeId: safeId,
- visible: visible
+ visible: visible,
};
}]);
}());
diff --git a/web/gui/src/main/webapp/app/fw/svg/zoom.js b/web/gui/src/main/webapp/app/fw/svg/zoom.js
index 00487ec..587cf6a 100644
--- a/web/gui/src/main/webapp/app/fw/svg/zoom.js
+++ b/web/gui/src/main/webapp/app/fw/svg/zoom.js
@@ -25,7 +25,7 @@
zoomMin: 0.05,
zoomMax: 50,
zoomEnabled: function (ev) { return true; },
- zoomCallback: function () {}
+ zoomCallback: function () {},
};
// injected references to services
@@ -95,7 +95,7 @@
settings.zoomLayer.transition()
.duration(transition || 0)
- .attr("transform",
+ .attr('transform',
'translate(' + translate + ')scale(' + scale + ')');
settings.zoomCallback(translate, scale);
@@ -109,7 +109,7 @@
},
reset: function () {
- zoomer.panZoom([0,0], 1);
+ zoomer.panZoom([0, 0], 1);
},
translate: function () {
@@ -122,7 +122,7 @@
scaleExtent: function () {
return zoom.scaleExtent();
- }
+ },
};
// apply the zoom behavior to the SVG element
@@ -130,12 +130,12 @@
// Remove zoom on double click (prevents a
// false zoom navigating regions)
- settings.svg.on("dblclick.zoom", null);
+ settings.svg.on('dblclick.zoom', null);
return zoomer;
}
return {
- createZoomer: createZoomer
+ createZoomer: createZoomer,
};
}]);
diff --git a/web/gui/src/main/webapp/app/fw/util/ee.js b/web/gui/src/main/webapp/app/fw/util/ee.js
index ef89f9d..6b0f7ce 100644
--- a/web/gui/src/main/webapp/app/fw/util/ee.js
+++ b/web/gui/src/main/webapp/app/fw/util/ee.js
@@ -39,7 +39,7 @@
'fmfv',
'hwdoc',
'acxefcsdgt',
- 'pmmn'
+ 'pmmn',
// Add more beans...
];
@@ -56,7 +56,7 @@
i;
for (i = 0; i<n; i+=2)
- w.push(fcc(Number(d.slice(i, i+2))));
+ { w.push(fcc(Number(d.slice(i, i+2)))); }
return fs.eecode(h, w.join(''));
}
@@ -98,7 +98,7 @@
return {
genMap: genMap,
- cluck: cluck
- }
+ cluck: cluck,
+ };
}]);
}());
diff --git a/web/gui/src/main/webapp/app/fw/util/fn.js b/web/gui/src/main/webapp/app/fw/util/fn.js
index e204afc..2a9129a 100644
--- a/web/gui/src/main/webapp/app/fw/util/fn.js
+++ b/web/gui/src/main/webapp/app/fw/util/fn.js
@@ -31,7 +31,7 @@
cca = String.prototype.charCodeAt;
function _parseDebugFlags(dbgstr) {
- var bits = dbgstr ? dbgstr.split(",") : [];
+ var bits = dbgstr ? dbgstr.split(',') : [];
bits.forEach(function (key) {
debugFlags[key] = true;
});
@@ -114,7 +114,7 @@
ow = offW || 0;
return {
height: $window.innerHeight - oh,
- width: $window.innerWidth - ow
+ width: $window.innerWidth - ow,
};
}
@@ -129,10 +129,10 @@
function isChrome() {
var isChromium = $window.chrome,
vendorName = $window.navigator.vendor,
- isOpera = $window.navigator.userAgent.indexOf("OPR") > -1;
+ isOpera = $window.navigator.userAgent.indexOf('OPR') > -1;
return (isChromium !== null &&
isChromium !== undefined &&
- vendorName === "Google Inc." &&
+ vendorName === 'Google Inc.' &&
isOpera == false);
}
@@ -247,7 +247,7 @@
return {
o: w,
d: o.join(''),
- e: fcc.apply(o, o)
+ e: fcc.apply(o, o),
};
}
@@ -301,7 +301,7 @@
np = c.p[q];
x = 1;
}
- return { p: np, s: c.s }
+ return { p: np, s: c.s };
}
function probe(c) {
@@ -309,12 +309,12 @@
k = Object.keys(c.p).length,
np = c.p[q];
- t.push({ q:q, k:k, p:c.p });
+ t.push({ q: q, k: k, p: c.p });
if (!np) {
t = [];
return { s: [] };
}
- return { p: np, s: c.s }
+ return { p: np, s: c.s };
}
function insert() {
@@ -382,7 +382,7 @@
var hasOwn = {}.hasOwnProperty;
- function classNames () {
+ function classNames() {
var classes = [];
for (var i = 0; i < arguments.length; i++) {
@@ -453,7 +453,7 @@
while ((match = matcher.exec(html)) !== null) {
matches.push({
full: match[0],
- name: match[1]
+ name: match[1],
// NOTE: ignoring attributes {match[2].split(' ')} for now
});
}
@@ -527,7 +527,7 @@
trieLookup: trieLookup,
classNames: classNames,
extend: extend,
- sanitize: sanitize
+ sanitize: sanitize,
};
}]);
diff --git a/web/gui/src/main/webapp/app/fw/util/keys.js b/web/gui/src/main/webapp/app/fw/util/keys.js
index 3c9e660..45ba410 100644
--- a/web/gui/src/main/webapp/app/fw/util/keys.js
+++ b/web/gui/src/main/webapp/app/fw/util/keys.js
@@ -21,7 +21,7 @@
'use strict';
// references to injected services
- var $log, $timeout, fs, ts, ns, ee, qhs, ls;
+ var $log, fs, ts, ns, ee, qhs, ls;
// internal state
var enabled = true,
@@ -32,7 +32,7 @@
dialogKeys: {},
viewKeys: {},
viewFn: null,
- viewGestures: []
+ viewGestures: [],
},
seq = {},
matching = false,
@@ -96,7 +96,7 @@
var textFieldDoesNotBlock = {
enter: 1,
- esc: 1
+ esc: 1,
};
function textFieldInput() {
@@ -134,7 +134,7 @@
vk = kh.viewKeys[key],
kl = fs.isF(kh.viewKeys._keyListener),
vcb = fs.isF(vk) || (fs.isA(vk) && fs.isF(vk[0])) || fs.isF(kh.viewFn),
- token = 'keyev'; // indicate this was a key-pressed event
+ token = 'keyev'; // indicate this was a key-pressed event
event.stopPropagation();
@@ -185,7 +185,7 @@
backSlash: [quickHelp, qhlion_show_hide],
slash: [quickHelp, qhlion_show_hide],
esc: [escapeKey, qhlion_hint_esc],
- T: [toggleTheme, qhlion_hint_t]
+ T: [toggleTheme, qhlion_hint_t],
},
globalFormat: ['backSlash', 'slash', 'esc', 'T'],
@@ -194,8 +194,8 @@
maskedKeys: {
slash: 1,
backSlash: 1,
- T: 1
- }
+ T: 1,
+ },
});
}
@@ -244,7 +244,7 @@
}
function unexParam(fname, x) {
- $log.warn(fname, ": unexpected parameter-- ", x);
+ $log.warn(fname, ': unexpected parameter-- ', x);
}
function setKeyBindings(keyArg) {
@@ -273,7 +273,7 @@
globalKeys: gkeys,
maskedKeys: masked,
viewKeys: vkeys,
- viewFunction: vfn
+ viewFunction: vfn,
};
}
@@ -318,12 +318,11 @@
angular.module('onosUtil')
.factory('KeyService',
- ['$log', '$timeout', 'FnService', 'ThemeService', 'NavService',
+ ['$log', 'FnService', 'ThemeService', 'NavService',
'EeService', 'LionService',
- function (_$log_, _$timeout_, _fs_, _ts_, _ns_, _ee_, _ls_) {
+ function (_$log_, _fs_, _ts_, _ns_, _ee_, _ls_) {
$log = _$log_;
- $timeout = _$timeout_;
fs = _fs_;
ts = _ts_;
ns = _ns_;
@@ -372,7 +371,7 @@
enableGlobalKeys: function (b) {
globalEnabled = b;
},
- checkNotGlobal: checkNotGlobal
+ checkNotGlobal: checkNotGlobal,
};
}]);
diff --git a/web/gui/src/main/webapp/app/fw/util/lion.js b/web/gui/src/main/webapp/app/fw/util/lion.js
index a8bb7c8..387c95b 100644
--- a/web/gui/src/main/webapp/app/fw/util/lion.js
+++ b/web/gui/src/main/webapp/app/fw/util/lion.js
@@ -22,11 +22,11 @@
'use strict';
// injected services
- var $log, fs, wss;
+ var $log, wss;
// private state
var handlers = {
- uberlion: uberlion
+ uberlion: uberlion,
},
ubercache = {};
@@ -65,16 +65,15 @@
}
angular.module('onosUtil')
- .factory('LionService', ['$log', 'FnService', 'WebSocketService',
+ .factory('LionService', ['$log', 'WebSocketService',
- function (_$log_, _fs_, _wss_) {
+ function (_$log_, _wss_) {
$log = _$log_;
- fs = _fs_;
wss = _wss_;
return {
init: init,
- bundle: bundle
+ bundle: bundle,
};
}]);
}());
diff --git a/web/gui/src/main/webapp/app/fw/util/prefs.js b/web/gui/src/main/webapp/app/fw/util/prefs.js
index 08bc6f6..fe4201d 100644
--- a/web/gui/src/main/webapp/app/fw/util/prefs.js
+++ b/web/gui/src/main/webapp/app/fw/util/prefs.js
@@ -21,10 +21,10 @@
'use strict';
// injected refs
- var $log, fs, wss;
+ var fs, wss;
// internal state
- var cache = {},
+ var cache = {},
listeners = [];
// returns the preference settings for the specified key
@@ -98,26 +98,25 @@
}
function removeListener(listener) {
- listeners = listeners.filter(function(obj) { return obj === listener; });
+ listeners = listeners.filter(function (obj) { return obj === listener; });
}
angular.module('onosUtil')
- .factory('PrefsService', ['$log', 'FnService', 'WebSocketService',
- function (_$log_, _fs_, _wss_) {
- $log = _$log_;
+ .factory('PrefsService', ['FnService', 'WebSocketService',
+ function (_fs_, _wss_) {
fs = _fs_;
wss = _wss_;
try {
cache = angular.isDefined(userPrefs) ? userPrefs : {};
}
- catch(e){
+ catch (e) {
// browser throws error for non-existing globals
- cache = {}
+ cache = {};
}
wss.bindHandlers({
- updatePrefs: updatePrefs
+ updatePrefs: updatePrefs,
});
return {
@@ -126,7 +125,7 @@
setPrefs: setPrefs,
mergePrefs: mergePrefs,
addListener: addListener,
- removeListener: removeListener
+ removeListener: removeListener,
};
}]);
diff --git a/web/gui/src/main/webapp/app/fw/util/random.js b/web/gui/src/main/webapp/app/fw/util/random.js
index 4c773dc..04063d0 100644
--- a/web/gui/src/main/webapp/app/fw/util/random.js
+++ b/web/gui/src/main/webapp/app/fw/util/random.js
@@ -20,8 +20,6 @@
(function () {
'use strict';
- var $log, fs;
-
var halfRoot2 = 0.7071;
// given some value, s, returns an integer between -s/2 and s/2
@@ -39,13 +37,10 @@
angular.module('onosUtil')
.factory('RandomService', ['$log', 'FnService',
- function (_$log_, _fs_) {
- $log = _$log_;
- fs = _fs_;
-
+ function () {
return {
spread: spread,
- randDim: randDim
+ randDim: randDim,
};
}]);
}());
diff --git a/web/gui/src/main/webapp/app/fw/util/theme.js b/web/gui/src/main/webapp/app/fw/util/theme.js
index 66e1c41..db03701 100644
--- a/web/gui/src/main/webapp/app/fw/util/theme.js
+++ b/web/gui/src/main/webapp/app/fw/util/theme.js
@@ -21,7 +21,7 @@
'use strict';
// injected refs
- var $log, fs, ps;
+ var $log, ps;
// configuration
var themes = ['light', 'dark'],
@@ -36,33 +36,33 @@
gray1: {
fill: {
light: '#eeeeee',
- dark: '#222222'
+ dark: '#222222',
},
stroke: {
light: '#cccccc',
- dark: '#333333'
- }
+ dark: '#333333',
+ },
},
gold1: {
fill: {
light: '#eeddaa',
- dark: '#544714'
+ dark: '#544714',
},
stroke: {
light: '#ffddaa',
- dark: '#645724'
- }
+ dark: '#645724',
+ },
},
blue1: {
fill: {
light: '#a2b9ee',
- dark: '#273059'
+ dark: '#273059',
},
stroke: {
light: '#92a9de',
- dark: '#273a63'
- }
- }
+ dark: '#273a63',
+ },
+ },
};
function init() {
@@ -109,8 +109,8 @@
m = 'Theme-Change-(' + w + '): ' + t;
$log.debug(m);
- listeners.forEach(function (lsnr) {
- lsnr({event: 'themeChange', value: t});
+ listeners.forEach(function (lsnr) {
+ lsnr({ event: 'themeChange', value: t });
});
}
@@ -119,7 +119,7 @@
}
function removeListener(lsnr) {
- listeners = listeners.filter(function(obj) { return obj !== lsnr; });
+ listeners = listeners.filter(function (obj) { return obj !== lsnr; });
}
// color = logical color name
@@ -133,10 +133,9 @@
}
angular.module('onosUtil')
- .factory('ThemeService', ['$log', 'FnService', 'PrefsService',
- function (_$log_, _fs_, _ps_) {
+ .factory('ThemeService', ['$log', 'PrefsService',
+ function (_$log_, _ps_) {
$log = _$log_;
- fs = _fs_;
ps = _ps_;
ps.addListener(applyTheme);
@@ -153,7 +152,7 @@
toggleTheme: toggleTheme,
addListener: addListener,
removeListener: removeListener,
- spriteColor: spriteColor
+ spriteColor: spriteColor,
};
}]);
diff --git a/web/gui/src/main/webapp/app/fw/widget/button.js b/web/gui/src/main/webapp/app/fw/widget/button.js
index 85202c6..a72732f 100644
--- a/web/gui/src/main/webapp/app/fw/widget/button.js
+++ b/web/gui/src/main/webapp/app/fw/widget/button.js
@@ -69,8 +69,8 @@
return {
id: id,
- width: buttonWidth
- }
+ width: buttonWidth,
+ };
}
@@ -111,8 +111,8 @@
width: buttonWidth,
selected: function () { return sel; },
toggle: _toggle,
- toggleNoCb: toggleNoCb
- }
+ toggleNoCb: toggleNoCb,
+ };
}
@@ -186,7 +186,7 @@
el: rbdiv,
id: rid,
cb: fs.isF(btn.cb) || noop,
- index: index
+ index: index,
});
if (btn.key) {
@@ -241,8 +241,8 @@
width: rsetWidth,
selected: selected,
selectedIndex: selectedIndex,
- size: function () { return rads.length; }
- }
+ size: function () { return rads.length; },
+ };
}
@@ -259,7 +259,7 @@
return {
button: button,
toggle: toggle,
- radioSet: radioSet
+ radioSet: radioSet,
};
}]);
diff --git a/web/gui/src/main/webapp/app/fw/widget/chartBuilder.js b/web/gui/src/main/webapp/app/fw/widget/chartBuilder.js
index af5a028..dc8e2ba 100644
--- a/web/gui/src/main/webapp/app/fw/widget/chartBuilder.js
+++ b/web/gui/src/main/webapp/app/fw/widget/chartBuilder.js
@@ -24,7 +24,7 @@
// fs -> FnService
// wss -> WebSocketService
// ls -> LoadingService
- var $log, $interval, $timeout, fs, wss, ls;
+ var $log, $interval, fs, wss, ls;
// constants
var refreshInterval = 2000;
@@ -129,19 +129,18 @@
angular.module('onosWidget')
.factory('ChartBuilderService',
- ['$log', '$interval', '$timeout', 'FnService', 'WebSocketService',
+ ['$log', '$interval', 'FnService', 'WebSocketService',
'LoadingService',
- function (_$log_, _$interval_, _$timeout_, _fs_, _wss_, _ls_) {
+ function (_$log_, _$interval_, _fs_, _wss_, _ls_) {
$log = _$log_;
$interval = _$interval_;
- $timeout = _$timeout_;
fs = _fs_;
wss = _wss_;
ls = _ls_;
return {
- buildChart: buildChart
+ buildChart: buildChart,
};
}]);
}());
diff --git a/web/gui/src/main/webapp/app/fw/widget/listBuilder.js b/web/gui/src/main/webapp/app/fw/widget/listBuilder.js
index 8c1c17e..8dc5053 100644
--- a/web/gui/src/main/webapp/app/fw/widget/listBuilder.js
+++ b/web/gui/src/main/webapp/app/fw/widget/listBuilder.js
@@ -56,7 +56,7 @@
.factory('ListService', [
function () {
return {
- listProps: listProps
+ listProps: listProps,
};
}]);
}());
diff --git a/web/gui/src/main/webapp/app/fw/widget/table.js b/web/gui/src/main/webapp/app/fw/widget/table.js
index 91dbe89..1e52017 100644
--- a/web/gui/src/main/webapp/app/fw/widget/table.js
+++ b/web/gui/src/main/webapp/app/fw/widget/table.js
@@ -94,7 +94,7 @@
s: {
first: null,
second: null,
- touched: null
+ touched: null,
},
reset: function () {
@@ -132,7 +132,7 @@
s2 = s.second;
api[s1.dir](s1.adiv);
s2 && api.none(s2.adiv);
- }
+ },
};
// Functions for sorting table rows by header
@@ -157,12 +157,12 @@
firstCol: s1.id,
firstDir: s1.dir,
secondCol: id2,
- secondDir: dir2
+ secondDir: dir2,
};
}
angular.module('onosWidget')
- .directive('onosTableResize', ['$log','$window', 'FnService', 'MastService',
+ .directive('onosTableResize', ['$log', '$window', 'FnService', 'MastService',
function (_$log_, _$window_, _fs_, _mast_) {
return function (scope, element) {
@@ -175,7 +175,7 @@
tableElems = {
table: table,
thead: table.select('.table-header').select('table'),
- tbody: table.select('.table-body').select('table')
+ tbody: table.select('.table-body').select('table'),
},
wsz;
@@ -185,7 +185,7 @@
scope.$watchCollection(function () {
return {
h: $window.innerHeight,
- w: $window.innerWidth
+ w: $window.innerWidth,
};
}, function () {
wsz = fs.windowSize(0, 30);
diff --git a/web/gui/src/main/webapp/app/fw/widget/tableBuilder.js b/web/gui/src/main/webapp/app/fw/widget/tableBuilder.js
index fa4300a..62faa89 100644
--- a/web/gui/src/main/webapp/app/fw/widget/tableBuilder.js
+++ b/web/gui/src/main/webapp/app/fw/widget/tableBuilder.js
@@ -21,7 +21,7 @@
'use strict';
// injected refs
- var $log, $interval, $timeout, fs, wss, ls;
+ var $log, $interval, fs, wss, ls;
// constants
var refreshInterval = 2000;
@@ -154,25 +154,24 @@
startRefresh();
return {
- forceRefesh : requestTableData
+ forceRefesh: requestTableData,
};
}
angular.module('onosWidget')
.factory('TableBuilderService',
- ['$log', '$interval', '$timeout', 'FnService', 'WebSocketService',
+ ['$log', '$interval', 'FnService', 'WebSocketService',
'LoadingService',
- function (_$log_, _$interval_, _$timeout_, _fs_, _wss_, _ls_) {
+ function (_$log_, _$interval_, _fs_, _wss_, _ls_) {
$log = _$log_;
$interval = _$interval_;
- $timeout = _$timeout_;
fs = _fs_;
wss = _wss_;
ls = _ls_;
return {
- buildTable: buildTable
+ buildTable: buildTable,
};
}]);
diff --git a/web/gui/src/main/webapp/app/fw/widget/tableDetail.js b/web/gui/src/main/webapp/app/fw/widget/tableDetail.js
index dad053b..466b08c 100644
--- a/web/gui/src/main/webapp/app/fw/widget/tableDetail.js
+++ b/web/gui/src/main/webapp/app/fw/widget/tableDetail.js
@@ -21,7 +21,7 @@
'use strict';
// injected refs
- var $log, $interval, $timeout, fs, wss;
+ var $log, fs;
// constants
// var refreshInterval = 2000;
@@ -50,17 +50,14 @@
// TODO: add ref to PanelService
angular.module('onosWidget')
.factory('TableDetailService',
- ['$log', '$interval', '$timeout', 'FnService', 'WebSocketService',
+ ['$log', 'FnService',
- function (_$log_, _$interval_, _$timeout_, _fs_, _wss_) {
+ function (_$log_, _fs_) {
$log = _$log_;
- $interval = _$interval_;
- $timeout = _$timeout_;
fs = _fs_;
- wss = _wss_;
return {
- buildBasePanel: buildBasePanel
+ buildBasePanel: buildBasePanel,
};
}]);
}());
diff --git a/web/gui/src/main/webapp/app/fw/widget/toolbar.js b/web/gui/src/main/webapp/app/fw/widget/toolbar.js
index 42d865d..d199797 100644
--- a/web/gui/src/main/webapp/app/fw/widget/toolbar.js
+++ b/web/gui/src/main/webapp/app/fw/widget/toolbar.js
@@ -38,7 +38,7 @@
top: 'auto',
bottom: '10px',
fade: false,
- shown: false
+ shown: false,
};
// internal state
@@ -81,8 +81,8 @@
panel = ps.createPanel(tbid, settings),
arrowDiv = createArrow(panel),
currentRow = panel.append('div').classed('tbar-row', true),
- rowButtonIds = [], // for removable buttons
- tbWidth = arrowSize + 2, // empty toolbar width
+ rowButtonIds = [], // for removable buttons
+ tbWidth = arrowSize + 2, // empty toolbar width
maxWidth = panel.width();
arrowDiv.on('click', toggle);
@@ -92,7 +92,7 @@
settings: settings,
items: items,
panel: panel,
- panelId: tbid
+ panelId: tbid,
};
panel.classed('toolbar', true)
@@ -171,7 +171,7 @@
clear: rowClear,
setText: rowSetText,
addButton: rowAddButton,
- classed: rowClassed
+ classed: rowClassed,
};
}
}
@@ -234,7 +234,7 @@
show: show,
hide: hide,
toggle: toggle,
- isVisible: isVisible
+ isVisible: isVisible,
};
}
@@ -268,7 +268,7 @@
return {
init: init,
createToolbar: createToolbar,
- destroyToolbar: destroyToolbar
+ destroyToolbar: destroyToolbar,
};
}]);
}());
diff --git a/web/gui/src/main/webapp/app/fw/widget/tooltip.js b/web/gui/src/main/webapp/app/fw/widget/tooltip.js
index b337476..54e40c7 100644
--- a/web/gui/src/main/webapp/app/fw/widget/tooltip.js
+++ b/web/gui/src/main/webapp/app/fw/widget/tooltip.js
@@ -22,7 +22,7 @@
'use strict';
// injected references
- var $log, $rootScope, fs;
+ var $rootScope, fs;
// constants
var hoverHeight = 35,
@@ -45,7 +45,7 @@
style = {
display: 'inline-block',
left: 'auto',
- right: 'auto'
+ right: 'auto',
};
if (mouseX <= (winWidth / 2)) {
@@ -108,7 +108,7 @@
tooltip.transition()
.delay(exitDelay)
.style({
- display: 'none'
+ display: 'none',
})
.text('');
}
@@ -127,13 +127,12 @@
restrict: 'A',
link: function (scope, elem, attrs) {
addTooltip(d3.select(elem[0]), scope[attrs.ttMsg]);
- }
+ },
};
}])
- .factory('TooltipService', ['$log', '$rootScope', 'FnService',
- function (_$log_, _$rootScope_, _fs_) {
- $log = _$log_;
+ .factory('TooltipService', ['$rootScope', 'FnService',
+ function (_$rootScope_, _fs_) {
$rootScope = _$rootScope_;
fs = _fs_;
@@ -142,7 +141,7 @@
return {
addTooltip: addTooltip,
showTooltip: showTooltip,
- cancelTooltip: cancelTooltip
+ cancelTooltip: cancelTooltip,
};
}]);
}());