[TASK] Use strict
This commit is contained in:
parent
d57ce0052a
commit
ae59f75594
|
@ -1,4 +1,6 @@
|
||||||
module.exports = function (grunt) {
|
module.exports = function (grunt) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
grunt.loadTasks("tasks");
|
grunt.loadTasks("tasks");
|
||||||
|
|
||||||
grunt.registerTask("default", ["bower-install-simple", "lint", "copy", "sass", "postcss", "requirejs:default", "inline"]);
|
grunt.registerTask("default", ["bower-install-simple", "lint", "copy", "sass", "postcss", "requirejs:default", "inline"]);
|
||||||
|
|
2
app.js
2
app.js
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
require.config({
|
require.config({
|
||||||
baseUrl: "lib",
|
baseUrl: "lib",
|
||||||
paths: {
|
paths: {
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
"es6-shim": "~0.35.1",
|
"es6-shim": "~0.35.1",
|
||||||
"almond": "~0.3.2",
|
"almond": "~0.3.2",
|
||||||
"d3": "~3.5.17",
|
"d3": "~3.5.17",
|
||||||
"roboto-fontface": "~0.3.0",
|
"roboto-fontface": "~0.4.5",
|
||||||
"virtual-dom": "~2.1.1",
|
"virtual-dom": "~2.1.1",
|
||||||
"leaflet-providers": "~1.1.10",
|
"leaflet-providers": "~1.1.10",
|
||||||
"rbush": "https://github.com/mourner/rbush.git#~1.4.3"
|
"rbush": "https://github.com/mourner/rbush.git#~1.4.3"
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
define(function () {
|
define(function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
return function () {
|
return function () {
|
||||||
this.render = function (d) {
|
this.render = function (d) {
|
||||||
var el = document.createElement("div");
|
var el = document.createElement("div");
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
define([], function () {
|
define([], function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
return function (tag) {
|
return function (tag) {
|
||||||
if (!tag) {
|
if (!tag) {
|
||||||
tag = "div";
|
tag = "div";
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
define(["filters/nodefilter"], function (NodeFilter) {
|
define(["filters/nodefilter"], function (NodeFilter) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
return function () {
|
return function () {
|
||||||
var targets = [];
|
var targets = [];
|
||||||
var filterObservers = [];
|
var filterObservers = [];
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
define([], function () {
|
define(function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
return function (distributor) {
|
return function (distributor) {
|
||||||
var container = document.createElement("ul");
|
var container = document.createElement("ul");
|
||||||
container.classList.add("filters");
|
container.classList.add("filters");
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
define(["helper"], function (helper) {
|
define(["helper"], function (helper) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
return function (name, key, value, f) {
|
return function (name, key, value, f) {
|
||||||
var negate = false;
|
var negate = false;
|
||||||
var refresh;
|
var refresh;
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
define([], function () {
|
define(function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
return function (filter) {
|
return function (filter) {
|
||||||
return function (data) {
|
return function (data) {
|
||||||
var n = Object.create(data);
|
var n = Object.create(data);
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
define(["d3", "helper"], function (d3, helper) {
|
define(["d3", "helper"], function (d3, helper) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
var margin = 200;
|
var margin = 200;
|
||||||
var NODE_RADIUS = 15;
|
var NODE_RADIUS = 15;
|
||||||
var LINE_RADIUS = 7;
|
var LINE_RADIUS = 7;
|
||||||
|
|
|
@ -5,6 +5,8 @@ define(["chroma-js", "map", "sidebar", "tabs", "container", "meshstats",
|
||||||
function (chroma, Map, Sidebar, Tabs, Container, Meshstats, Legend, Linklist,
|
function (chroma, Map, Sidebar, Tabs, Container, Meshstats, Legend, Linklist,
|
||||||
Nodelist, SimpleNodelist, Infobox, Proportions, ForceGraph,
|
Nodelist, SimpleNodelist, Infobox, Proportions, ForceGraph,
|
||||||
Title, About, DataDistributor, FilterGUI) {
|
Title, About, DataDistributor, FilterGUI) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
return function (config, router) {
|
return function (config, router) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var content;
|
var content;
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
define(["helper"], function (helper) {
|
define(["helper"], function (helper) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
function showStatImg(o, d) {
|
function showStatImg(o, d) {
|
||||||
var subst = {};
|
var subst = {};
|
||||||
subst["{SOURCE}"] = d.source.node_id;
|
subst["{SOURCE}"] = d.source.node_id;
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
define(["helper"], function (helper) {
|
define(["helper"], function (helper) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
return function (config, el, router, d) {
|
return function (config, el, router, d) {
|
||||||
var sidebarTitle = document.createElement("h2");
|
var sidebarTitle = document.createElement("h2");
|
||||||
sidebarTitle.textContent = "Location: " + d.toString();
|
sidebarTitle.textContent = "Location: " + d.toString();
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
define(["infobox/link", "infobox/node", "infobox/location"], function (Link, Node, Location) {
|
define(["infobox/link", "infobox/node", "infobox/location"], function (Link, Node, Location) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
return function (config, sidebar, router) {
|
return function (config, sidebar, router) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var el;
|
var el;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
define(["moment", "tablesort", "helper", "moment.de"],
|
define(["moment", "tablesort", "helper", "moment.de"],
|
||||||
function (moment, Tablesort, helper) {
|
function (moment, Tablesort, helper) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
function showGeoURI(d) {
|
function showGeoURI(d) {
|
||||||
function showLatitude(d) {
|
function showLatitude(d) {
|
||||||
var suffix = Math.sign(d) > -1 ? "' N" : "' S";
|
var suffix = Math.sign(d) > -1 ? "' N" : "' S";
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
define(function () {
|
define(function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
return function () {
|
return function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
define(["sorttable", "virtual-dom", "helper"], function (SortTable, V, helper) {
|
define(["sorttable", "virtual-dom", "helper"], function (SortTable, V, helper) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
function linkName(d) {
|
function linkName(d) {
|
||||||
return (d.source.node ? d.source.node.nodeinfo.hostname : d.source.id) + " – " + d.target.node.nodeinfo.hostname;
|
return (d.source.node ? d.source.node.nodeinfo.hostname : d.source.id) + " – " + d.target.node.nodeinfo.hostname;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
define(["leaflet"], function (L) {
|
define(["leaflet"], function (L) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
return L.CircleMarker.extend({
|
return L.CircleMarker.extend({
|
||||||
outerCircle: {
|
outerCircle: {
|
||||||
stroke: false,
|
stroke: false,
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
define(["moment", "router", "leaflet", "gui", "helper", "moment.de"],
|
define(["moment", "router", "leaflet", "gui", "helper", "moment.de"],
|
||||||
function (moment, Router, L, GUI, helper) {
|
function (moment, Router, L, GUI, helper) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
return function (config) {
|
return function (config) {
|
||||||
function handleData(data) {
|
function handleData(data) {
|
||||||
var dataNodes = {};
|
var dataNodes = {};
|
||||||
|
|
|
@ -2,6 +2,8 @@ define(["map/clientlayer", "map/labelslayer",
|
||||||
"d3", "leaflet", "moment", "locationmarker", "rbush", "helper",
|
"d3", "leaflet", "moment", "locationmarker", "rbush", "helper",
|
||||||
"leaflet.label", "leaflet.providers", "moment.de"],
|
"leaflet.label", "leaflet.providers", "moment.de"],
|
||||||
function (ClientLayer, LabelsLayer, d3, L, moment, LocationMarker, rbush, helper) {
|
function (ClientLayer, LabelsLayer, d3, L, moment, LocationMarker, rbush, helper) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
var options = {
|
var options = {
|
||||||
worldCopyJump: true,
|
worldCopyJump: true,
|
||||||
zoomControl: false
|
zoomControl: false
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
define(["leaflet"],
|
define(["leaflet"],
|
||||||
function (L) {
|
function (L) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
return L.TileLayer.Canvas.extend({
|
return L.TileLayer.Canvas.extend({
|
||||||
setData: function (d) {
|
setData: function (d) {
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
define(["leaflet", "rbush"],
|
define(["leaflet", "rbush"],
|
||||||
function (L, rbush) {
|
function (L, rbush) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
var labelLocations = [["left", "middle", 0 / 8],
|
var labelLocations = [["left", "middle", 0 / 8],
|
||||||
["center", "top", 6 / 8],
|
["center", "top", 6 / 8],
|
||||||
["right", "middle", 4 / 8],
|
["right", "middle", 4 / 8],
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
define(["helper"], function (helper) {
|
define(["helper"], function (helper) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
return function (config) {
|
return function (config) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var stats, timestamp;
|
var stats, timestamp;
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
define(["sorttable", "virtual-dom", "helper"], function (SortTable, V, helper) {
|
define(["sorttable", "virtual-dom", "helper"], function (SortTable, V, helper) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
function getUptime(now, d) {
|
function getUptime(now, d) {
|
||||||
if (d.flags.online && "uptime" in d.statistics) {
|
if (d.flags.online && "uptime" in d.statistics) {
|
||||||
return Math.round(d.statistics.uptime);
|
return Math.round(d.statistics.uptime);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
define(["chroma-js", "virtual-dom", "filters/genericnode", "helper"],
|
define(["chroma-js", "virtual-dom", "filters/genericnode", "helper"],
|
||||||
function (Chroma, V, Filter, helper) {
|
function (Chroma, V, Filter, helper) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
return function (config, filterManager) {
|
return function (config, filterManager) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
define(["helper"], function (helper) {
|
define(["helper"], function (helper) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
return function () {
|
return function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
var objects = {nodes: {}, links: {}};
|
var objects = {nodes: {}, links: {}};
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
define([], function () {
|
define(function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
return function (el) {
|
return function (el) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
define(["moment", "virtual-dom", "helper", "moment.de"], function (moment, V, helper) {
|
define(["moment", "virtual-dom", "helper", "moment.de"], function (moment, V, helper) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
return function (nodes, field, router, title) {
|
return function (nodes, field, router, title) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var el, tbody;
|
var el, tbody;
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
define(["virtual-dom"], function (V) {
|
define(["virtual-dom"], function (V) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
return function (headings, sortIndex, renderRow) {
|
return function (headings, sortIndex, renderRow) {
|
||||||
var data;
|
var data;
|
||||||
var sortReverse = false;
|
var sortReverse = false;
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
define([], function () {
|
define(function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
return function () {
|
return function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
define(function () {
|
define(function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
return function (config) {
|
return function (config) {
|
||||||
function setTitle(d) {
|
function setTitle(d) {
|
||||||
var title = [config.siteName];
|
var title = [config.siteName];
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
define({
|
define({
|
||||||
get: function (url) {
|
get: function (url) {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
|
@ -77,7 +79,7 @@ define({
|
||||||
},
|
},
|
||||||
|
|
||||||
listReplace: function (s, subst) {
|
listReplace: function (s, subst) {
|
||||||
for (key in subst) {
|
for (var key in subst) {
|
||||||
var re = new RegExp(key, "g");
|
var re = new RegExp(key, "g");
|
||||||
s = s.replace(re, subst[key]);
|
s = s.replace(re, subst[key]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
module.exports = function (grunt) {
|
module.exports = function (grunt) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
grunt.config.merge({
|
grunt.config.merge({
|
||||||
bowerdir: "bower_components",
|
bowerdir: "bower_components",
|
||||||
copy: {
|
copy: {
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
module.exports = function (grunt) {
|
module.exports = function (grunt) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
grunt.config.merge({
|
grunt.config.merge({
|
||||||
clean: {
|
clean: {
|
||||||
build: ["build/**/*", "node_modules/grunt-newer/.cache"]
|
build: ["build/**/*", "node_modules/grunt-newer/.cache"]
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
module.exports = function (grunt) {
|
module.exports = function (grunt) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
grunt.config.merge({
|
grunt.config.merge({
|
||||||
connect: {
|
connect: {
|
||||||
server: {
|
server: {
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
module.exports = function (grunt) {
|
module.exports = function (grunt) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
grunt.config.merge({
|
grunt.config.merge({
|
||||||
checkDependencies: {
|
checkDependencies: {
|
||||||
options: {
|
options: {
|
||||||
|
|
Loading…
Reference in a new issue