[TASK] Use strict

This commit is contained in:
Xaver Maierhofer 2016-05-27 23:59:01 +02:00 committed by Milan Pässler
parent d57ce0052a
commit ae59f75594
36 changed files with 74 additions and 6 deletions

View file

@ -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"]);

2
app.js
View file

@ -1,3 +1,5 @@
"use strict";
require.config({
baseUrl: "lib",
paths: {

View file

@ -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"

View file

@ -1,4 +1,6 @@
define(function () {
"use strict";
return function () {
this.render = function (d) {
var el = document.createElement("div");

View file

@ -1,4 +1,6 @@
define([], function () {
"use strict";
return function (tag) {
if (!tag) {
tag = "div";

View file

@ -1,4 +1,6 @@
define(["filters/nodefilter"], function (NodeFilter) {
"use strict";
return function () {
var targets = [];
var filterObservers = [];

View file

@ -1,4 +1,6 @@
define([], function () {
define(function () {
"use strict";
return function (distributor) {
var container = document.createElement("ul");
container.classList.add("filters");

View file

@ -1,4 +1,6 @@
define(["helper"], function (helper) {
"use strict";
return function (name, key, value, f) {
var negate = false;
var refresh;

View file

@ -1,4 +1,6 @@
define([], function () {
define(function () {
"use strict";
return function (filter) {
return function (data) {
var n = Object.create(data);

View file

@ -1,4 +1,6 @@
define(["d3", "helper"], function (d3, helper) {
"use strict";
var margin = 200;
var NODE_RADIUS = 15;
var LINE_RADIUS = 7;

View file

@ -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;

View file

@ -1,4 +1,6 @@
define(["helper"], function (helper) {
"use strict";
function showStatImg(o, d) {
var subst = {};
subst["{SOURCE}"] = d.source.node_id;

View file

@ -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();

View file

@ -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;

View file

@ -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";

View file

@ -1,4 +1,6 @@
define(function () {
"use strict";
return function () {
var self = this;

View file

@ -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;
}

View file

@ -1,4 +1,6 @@
define(["leaflet"], function (L) {
"use strict";
return L.CircleMarker.extend({
outerCircle: {
stroke: false,

View file

@ -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 = {};

View file

@ -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

View file

@ -1,5 +1,6 @@
define(["leaflet"],
function (L) {
"use strict";
return L.TileLayer.Canvas.extend({
setData: function (d) {

View file

@ -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],

View file

@ -1,4 +1,6 @@
define(["helper"], function (helper) {
"use strict";
return function (config) {
var self = this;
var stats, timestamp;

View file

@ -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);

View file

@ -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;

View file

@ -1,4 +1,6 @@
define(["helper"], function (helper) {
"use strict";
return function () {
var self = this;
var objects = {nodes: {}, links: {}};

View file

@ -1,4 +1,6 @@
define([], function () {
define(function () {
"use strict";
return function (el) {
var self = this;

View file

@ -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;

View file

@ -1,4 +1,6 @@
define(["virtual-dom"], function (V) {
"use strict";
return function (headings, sortIndex, renderRow) {
var data;
var sortReverse = false;

View file

@ -1,4 +1,6 @@
define([], function () {
define(function () {
"use strict";
return function () {
var self = this;

View file

@ -1,4 +1,6 @@
define(function () {
"use strict";
return function (config) {
function setTitle(d) {
var title = [config.siteName];

View file

@ -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]);
}

View file

@ -1,4 +1,6 @@
module.exports = function (grunt) {
"use strict";
grunt.config.merge({
bowerdir: "bower_components",
copy: {

View file

@ -1,4 +1,6 @@
module.exports = function (grunt) {
"use strict";
grunt.config.merge({
clean: {
build: ["build/**/*", "node_modules/grunt-newer/.cache"]

View file

@ -1,4 +1,6 @@
module.exports = function (grunt) {
"use strict";
grunt.config.merge({
connect: {
server: {

View file

@ -1,4 +1,6 @@
module.exports = function (grunt) {
"use strict";
grunt.config.merge({
checkDependencies: {
options: {