Mercurial > hg > thermostat-ng > web-client
changeset 115:c129f1df628d
Fix inconsistencies identified by ESLint
Reviewed-by: aazores
Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2017-June/023890.html
author | Alex Macdonald <almacdon@redhat.com> |
---|---|
date | Tue, 27 Jun 2017 12:18:40 -0400 |
parents | e70e559ae577 |
children | 0139a8c37598 |
files | .eslintrc.yaml license-check/perform-license-check.js mock-api/mockapi.server.js server.js src/app/app.routing.js src/app/components/jvm-info/jvm-info.controller.js src/app/components/jvm-info/jvm-info.routing.js src/app/components/jvm-info/jvm-memory/jvm-memory.controller.js src/app/components/jvm-list/jvm-list.routing.js src/app/components/landing/landing.routing.js src/app/components/system-info/system-info.routing.js src/app/components/system-info/system-info.service.js src/app/shared/filters/big-int-to-string.filter.js src/app/shared/filters/timestamp-to-date.filter.js src/app/shared/filters/unix-to-date.filter.js src/app/shared/services/scale-bytes.service.js |
diffstat | 16 files changed, 21 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/.eslintrc.yaml Fri Jun 23 13:16:32 2017 -0400 +++ b/.eslintrc.yaml Tue Jun 27 12:18:40 2017 -0400 @@ -42,7 +42,7 @@ no-debugger: 1 no-cond-assign: 2 no-extra-parens: 0 - no-console: 1 + no-console: [1, { allow: ["error", "info", "warning"] }] no-extra-semi: 2 no-irregular-whitespace: 2 dot-notation:
--- a/license-check/perform-license-check.js Fri Jun 23 13:16:32 2017 -0400 +++ b/license-check/perform-license-check.js Tue Jun 27 12:18:40 2017 -0400 @@ -29,7 +29,7 @@ const SCRIPT_TERMINATION_EXIT_STATUS = 1; function exitWithErrorMessage (msg) { - console.log(msg); + console.error(msg); process.exit(SCRIPT_TERMINATION_EXIT_STATUS); }
--- a/mock-api/mockapi.server.js Fri Jun 23 13:16:32 2017 -0400 +++ b/mock-api/mockapi.server.js Tue Jun 27 12:18:40 2017 -0400 @@ -18,13 +18,13 @@ var server = { app: app, init: function (svc) { - console.log('mock ' + svc + ' up'); + console.info('mock ' + svc + ' up'); }, logRequest: function (svc, req) { - console.log('[' + svc + '] requested'); - console.log('params: ' + JSON.stringify(req.params)); - console.log('query: ' + JSON.stringify(req.query)); - console.log('~~~~\n'); + console.info('[' + svc + '] requested'); + console.info('params: ' + JSON.stringify(req.params)); + console.info('query: ' + JSON.stringify(req.query)); + console.info('~~~~\n'); } }; for (var i = 0; i < files.length; i++) { @@ -36,5 +36,5 @@ }); app.listen(app.get('port'), app.get('host'), function () { - console.log('Mock-API server started on http://' + app.get('host') + ':' + app.get('port')); + console.info('Mock-API server started on http://' + app.get('host') + ':' + app.get('port')); });
--- a/server.js Fri Jun 23 13:16:32 2017 -0400 +++ b/server.js Tue Jun 27 12:18:40 2017 -0400 @@ -16,5 +16,5 @@ app.set('host', host); app.listen(app.get('port'), app.get('host'), function () { - console.log('Server started on http://' + app.get('host') + ':' + app.get('port')); + console.info('Server started on http://' + app.get('host') + ':' + app.get('port')); });
--- a/src/app/app.routing.js Fri Jun 23 13:16:32 2017 -0400 +++ b/src/app/app.routing.js Tue Jun 27 12:18:40 2017 -0400 @@ -77,7 +77,7 @@ }); return defer.promise; }); -}; +} appRouter.run(transitionHook); export { errorRouting, transitionHook };
--- a/src/app/components/jvm-info/jvm-info.controller.js Fri Jun 23 13:16:32 2017 -0400 +++ b/src/app/components/jvm-info/jvm-info.controller.js Tue Jun 27 12:18:40 2017 -0400 @@ -40,7 +40,7 @@ } ); - $scope.$watch('comboValue', (cur, prev) => { + $scope.$watch('comboValue', cur => { if (cur === '') { $state.go('jvmInfo', { systemId: systemId, jvmId: jvmId }); } else {
--- a/src/app/components/jvm-info/jvm-info.routing.js Fri Jun 23 13:16:32 2017 -0400 +++ b/src/app/components/jvm-info/jvm-info.routing.js Tue Jun 27 12:18:40 2017 -0400 @@ -25,7 +25,7 @@ * exception statement from your version. */ -function config($stateProvider) { +function config ($stateProvider) { 'ngInject'; $stateProvider.state('jvmInfo', {
--- a/src/app/components/jvm-info/jvm-memory/jvm-memory.controller.js Fri Jun 23 13:16:32 2017 -0400 +++ b/src/app/components/jvm-info/jvm-memory/jvm-memory.controller.js Tue Jun 27 12:18:40 2017 -0400 @@ -56,7 +56,7 @@ this.generationData = {}; - this.scope.$watch('refreshRate', (cur, prev) => this.setRefreshRate(cur)); + this.scope.$watch('refreshRate', cur => this.setRefreshRate(cur)); this.scope.$on('$destroy', () => this.cancel());
--- a/src/app/components/jvm-list/jvm-list.routing.js Fri Jun 23 13:16:32 2017 -0400 +++ b/src/app/components/jvm-list/jvm-list.routing.js Tue Jun 27 12:18:40 2017 -0400 @@ -25,7 +25,7 @@ * exception statement from your version. */ -function config($stateProvider) { +function config ($stateProvider) { 'ngInject'; $stateProvider.state('jvmList', {
--- a/src/app/components/landing/landing.routing.js Fri Jun 23 13:16:32 2017 -0400 +++ b/src/app/components/landing/landing.routing.js Tue Jun 27 12:18:40 2017 -0400 @@ -25,7 +25,7 @@ * exception statement from your version. */ -function landingRouting($stateProvider) { +function landingRouting ($stateProvider) { 'ngInject'; $stateProvider.state('landing', {
--- a/src/app/components/system-info/system-info.routing.js Fri Jun 23 13:16:32 2017 -0400 +++ b/src/app/components/system-info/system-info.routing.js Tue Jun 27 12:18:40 2017 -0400 @@ -25,7 +25,7 @@ * exception statement from your version. */ -function config($stateProvider) { +function config ($stateProvider) { 'ngInject'; $stateProvider.state('systemInfo', {
--- a/src/app/components/system-info/system-info.service.js Fri Jun 23 13:16:32 2017 -0400 +++ b/src/app/components/system-info/system-info.service.js Tue Jun 27 12:18:40 2017 -0400 @@ -26,7 +26,6 @@ */ import urlJoin from 'url-join'; -import _ from 'lodash'; class SystemInfoService { constructor ($q, $http, gatewayUrl) {
--- a/src/app/shared/filters/big-int-to-string.filter.js Fri Jun 23 13:16:32 2017 -0400 +++ b/src/app/shared/filters/big-int-to-string.filter.js Tue Jun 27 12:18:40 2017 -0400 @@ -29,7 +29,7 @@ return val => { val = val || 0; return val.toFixed(); - } + }; } const filterName = 'bigIntToString';
--- a/src/app/shared/filters/timestamp-to-date.filter.js Fri Jun 23 13:16:32 2017 -0400 +++ b/src/app/shared/filters/timestamp-to-date.filter.js Tue Jun 27 12:18:40 2017 -0400 @@ -26,7 +26,7 @@ */ export default function filterProvider ( - metricToBigIntFilter, bigIntToStringFilter, stringToNumberFilter, + metricToBigIntFilter, bigIntToStringFilter, stringToNumberFilter, unixToDateFilter) { 'ngInject'; return timestamp => { @@ -34,7 +34,7 @@ stringToNumberFilter( bigIntToStringFilter( metricToBigIntFilter(timestamp)))); - } + }; } const filterName = 'timeStampToDate';
--- a/src/app/shared/filters/unix-to-date.filter.js Fri Jun 23 13:16:32 2017 -0400 +++ b/src/app/shared/filters/unix-to-date.filter.js Tue Jun 27 12:18:40 2017 -0400 @@ -30,7 +30,7 @@ export default function filterProvider (formatter = moment) { return (timestamp, format = 'lll') => { return formatter(timestamp).format(format); - } + }; } const filterName = 'unixToDate';
--- a/src/app/shared/services/scale-bytes.service.js Fri Jun 23 13:16:32 2017 -0400 +++ b/src/app/shared/services/scale-bytes.service.js Tue Jun 27 12:18:40 2017 -0400 @@ -31,7 +31,7 @@ this.metricToBigInt = metricToBigIntService; } - get sizes() { + get sizes () { return ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']; }