From e017b270755381ad2867982835f5bdd4939d89ad Mon Sep 17 00:00:00 2001 From: KKudryavtsev Date: Fri, 4 Dec 2015 18:39:45 +0000 Subject: [PATCH 1/9] switched source maps off --- Gruntfile.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 1552a92..50e4099 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -185,7 +185,7 @@ module.exports = function(grunt) { concat: { vendor: { options: { - sourceMap: true, + souceMap: false, sourceMapIncludeSources: true, sourceMapIn: ['dist/js/lib/*.map'] }, @@ -201,13 +201,13 @@ module.exports = function(grunt) { }, netstats: { options: { - sourceMap: true, + sourceMap: false, sourceMapIncludeSources: true, sourceMapIn: ['dist/js/vendor.min.js.map', 'dist/js/app.min.js.map'] }, src: ['<%= concat.vendor.dest %>', '<%= uglify.app.dest %>'], dest: 'dist/js/netstats.min.js', - nonull: true, + nonull: true }, css: { src: ['dist/css/*.min.css', 'dist/css/*.css'], @@ -215,7 +215,7 @@ module.exports = function(grunt) { }, vendor_lite: { options: { - sourceMap: true, + sourceMap: false, sourceMapIncludeSources: true, sourceMapIn: ['dist-lite/js/lib/*.map'] }, @@ -231,7 +231,7 @@ module.exports = function(grunt) { }, netstats_lite: { options: { - sourceMap: true, + sourceMap: false, sourceMapIncludeSources: true, sourceMapIn: ['dist-lite/js/vendor.min.js.map', 'dist-lite/js/app.min.js.map'] }, @@ -248,7 +248,7 @@ module.exports = function(grunt) { app: { options: { mangle: false, - sourceMap: true, + sourceMap: false, sourceMapIncludeSources: true }, dest: 'dist/js/app.min.js', @@ -257,7 +257,7 @@ module.exports = function(grunt) { app_lite: { options: { mangle: false, - sourceMap: true, + sourceMap: false, sourceMapIncludeSources: true }, dest: 'dist-lite/js/app.min.js', @@ -277,4 +277,4 @@ module.exports = function(grunt) { grunt.registerTask('lite', ['clean:build_lite', 'clean:cleanup_js_lite', 'clean:cleanup_css_lite', 'jade:build_lite', 'copy:build_lite', 'cssmin:build_lite', 'concat:vendor_lite', 'concat:scripts_lite', 'uglify:app_lite', 'concat:netstats_lite', 'concat:css_lite', 'clean:cleanup_js_lite', 'clean:cleanup_css_lite']); grunt.registerTask('build', 'default'); grunt.registerTask('all', ['default', 'lite']); -}; \ No newline at end of file +}; From 6a1f28955d0ea194f4c2c5030889c23f404e120c Mon Sep 17 00:00:00 2001 From: KKudryavtsev Date: Fri, 4 Dec 2015 19:06:43 +0000 Subject: [PATCH 2/9] bumped ws version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d6ff43b..9dbaf1b 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "primus": "3.2.1", "primus-emit": "0.1.2", "primus-spark-latency": "0.1.1", - "ws": "0.8.0" + "ws": "0.8.1" }, "repository": { "type": "git", From 0018342c6dc8724f14cd48c550c0abffedc8cc62 Mon Sep 17 00:00:00 2001 From: KKudryavtsev Date: Fri, 4 Dec 2015 19:42:28 +0000 Subject: [PATCH 3/9] fixed a possible typo --- lib/utils/logger.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utils/logger.js b/lib/utils/logger.js index eaa9d9d..604a1e0 100644 --- a/lib/utils/logger.js +++ b/lib/utils/logger.js @@ -111,7 +111,7 @@ var ENV_VERBOSITY = process.env.VERBOSITY || 2; console[item.name] = function () { - if(verbosity[ENV_VERBOSITY].indexOf(fnName) === -1) + if(verbosity[ENV_VERBOSITY].indexOf(item.name) === -1) return false; var args = Array.prototype.slice.call(arguments); @@ -162,4 +162,4 @@ var ENV_VERBOSITY = process.env.VERBOSITY || 2; return fn.apply( this, item.formatter(sign, message) ); } -}); \ No newline at end of file +}); From 744b0697d556deb5e78b2bf85bbebfb468d425a0 Mon Sep 17 00:00:00 2001 From: KKudryavtsev Date: Mon, 21 Mar 2016 16:41:02 +0000 Subject: [PATCH 4/9] moved grunt into production dependencies --- package.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 9dbaf1b..283f496 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,14 @@ "primus": "3.2.1", "primus-emit": "0.1.2", "primus-spark-latency": "0.1.1", - "ws": "0.8.1" + "ws": "0.8.1", + "grunt": "^0.4.5", + "grunt-contrib-clean": "^0.6.0", + "grunt-contrib-concat": "^0.5.1", + "grunt-contrib-copy": "^0.8.0", + "grunt-contrib-cssmin": "^0.12.3", + "grunt-contrib-jade": "^0.14.1", + "grunt-contrib-uglify": "^0.9.1" }, "repository": { "type": "git", @@ -41,12 +48,5 @@ ], "license": "LGPL-3.0", "devDependencies": { - "grunt": "^0.4.5", - "grunt-contrib-clean": "^0.6.0", - "grunt-contrib-concat": "^0.5.1", - "grunt-contrib-copy": "^0.8.0", - "grunt-contrib-cssmin": "^0.12.3", - "grunt-contrib-jade": "^0.14.1", - "grunt-contrib-uglify": "^0.9.1" } } From d0b5adc965c325dfca883bd35b25d6a77d9230c2 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Tue, 18 Oct 2016 19:45:35 +0300 Subject: [PATCH 5/9] primus bump --- .gitignore | 3 ++- app.js | 8 ++++---- package.json | 17 ++++++++--------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index f410ef9..916a09d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ config/nodes.js *.swp *.pem .node-xmlhttprequest-* -ws_secret.json \ No newline at end of file +ws_secret.json +stats.json \ No newline at end of file diff --git a/app.js b/app.js index 2ab339d..676cfdb 100644 --- a/app.js +++ b/app.js @@ -54,8 +54,8 @@ api = new Primus(server, { parser: 'JSON' }); -api.use('emit', require('primus-emit')); -api.use('spark-latency', require('primus-spark-latency')); +api.plugin('emit', require('primus-emit')); +api.plugin('spark-latency', require('primus-spark-latency')); // Init Client Socket connection @@ -65,7 +65,7 @@ client = new Primus(server, { parser: 'JSON' }); -client.use('emit', require('primus-emit')); +client.plugin('emit', require('primus-emit')); // Init external API @@ -75,7 +75,7 @@ external = new Primus(server, { parser: 'JSON' }); -external.use('emit', require('primus-emit')); +external.plugin('emit', require('primus-emit')); // Init collections var Collection = require('./lib/collection'); diff --git a/package.json b/package.json index 283f496..51e235f 100644 --- a/package.json +++ b/package.json @@ -17,19 +17,19 @@ "debug": "2.2.0", "express": "4.13.3", "geoip-lite": "1.1.6", - "jade": "1.11.0", - "lodash": "3.10.1", - "primus": "3.2.1", - "primus-emit": "0.1.2", - "primus-spark-latency": "0.1.1", - "ws": "0.8.1", "grunt": "^0.4.5", "grunt-contrib-clean": "^0.6.0", "grunt-contrib-concat": "^0.5.1", "grunt-contrib-copy": "^0.8.0", "grunt-contrib-cssmin": "^0.12.3", "grunt-contrib-jade": "^0.14.1", - "grunt-contrib-uglify": "^0.9.1" + "grunt-contrib-uglify": "^0.9.1", + "jade": "1.11.0", + "lodash": "3.10.1", + "primus": "^6.0.3", + "primus-emit": "^1.0.0", + "primus-spark-latency": "^0.1.1", + "ws": "^1.1.1" }, "repository": { "type": "git", @@ -47,6 +47,5 @@ } ], "license": "LGPL-3.0", - "devDependencies": { - } + "devDependencies": {} } From 1de39d214ace11c5332ca2658a4d902ad5048074 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Tue, 8 Nov 2016 11:20:39 +0000 Subject: [PATCH 6/9] bump primus --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 51e235f..75838d4 100644 --- a/package.json +++ b/package.json @@ -26,10 +26,10 @@ "grunt-contrib-uglify": "^0.9.1", "jade": "1.11.0", "lodash": "3.10.1", - "primus": "^6.0.3", + "primus": "^6.0.5", "primus-emit": "^1.0.0", "primus-spark-latency": "^0.1.1", - "ws": "^1.1.1" + "ws": "^1.1.1", }, "repository": { "type": "git", From b0277543e1e044537d5c6873eb7a70b254b88e3e Mon Sep 17 00:00:00 2001 From: Konstantin Date: Tue, 8 Nov 2016 11:32:04 +0000 Subject: [PATCH 7/9] comma fix in package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 75838d4..1d202cc 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "primus": "^6.0.5", "primus-emit": "^1.0.0", "primus-spark-latency": "^0.1.1", - "ws": "^1.1.1", + "ws": "^1.1.1" }, "repository": { "type": "git", From e849a7f97012873618802b634c4b8eb9a20c8359 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Tue, 8 Nov 2016 12:15:10 +0000 Subject: [PATCH 8/9] fix for empty node info errors --- src/js/filters.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/filters.js b/src/js/filters.js index db0e31b..a01e7ed 100644 --- a/src/js/filters.js +++ b/src/js/filters.js @@ -128,7 +128,7 @@ angular.module('netStatsApp.filters', []) }) .filter('nodeVersion', function($sce) { return function(version) { - if(typeof version !== 'undefined') + if(version) { var tmp = version.split('/'); @@ -463,7 +463,7 @@ angular.module('netStatsApp.filters', []) var tooltip = []; var string = ''; - if(node.info.node !== '' && typeof node.info.node !== 'undefined') { + if(node.info.node) { var eth_version = node.info.node.split('/'); if(eth_version[1][0] !== 'v' && eth_version[1][2] !== '.') @@ -668,4 +668,4 @@ function blockTimeClass(diff) return 'text-orange'; return 'text-danger' -} \ No newline at end of file +} From 289008b2a7ebf08ec5a9020a514ab3a2ace2b50b Mon Sep 17 00:00:00 2001 From: Konstantin Date: Tue, 8 Nov 2016 12:34:26 +0000 Subject: [PATCH 9/9] more fixing for incorrectly formatted node info --- src/js/filters.js | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/js/filters.js b/src/js/filters.js index a01e7ed..40be828 100644 --- a/src/js/filters.js +++ b/src/js/filters.js @@ -139,19 +139,19 @@ angular.module('netStatsApp.filters', []) tmp[0] = 'pyeth'; } - if(tmp[1][0] !== 'v' && tmp[1][2] !== '.') + if(tmp[1] && tmp[1][0] !== 'v' && tmp[1][2] !== '.') { tmp.splice(1,1); } - if(tmp[2] === 'Release'){ + if(tmp[2] && tmp[2] === 'Release'){ tmp.splice(2,1); } - if(tmp[2].indexOf('Linux') === 0) + if(tmp[2] && tmp[2].indexOf('Linux') === 0) tmp[2] = 'linux'; - if(tmp[2].indexOf('Darwin') === 0) + if(tmp[2] && tmp[2].indexOf('Darwin') === 0) tmp[2] = 'darwin'; return $sce.trustAsHtml(tmp.join('/')); @@ -466,16 +466,18 @@ angular.module('netStatsApp.filters', []) if(node.info.node) { var eth_version = node.info.node.split('/'); - if(eth_version[1][0] !== 'v' && eth_version[1][2] !== '.') - { - eth_version.splice(1,1); - } + if(eth_version[1]){ + if(eth_version[1][0] !== 'v' && eth_version[1][2] !== '.') + { + eth_version.splice(1,1); + } - string = "" + node.info.node + ""; - tooltip.push(string); + string = "" + node.info.node + ""; + tooltip.push(string); - string = "Version: " + (eth_version[1]) + ""; - tooltip.push(string); + string = "Version: " + (eth_version[1]) + ""; + tooltip.push(string); + } } if(node.info.net !== '') {