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