IGNITE-2220 added support to eslint - Fixes #365. Signed-off-by: Andrey <anovi...@gridgain.com>
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/6b110a8d Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6b110a8d Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6b110a8d Branch: refs/heads/ignite-843-rc2 Commit: 6b110a8d3f930a290db73197c58a6b7e4fdfdbe4 Parents: 8da0262 Author: Dmitriyff <dmitri...@gmail.com> Authored: Wed Dec 23 15:31:25 2015 +0700 Committer: Andrey <anovi...@gridgain.com> Committed: Wed Dec 23 15:31:25 2015 +0700 ---------------------------------------------------------------------- .../control-center-web/src/main/js/.eslintrc | 195 +++++++++++++++++++ .../directives/callout/callout-cel.directive.js | 20 +- .../app/directives/callout/callout.directive.js | 12 +- .../app/directives/loading/loading.directive.js | 14 +- .../ui-ace-docker/ui-ace-docker.controller.js | 12 +- .../ui-ace-docker/ui-ace-docker.directive.js | 34 ++-- .../ui-ace-java/ui-ace-java.controller.js | 10 +- .../ui-ace-java/ui-ace-java.directive.js | 20 +- .../ui-ace-pojos/ui-ace-pojos.controller.js | 22 +-- .../ui-ace-pojos/ui-ace-pojos.directive.js | 34 ++-- .../ui-ace-pom/ui-ace-pom.controller.js | 10 +- .../ui-ace-pom/ui-ace-pom.directive.js | 24 +-- .../ui-ace-xml/ui-ace-xml.controller.js | 12 +- .../ui-ace-xml/ui-ace-xml.directive.js | 26 +-- .../js/app/filters/hasPojo/hasPojo.filter.js | 6 +- .../control-center-web/src/main/js/app/index.js | 166 ++++++++-------- .../src/main/js/app/modules/Auth/index.js | 55 +++--- .../modules/Form/field/dropdown.directive.js | 36 ++-- .../app/modules/Form/field/field.directive.js | 30 +-- .../Form/field/input/number.directive.js | 40 ++-- .../src/main/js/app/modules/Form/index.js | 5 +- .../src/main/js/app/modules/User/index.js | 72 +++---- .../app/modules/configuration/sidebar/main.js | 14 +- .../modules/dialog/dialog-content.directive.js | 22 +-- .../modules/dialog/dialog-title.directive.js | 20 +- .../js/app/modules/dialog/dialog.controller.js | 14 +- .../js/app/modules/dialog/dialog.directive.js | 32 +-- .../js/app/modules/dialog/dialog.factory.js | 22 +-- .../src/main/js/app/modules/dialog/index.js | 1 + .../src/main/js/app/modules/navbar/main.js | 12 +- .../src/main/js/app/modules/settings/main.js | 19 +- .../main/js/app/modules/states/admin/index.js | 18 +- .../app/modules/states/configuration/index.js | 96 ++++----- .../configuration/summary/summary.controller.js | 133 ++++++------- .../configuration/summary/summary.resource.js | 40 ++-- .../main/js/app/modules/states/login/index.js | 40 ++-- .../main/js/app/modules/states/logout/index.js | 22 +-- .../js/app/modules/states/password/index.js | 20 +- .../main/js/app/modules/states/profile/index.js | 18 +- .../src/main/js/app/modules/states/sql/index.js | 16 +- .../src/main/js/app/modules/terms/main.js | 72 +++---- .../main/js/app/services/UiAceOnLoad/service.js | 30 +-- .../src/main/js/gulpfile.js/tasks/bundle.js | 5 +- .../src/main/js/gulpfile.js/tasks/eslint.js | 29 +++ .../control-center-web/src/main/js/package.json | 2 + 45 files changed, 895 insertions(+), 657 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/.eslintrc ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/.eslintrc b/modules/control-center-web/src/main/js/.eslintrc new file mode 100644 index 0000000..074ecf4 --- /dev/null +++ b/modules/control-center-web/src/main/js/.eslintrc @@ -0,0 +1,195 @@ +parser: "babel-eslint" + +env: + es6: true + browser: true + +ecmaFeatures: + arrowFunctions: true + blockBindings: true + classes: true + defaultParams: true + destructuring: true + module: true + objectLiteralComputedProperties: true + objectLiteralShorthandMethods: true + objectLiteralShorthandProperties: true + spread: true + templateStrings: true + experimentalObjectRestSpread: true + +globals: + _: true + window: true + global: true + $generatorProperties: true + $generatorXml: true + $generatorJava: true + $generatorPom: true + $generatorReadme: true + $generatorDocker: true + saveAs: true + +rules: + arrow-parens: [1, "as-needed"] + arrow-spacing: [1, { "before": true, "after": true }] + accessor-pairs: 2 + block-scoped-var: 2 + brace-style: [0, "1tbs"] + comma-dangle: [2, "never"] + comma-spacing: [2, {"before": false, "after": true}] + comma-style: [2, "last"] + complexity: [1, 11] + computed-property-spacing: [2, "never"] + consistent-return: 0 + consistent-this: [0, "that"] + constructor-super: 2 + curly: [2, "multi-or-nest"] + default-case: 0 + dot-location: 0 + dot-notation: [2, { "allowKeywords": true }] + eol-last: 2 + eqeqeq: 2 + func-names: 0 + func-style: [0, "declaration"] + generator-star-spacing: 0 + guard-for-in: 1 + handle-callback-err: 0 + id-length: [2, {"min": 1, "max": 30}] + indent: 2 + key-spacing: [2, { "beforeColon": false, "afterColon": true }] + lines-around-comment: 0 + linebreak-style: [0, "unix"] + max-depth: [0, 4] + max-len: [0, 120, 4] + max-nested-callbacks: [1, 4] + max-params: [0, 3] + max-statements: [0, 10] + new-cap: 2 + new-parens: 2 + no-alert: 2 + no-array-constructor: 2 + no-bitwise: 0 + no-caller: 2 + no-catch-shadow: 2 + no-cond-assign: 2 + no-console: 0 + no-constant-condition: 2 + no-continue: 0 + no-class-assign: 2 + no-const-assign: 2 + no-control-regex: 2 + no-debugger: 2 + no-delete-var: 2 + no-div-regex: 0 + no-dupe-keys: 2 + no-dupe-args: 2 + no-duplicate-case: 2 + no-else-return: 2 + no-empty: 2 + no-empty-character-class: 2 + no-empty-label: 2 + no-eq-null: 2 + no-eval: 2 + no-ex-assign: 2 + no-extend-native: 2 + no-extra-bind: 2 + no-extra-boolean-cast: 2 + no-extra-parens: 0 + no-extra-semi: 2 + no-fallthrough: 2 + no-floating-decimal: 1 + no-func-assign: 2 + no-implied-eval: 2 + no-inline-comments: 0 + no-inner-declarations: [2, "functions"] + no-invalid-regexp: 2 + no-irregular-whitespace: 2 + no-iterator: 2 + no-label-var: 2 + no-labels: 2 + no-lone-blocks: 2 + no-lonely-if: 2 + no-implicit-coercion: [2, {"boolean": false, "number": true, "string": true}] + no-loop-func: 2 + no-mixed-requires: [0, false] + no-mixed-spaces-and-tabs: [2, true] + no-multi-spaces: 2 + no-multi-str: 2 + no-multiple-empty-lines: [0, {"max": 2}] + no-native-reassign: 2 + no-negated-in-lhs: 2 + no-nested-ternary: 2 + no-new: 2 + no-new-func: 2 + no-new-object: 2 + no-new-require: 0 + no-new-wrappers: 2 + no-obj-calls: 2 + no-octal: 2 + no-octal-escape: 2 + no-param-reassign: 0 + no-path-concat: 0 + no-plusplus: 0 + no-process-env: 0 + no-process-exit: 2 + no-proto: 2 + no-redeclare: 2 + no-regex-spaces: 1 + no-restricted-modules: 0 + no-script-url: 0 + no-self-compare: 2 + no-sequences: 2 + no-shadow: 2 + no-shadow-restricted-names: 2 + no-spaced-func: 2 + no-sparse-arrays: 1 + no-sync: 0 + no-ternary: 0 + no-trailing-spaces: 2 + no-throw-literal: 0 + no-this-before-super: 2 + no-unexpected-multiline: 2 + no-undef: 2 + no-undef-init: 2 + no-undefined: 2 + no-unneeded-ternary: 2 + no-unreachable: 2 + no-unused-expressions: 2 + no-unused-vars: [2, {"vars": "all", "args": "after-used"}] + no-use-before-define: 2 + no-useless-call: 2 + no-void: 0 + no-var: 2 + no-warning-comments: 0 + no-with: 2 + new-parens: 2 + newline-after-var: 0 + object-shorthand: [2, "always"] + one-var: [2, "never"] + operator-assignment: [2, "always"] + operator-linebreak: 0 + padded-blocks: 0 + prefer-const: 1 + prefer-spread: 2 + quote-props: [2, "as-needed"] + quotes: [2, "single"] + radix: 1 + semi: [2, "always"] + semi-spacing: [2, {"before": false, "after": true}] + sort-vars: 0 + space-after-keywords: [2, "always"] + space-before-blocks: [2, "always"] + space-before-function-paren: [2, "never"] + space-in-parens: 0 + space-infix-ops: 2 + space-return-throw-case: 2 + space-unary-ops: [2, { "words": true, "nonwords": false }] + spaced-comment: [1, "always"] + use-isnan: 2 + valid-jsdoc: 0 + valid-typeof: 2 + vars-on-top: 2 + wrap-iife: 0 + wrap-regex: 0 + yoda: [2, "never"] http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/directives/callout/callout-cel.directive.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/directives/callout/callout-cel.directive.js b/modules/control-center-web/src/main/js/app/directives/callout/callout-cel.directive.js index dda785b..e950b15 100644 --- a/modules/control-center-web/src/main/js/app/directives/callout/callout-cel.directive.js +++ b/modules/control-center-web/src/main/js/app/directives/callout/callout-cel.directive.js @@ -18,14 +18,14 @@ import template from './callout-cel.jade!'; export default ['igniteCalloutCel', [() => { - return { - scope: { - title: '@' - }, - restrict: 'E', - template, - replace: true, - transclude: true, - require: '^igniteCallout' - }; + return { + scope: { + title: '@' + }, + restrict: 'E', + template, + replace: true, + transclude: true, + require: '^igniteCallout' + }; }]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/directives/callout/callout.directive.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/directives/callout/callout.directive.js b/modules/control-center-web/src/main/js/app/directives/callout/callout.directive.js index f4dfba5..b0d43c6 100644 --- a/modules/control-center-web/src/main/js/app/directives/callout/callout.directive.js +++ b/modules/control-center-web/src/main/js/app/directives/callout/callout.directive.js @@ -18,10 +18,10 @@ import template from './callout.jade!'; export default ['igniteCallout', [() => { - return { - restrict: 'E', - template, - replace: true, - transclude: true - }; + return { + restrict: 'E', + template, + replace: true, + transclude: true + }; }]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/directives/loading/loading.directive.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/directives/loading/loading.directive.js b/modules/control-center-web/src/main/js/app/directives/loading/loading.directive.js index 7cb3769..908581f 100644 --- a/modules/control-center-web/src/main/js/app/directives/loading/loading.directive.js +++ b/modules/control-center-web/src/main/js/app/directives/loading/loading.directive.js @@ -18,10 +18,10 @@ import template from './loading.jade!'; export default ['igniteLoading', [() => { - return { - restrict: 'E', - template, - replace: true, - transclude: true - } -}]] + return { + restrict: 'E', + template, + replace: true, + transclude: true + }; +}]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.controller.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.controller.js b/modules/control-center-web/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.controller.js index 32687f5..53a30c1 100644 --- a/modules/control-center-web/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.controller.js +++ b/modules/control-center-web/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.controller.js @@ -15,10 +15,10 @@ * limitations under the License. */ -import types from 'app/data/os.json!' +import types from 'app/data/os.json!'; export default ['$scope', 'IgniteUiAceOnLoad', function($scope, onLoad) { - var ctrl = this; + const ctrl = this; // Scope values. $scope.types = types; @@ -26,8 +26,8 @@ export default ['$scope', 'IgniteUiAceOnLoad', function($scope, onLoad) { // Scope methods. $scope.onLoad = onLoad; - // Watchers definition. - let clusterWatcher = (value) => { + // Watchers definition. + const clusterWatcher = () => { delete ctrl.data; if (!$scope.cluster) @@ -37,7 +37,7 @@ export default ['$scope', 'IgniteUiAceOnLoad', function($scope, onLoad) { ctrl.data = $generatorDocker.clusterDocker($scope.cluster, $scope.type); }; - // Setup watchers. + // Setup watchers. $scope.$watch('type', clusterWatcher); $scope.$watch('cluster', clusterWatcher); -}] +}]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.directive.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.directive.js b/modules/control-center-web/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.directive.js index bc2b9ae..36e5e06 100644 --- a/modules/control-center-web/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.directive.js +++ b/modules/control-center-web/src/main/js/app/directives/ui-ace-docker/ui-ace-docker.directive.js @@ -15,22 +15,22 @@ * limitations under the License. */ -import template from './ui-ace-docker.jade!' -import controller from './ui-ace-docker.controller' +import template from './ui-ace-docker.jade!'; +import controller from './ui-ace-docker.controller'; export default ['igniteUiAceDocker', [() => { - return { - restrict: 'E', - scope: { - cluster: '=', - data: '=ngModel' - }, - bindToController: { - cluster: '=', - data: '=ngModel' - }, - template, - controller, - controllerAs: 'ctrl' - } -}]] + return { + restrict: 'E', + scope: { + cluster: '=', + data: '=ngModel' + }, + bindToController: { + cluster: '=', + data: '=ngModel' + }, + template, + controller, + controllerAs: 'ctrl' + }; +}]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/directives/ui-ace-java/ui-ace-java.controller.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/directives/ui-ace-java/ui-ace-java.controller.js b/modules/control-center-web/src/main/js/app/directives/ui-ace-java/ui-ace-java.controller.js index ff60312..fbdbbd7 100644 --- a/modules/control-center-web/src/main/js/app/directives/ui-ace-java/ui-ace-java.controller.js +++ b/modules/control-center-web/src/main/js/app/directives/ui-ace-java/ui-ace-java.controller.js @@ -19,25 +19,25 @@ const SERVER_CFG = 'ServerConfigurationFactory'; const CLIENT_CFG = 'ClientConfigurationFactory'; export default ['$scope', 'IgniteUiAceOnLoad', function($scope, onLoad) { - var ctrl = this; + const ctrl = this; // Scope methods. $scope.onLoad = onLoad; - // watchers definition - let clusterWatcher = (value) => { + // Watchers definition. + const clusterWatcher = value => { delete ctrl.data; if (!value) return; - let type = $scope.cfg ? CLIENT_CFG : SERVER_CFG; + const type = $scope.cfg ? CLIENT_CFG : SERVER_CFG; // TODO IGNITE-2054: need move $generatorJava to services. ctrl.data = $generatorJava.cluster($scope.cluster, 'factory', type, $scope.cfg); }; - // Setup watchers. + // Setup watchers. $scope.$watch('cfg', clusterWatcher, true); $scope.$watch('cluster', clusterWatcher); }]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/directives/ui-ace-java/ui-ace-java.directive.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/directives/ui-ace-java/ui-ace-java.directive.js b/modules/control-center-web/src/main/js/app/directives/ui-ace-java/ui-ace-java.directive.js index f08f45f..f6f7bac 100644 --- a/modules/control-center-web/src/main/js/app/directives/ui-ace-java/ui-ace-java.directive.js +++ b/modules/control-center-web/src/main/js/app/directives/ui-ace-java/ui-ace-java.directive.js @@ -20,14 +20,14 @@ import controller from './ui-ace-java.controller'; export default ['igniteUiAceJava', [() => { - return { - restrict: 'E', - scope: { - cluster: '=', - cfg: '=clusterCfg' - }, - template, - controller, - controllerAs: 'ctrl' - }; + return { + restrict: 'E', + scope: { + cluster: '=', + cfg: '=clusterCfg' + }, + template, + controller, + controllerAs: 'ctrl' + }; }]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/directives/ui-ace-pojos/ui-ace-pojos.controller.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/directives/ui-ace-pojos/ui-ace-pojos.controller.js b/modules/control-center-web/src/main/js/app/directives/ui-ace-pojos/ui-ace-pojos.controller.js index dc9c81e..23b58be 100644 --- a/modules/control-center-web/src/main/js/app/directives/ui-ace-pojos/ui-ace-pojos.controller.js +++ b/modules/control-center-web/src/main/js/app/directives/ui-ace-pojos/ui-ace-pojos.controller.js @@ -16,21 +16,21 @@ */ export default ['$scope', 'IgniteUiAceOnLoad', function($scope, onLoad) { - var ctrl = this; + const ctrl = this; // Scope methods. $scope.onLoad = onLoad; // Watchers definition. // Watcher clean instance data if instance to cluster caches was change - let cleanMetadatas = (value) => { + const cleanMetadatas = () => { delete ctrl.class; delete ctrl.metadatas; delete ctrl.classes; }; // Watcher updata metadata when changes caches and checkers useConstructor and includeKeyFields - let updateMetadatas = (value) => { + const updateMetadatas = () => { delete ctrl.metadatas; if (!ctrl.cluster || !ctrl.cluster.caches) @@ -41,22 +41,22 @@ export default ['$scope', 'IgniteUiAceOnLoad', function($scope, onLoad) { }; // Watcher update classes after - let updateClasses = (value) => { + const updateClasses = value => { delete ctrl.classes; if (!value) return; - let classes = ctrl.classes = []; + const classes = ctrl.classes = []; - _.forEach(ctrl.metadatas, (meta) => { + _.forEach(ctrl.metadatas, meta => { classes.push(meta.keyType); classes.push(meta.valueType); }); }; // Update pojos class. - let updateClass = (value) => { + const updateClass = value => { if (!value || !ctrl.metadatas.length) return; @@ -64,20 +64,20 @@ export default ['$scope', 'IgniteUiAceOnLoad', function($scope, onLoad) { }; // Update pojos data. - let updatePojosData = (value) => { + const updatePojosData = value => { if (!value) return; - _.forEach(ctrl.metadatas, (meta) => { + _.forEach(ctrl.metadatas, meta => { if (meta.keyType === ctrl.class) return ctrl.data = meta.keyClass; if (meta.valueType === ctrl.class) return ctrl.data = meta.valueClass; - }) + }); }; - // Setup watchers. Watchers order is important. + // Setup watchers. Watchers order is important. $scope.$watch('ctrl.cluster.caches', cleanMetadatas); $scope.$watch('ctrl.cluster.caches', updateMetadatas); $scope.$watch('ctrl.cluster.caches', updateClasses); http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/directives/ui-ace-pojos/ui-ace-pojos.directive.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/directives/ui-ace-pojos/ui-ace-pojos.directive.js b/modules/control-center-web/src/main/js/app/directives/ui-ace-pojos/ui-ace-pojos.directive.js index 3a274e4..1c2ba5e 100644 --- a/modules/control-center-web/src/main/js/app/directives/ui-ace-pojos/ui-ace-pojos.directive.js +++ b/modules/control-center-web/src/main/js/app/directives/ui-ace-pojos/ui-ace-pojos.directive.js @@ -15,23 +15,23 @@ * limitations under the License. */ -import template from './ui-ace-pojos.jade!' -import controller from './ui-ace-pojos.controller' +import template from './ui-ace-pojos.jade!'; +import controller from './ui-ace-pojos.controller'; export default ['igniteUiAcePojos', [() => { - return { - restrict: 'E', - scope: { - cluster: '=', - metadatas: '=ngModel' - }, - bindToController: { - cluster: '=', - metadatas: '=ngModel' - }, - template, - controller, - controllerAs: 'ctrl' - } -}]] \ No newline at end of file + return { + restrict: 'E', + scope: { + cluster: '=', + metadatas: '=ngModel' + }, + bindToController: { + cluster: '=', + metadatas: '=ngModel' + }, + template, + controller, + controllerAs: 'ctrl' + }; +}]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/directives/ui-ace-pom/ui-ace-pom.controller.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/directives/ui-ace-pom/ui-ace-pom.controller.js b/modules/control-center-web/src/main/js/app/directives/ui-ace-pom/ui-ace-pom.controller.js index fc650c7..37b7cd2 100644 --- a/modules/control-center-web/src/main/js/app/directives/ui-ace-pom/ui-ace-pom.controller.js +++ b/modules/control-center-web/src/main/js/app/directives/ui-ace-pom/ui-ace-pom.controller.js @@ -19,13 +19,13 @@ const igniteVersion = '1.5.0.final'; export default ['$scope', 'IgniteUiAceOnLoad', function($scope, onLoad) { - var ctrl = this; + const ctrl = this; // Scope methods. $scope.onLoad = onLoad; - // Watchers definition. - let clusterWatcher = (value) => { + // Watchers definition. + const clusterWatcher = value => { delete ctrl.data; if (!value) @@ -35,6 +35,6 @@ export default ['$scope', 'IgniteUiAceOnLoad', function($scope, onLoad) { ctrl.data = $generatorPom.pom($scope.cluster, igniteVersion).asString(); }; - // Setup watchers. + // Setup watchers. $scope.$watch('cluster', clusterWatcher); -}] +}]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/directives/ui-ace-pom/ui-ace-pom.directive.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/directives/ui-ace-pom/ui-ace-pom.directive.js b/modules/control-center-web/src/main/js/app/directives/ui-ace-pom/ui-ace-pom.directive.js index 3aad559..6dfa7c5 100644 --- a/modules/control-center-web/src/main/js/app/directives/ui-ace-pom/ui-ace-pom.directive.js +++ b/modules/control-center-web/src/main/js/app/directives/ui-ace-pom/ui-ace-pom.directive.js @@ -15,18 +15,18 @@ * limitations under the License. */ -import template from './ui-ace-pom.jade!' -import controller from './ui-ace-pom.controller' +import template from './ui-ace-pom.jade!'; +import controller from './ui-ace-pom.controller'; export default ['igniteUiAcePom', [() => { - return { - restrict: 'E', - scope: { - cluster: '=' - }, - template, - controller, - controllerAs: 'ctrl' - } -}]] \ No newline at end of file + return { + restrict: 'E', + scope: { + cluster: '=' + }, + template, + controller, + controllerAs: 'ctrl' + }; +}]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/directives/ui-ace-xml/ui-ace-xml.controller.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/directives/ui-ace-xml/ui-ace-xml.controller.js b/modules/control-center-web/src/main/js/app/directives/ui-ace-xml/ui-ace-xml.controller.js index 6ba65cf..2bfb7d8 100644 --- a/modules/control-center-web/src/main/js/app/directives/ui-ace-xml/ui-ace-xml.controller.js +++ b/modules/control-center-web/src/main/js/app/directives/ui-ace-xml/ui-ace-xml.controller.js @@ -16,23 +16,23 @@ */ export default ['$scope', 'IgniteUiAceOnLoad', function($scope, onLoad) { - var ctrl = this; + const ctrl = this; // Scope methods. $scope.onLoad = onLoad; - // Watchers definition. - let clusterWatcher = (value) => { + // Watchers definition. + const clusterWatcher = value => { delete ctrl.data; if (!value) return; // TODO IGNITE-2052: need move $generatorXml to services. - ctrl.data = $generatorXml.cluster($scope.cluster, $scope.cfg) + ctrl.data = $generatorXml.cluster($scope.cluster, $scope.cfg); }; - // Setup watchers. + // Setup watchers. $scope.$watch('cfg', clusterWatcher, true); $scope.$watch('cluster', clusterWatcher); -}] +}]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/directives/ui-ace-xml/ui-ace-xml.directive.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/directives/ui-ace-xml/ui-ace-xml.directive.js b/modules/control-center-web/src/main/js/app/directives/ui-ace-xml/ui-ace-xml.directive.js index fc98c3a..5604194 100644 --- a/modules/control-center-web/src/main/js/app/directives/ui-ace-xml/ui-ace-xml.directive.js +++ b/modules/control-center-web/src/main/js/app/directives/ui-ace-xml/ui-ace-xml.directive.js @@ -15,19 +15,19 @@ * limitations under the License. */ -import template from './ui-ace-xml.jade!' -import controller from './ui-ace-xml.controller' +import template from './ui-ace-xml.jade!'; +import controller from './ui-ace-xml.controller'; export default ['igniteUiAceXml', [() => { - return { - restrict: 'E', - scope: { - cluster: '=', - cfg: '=clusterCfg' - }, - template, - controller, - controllerAs: 'ctrl' - } -}]] \ No newline at end of file + return { + restrict: 'E', + scope: { + cluster: '=', + cfg: '=clusterCfg' + }, + template, + controller, + controllerAs: 'ctrl' + }; +}]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/filters/hasPojo/hasPojo.filter.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/filters/hasPojo/hasPojo.filter.js b/modules/control-center-web/src/main/js/app/filters/hasPojo/hasPojo.filter.js index ff0e813..0cf28f4 100644 --- a/modules/control-center-web/src/main/js/app/filters/hasPojo/hasPojo.filter.js +++ b/modules/control-center-web/src/main/js/app/filters/hasPojo/hasPojo.filter.js @@ -16,11 +16,11 @@ */ export default ['hasPojo', [() => { - let filter = (cache) => { + const filter = cache => { return cache.metadatas && cache.metadatas.length; }; return ({caches} = {}) => { return caches && _.chain(caches).filter(filter).first().value(); - } -}]] + }; +}]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/index.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/index.js b/modules/control-center-web/src/main/js/app/index.js index ffd159e..8effeb1 100644 --- a/modules/control-center-web/src/main/js/app/index.js +++ b/modules/control-center-web/src/main/js/app/index.js @@ -15,98 +15,100 @@ * limitations under the License. */ -import jQuery from 'jquery' -import _ from 'lodash' -import ace from 'ace' +import jQuery from 'jquery'; +import _ from 'lodash'; +import ace from 'ace'; import angular from 'angular'; import pdfMake from 'pdfmake'; -import 'angular-ui-router' -import 'angular-strap' -import 'angular-ui-ace' -import 'angular-tree-control' -import 'angular-smart-table' -import 'angular-animate' -import 'angular-sanitize' -import 'angular-ui-grid' -import 'angular-loading' -import 'angular-drag-and-drop-lists' -import 'angular-nvd3' +import 'angular-ui-router'; +import 'angular-strap'; +import 'angular-ui-ace'; +import 'angular-tree-control'; +import 'angular-smart-table'; +import 'angular-animate'; +import 'angular-sanitize'; +import 'angular-ui-grid'; +import 'angular-loading'; +import 'angular-drag-and-drop-lists'; +import 'angular-nvd3'; -import 'bootstrap-carousel' -import 'file-saver' -import 'jszip' -import 'query-command-supported' +import 'bootstrap-carousel'; +import 'file-saver'; +import 'jszip'; +import 'query-command-supported'; -import 'public/stylesheets/style.css!' +import 'public/stylesheets/style.css!'; -import 'nvd3/build/nv.d3.css!' -import 'angular-tree-control/css/tree-control-attribute.css!' -import 'angular-tree-control/css/tree-control.css!' -import 'angular-ui-grid/ui-grid.css!' -import 'angular-loading/angular-loading.css!' -import 'angular-motion/dist/angular-motion.css!' +import 'nvd3/build/nv.d3.css!'; +import 'angular-tree-control/css/tree-control-attribute.css!'; +import 'angular-tree-control/css/tree-control.css!'; +import 'angular-ui-grid/ui-grid.css!'; +import 'angular-loading/angular-loading.css!'; +import 'angular-motion/dist/angular-motion.css!'; window._ = _; +window.jQuery = jQuery; window.ace = ace; window.require = ace.require; window.angular = angular; +window.pdfMake = pdfMake; -import './modules/User/index' -import './modules/Auth/index' -import './modules/Form/index' +import './modules/User/index'; +import './modules/Auth/index'; +import './modules/Form/index'; -import './modules/states/login/index' -import './modules/states/logout/index' -import './modules/states/password/index' -import './modules/states/configuration/index' -import './modules/states/sql/index' -import './modules/states/profile/index' -import './modules/states/admin/index' +import './modules/states/login/index'; +import './modules/states/logout/index'; +import './modules/states/password/index'; +import './modules/states/configuration/index'; +import './modules/states/sql/index'; +import './modules/states/profile/index'; +import './modules/states/admin/index'; // ignite:modules -import './modules/dialog/index' -import './modules/navbar/main' -import './modules/settings/main' -import './modules/configuration/sidebar/main' -import './modules/terms/main' +import './modules/dialog/index'; +import './modules/navbar/main'; +import './modules/settings/main'; +import './modules/configuration/sidebar/main'; +import './modules/terms/main'; // endignite // Directives. -import igniteLoading from './directives/loading/loading.directive' -import igniteCallout from './directives/callout/callout.directive' -import igniteCalloutCel from './directives/callout/callout-cel.directive' -import igniteUiAceXml from './directives/ui-ace-xml/ui-ace-xml.directive' -import igniteUiAceJava from './directives/ui-ace-java/ui-ace-java.directive' -import igniteUiAcePom from './directives/ui-ace-pom/ui-ace-pom.directive' -import igniteUiAceDocker from './directives/ui-ace-docker/ui-ace-docker.directive' -import igniteUiAcePojos from './directives/ui-ace-pojos/ui-ace-pojos.directive' +import igniteLoading from './directives/loading/loading.directive'; +import igniteCallout from './directives/callout/callout.directive'; +import igniteCalloutCel from './directives/callout/callout-cel.directive'; +import igniteUiAceXml from './directives/ui-ace-xml/ui-ace-xml.directive'; +import igniteUiAceJava from './directives/ui-ace-java/ui-ace-java.directive'; +import igniteUiAcePom from './directives/ui-ace-pom/ui-ace-pom.directive'; +import igniteUiAceDocker from './directives/ui-ace-docker/ui-ace-docker.directive'; +import igniteUiAcePojos from './directives/ui-ace-pojos/ui-ace-pojos.directive'; // Services. -import IgniteUiAceOnLoad from './services/UiAceOnLoad/service' +import IgniteUiAceOnLoad from './services/UiAceOnLoad/service'; // Filters. -import hasPojo from './filters/hasPojo/hasPojo.filter' +import hasPojo from './filters/hasPojo/hasPojo.filter'; angular .module('ignite-console', [ - 'ui.router', - // Base modules. - 'ignite-console.Auth', - 'ignite-console.User', - 'ignite-console.Form', - // States. - 'ignite-console.states.login', - 'ignite-console.states.logout', - 'ignite-console.states.password', - 'ignite-console.states.configuration', - 'ignite-console.states.sql', - 'ignite-console.states.profile', - 'ignite-console.states.admin', - // Common modules. - 'ignite-console.dialog', - 'ignite-console.navbar', - 'ignite-console.userbar', + 'ui.router', + // Base modules. + 'ignite-console.Auth', + 'ignite-console.User', + 'ignite-console.Form', + // States. + 'ignite-console.states.login', + 'ignite-console.states.logout', + 'ignite-console.states.password', + 'ignite-console.states.configuration', + 'ignite-console.states.sql', + 'ignite-console.states.profile', + 'ignite-console.states.admin', + // Common modules. + 'ignite-console.dialog', + 'ignite-console.navbar', + 'ignite-console.userbar', 'ignite-console.configuration.sidebar', 'ignite-console.terms' ]) @@ -124,23 +126,23 @@ angular // Filters. .filter(...hasPojo) .config(['$stateProvider', '$locationProvider', '$urlRouterProvider', function($stateProvider, $locationProvider, $urlRouterProvider) { - // Set up the states. - $stateProvider - .state('base', { - url: '', - abstract: true, - templateUrl: '/base.html' - }) - .state('settings', { - url: '/settings', - abstract: true, - templateUrl: '/base.html' - }); + // Set up the states. + $stateProvider + .state('base', { + url: '', + abstract: true, + templateUrl: '/base.html' + }) + .state('settings', { + url: '/settings', + abstract: true, + templateUrl: '/base.html' + }); - $urlRouterProvider.when('/', '/configuration/clusters'); + $urlRouterProvider.when('/', '/configuration/clusters'); - $locationProvider.html5Mode(true); + $locationProvider.html5Mode(true); }]) .run(['$rootScope', '$state', ($root, $state) => { - $root.$state = $state; + $root.$state = $state; }]); http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/Auth/index.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/Auth/index.js b/modules/control-center-web/src/main/js/app/modules/Auth/index.js index 49ac849..542adb1 100644 --- a/modules/control-center-web/src/main/js/app/modules/Auth/index.js +++ b/modules/control-center-web/src/main/js/app/modules/Auth/index.js @@ -14,23 +14,24 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -import angular from 'angular' + +import angular from 'angular'; angular .module('ignite-console.Auth', [ - + ]) -.provider('Auth', function () { - var _auth = false; +.provider('Auth', function() { + let _auth = false; try { _auth = localStorage.authorized === 'true'; - } catch (ignore) { + } + catch (ignore) { // No-op. } - function _authorized (value) { + function _authorized(value) { try { return _auth = localStorage.authorized = !!value; } catch (ignore) { @@ -39,18 +40,18 @@ angular } this.$get = ['$http', '$rootScope', '$state', '$common', 'User', function($http, $root, $state, $common, User) { - return { - get authorized () { - return _auth; - }, - set authorized (auth) { + return { + get authorized() { + return _auth; + }, + set authorized(auth) { _authorized(auth); }, auth(action, userInfo) { $http.post('/api/v1/' + action, userInfo) .then(User.read) - .then(function (user) { - if (action != 'password/forgot') { + .then(user => { + if (action !== 'password/forgot') { _authorized(true); $root.$broadcast('user', user); @@ -59,23 +60,23 @@ angular } else $state.go('password.send'); }) - .catch(function (errMsg) { - $common.showPopoverMessage(undefined, undefined, 'user_email', errMsg.data); + .catch(function(errMsg) { + $common.showPopoverMessage(null, null, 'user_email', errMsg.data); }); }, - logout() { - $http.post('/api/v1/logout') - .then(function () { + logout() { + $http.post('/api/v1/logout') + .then(function() { User.clean(); _authorized(false); - $state.go('login'); - }) - .catch(function (errMsg) { - $common.showError(errMsg); - }); - } - } - }] + $state.go('login'); + }) + .catch(function(errMsg) { + $common.showError(errMsg); + }); + } + }; + }]; }); http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/Form/field/dropdown.directive.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/Form/field/dropdown.directive.js b/modules/control-center-web/src/main/js/app/modules/Form/field/dropdown.directive.js index bf26ebf..d5244cf 100644 --- a/modules/control-center-web/src/main/js/app/modules/Form/field/dropdown.directive.js +++ b/modules/control-center-web/src/main/js/app/modules/Form/field/dropdown.directive.js @@ -18,24 +18,24 @@ import template from './dropdown.jade!'; export default ['igniteFormFieldDropdown', ['IgniteFormGUID', guid => { - let link = scope => { - let {id} = scope; + const link = scope => { + const {id} = scope; - scope.id = id || guid(); - }; + scope.id = id || guid(); + }; - return { - restrict: 'E', - scope: { - id: '@', - name: '@', - options: '=', - ngModel: '=' - }, - link, - template, - replace: true, - transclude: true, - require: ['^form', '?^igniteFormField'] - }; + return { + restrict: 'E', + scope: { + id: '@', + name: '@', + options: '=', + ngModel: '=' + }, + link, + template, + replace: true, + transclude: true, + require: ['^form', '?^igniteFormField'] + }; }]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/Form/field/field.directive.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/Form/field/field.directive.js b/modules/control-center-web/src/main/js/app/modules/Form/field/field.directive.js index 1c30c4f..bacacec 100644 --- a/modules/control-center-web/src/main/js/app/modules/Form/field/field.directive.js +++ b/modules/control-center-web/src/main/js/app/modules/Form/field/field.directive.js @@ -18,20 +18,20 @@ import template from './field.jade!'; export default ['igniteFormField', [() => { - let controller = () => {}; + const controller = () => {}; - return { - restrict: 'E', - scope: {}, - bindToController: { - for: '@', - label: '@' - }, - template, - controller, - controllerAs: 'field', - replace: true, - transclude: true, - require: '^form' - }; + return { + restrict: 'E', + scope: {}, + bindToController: { + for: '@', + label: '@' + }, + template, + controller, + controllerAs: 'field', + replace: true, + transclude: true, + require: '^form' + }; }]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/Form/field/input/number.directive.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/Form/field/input/number.directive.js b/modules/control-center-web/src/main/js/app/modules/Form/field/input/number.directive.js index 90529b1..2bb37e0 100644 --- a/modules/control-center-web/src/main/js/app/modules/Form/field/input/number.directive.js +++ b/modules/control-center-web/src/main/js/app/modules/Form/field/input/number.directive.js @@ -18,26 +18,26 @@ import template from './number.jade!'; export default ['igniteFormFieldInputNumber', ['IgniteFormGUID', guid => { - let link = (scope, el, attrs, [form, label]) => { - let {id, name} = scope; - let field = form[name]; + const link = (scope, el, attrs, [form, label]) => { + const {id, name} = scope; + const field = form[name]; - scope.field = field; - label.for = scope.id = id || guid(); - }; + scope.field = field; + label.for = scope.id = id || guid(); + }; - return { - restrict: 'E', - scope: { - id: '@', - name: '@', - placeholder: '@', - ngModel: '=' - }, - link, - template, - replace: true, - transclude: true, - require: ['^form', '?^igniteFormField'] - }; + return { + restrict: 'E', + scope: { + id: '@', + name: '@', + placeholder: '@', + ngModel: '=' + }, + link, + template, + replace: true, + transclude: true, + require: ['^form', '?^igniteFormField'] + }; }]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/Form/index.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/Form/index.js b/modules/control-center-web/src/main/js/app/modules/Form/index.js index 9f17f57..eb6dcbf 100644 --- a/modules/control-center-web/src/main/js/app/modules/Form/index.js +++ b/modules/control-center-web/src/main/js/app/modules/Form/index.js @@ -15,6 +15,7 @@ * limitations under the License. */ +import angular from 'angular'; import igniteFormField from './field/field.directive'; import igniteFormFieldDropdown from './field/dropdown.directive'; import igniteFormFieldInputNumber from './field/input/number.directive'; @@ -27,7 +28,7 @@ angular .directive(...igniteFormFieldDropdown) .directive(...igniteFormFieldInputNumber) .factory('IgniteFormGUID', [() => { - let guid = 0; + let guid = 0; - return () => `form-field-${guid++}`; + return () => `form-field-${guid++}`; }]); http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/User/index.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/User/index.js b/modules/control-center-web/src/main/js/app/modules/User/index.js index 3c08bc8..6d81b65 100644 --- a/modules/control-center-web/src/main/js/app/modules/User/index.js +++ b/modules/control-center-web/src/main/js/app/modules/User/index.js @@ -14,51 +14,53 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -import angular from 'angular' + +import angular from 'angular'; angular .module('ignite-console.User', [ - + ]) -.provider('User', function () { - var _user; +.provider('User', function() { + let _user; - try { - _user = JSON.parse(localStorage.user); - } catch(ignore) { - // No-op. - } + try { + _user = JSON.parse(localStorage.user); + } + catch (ignore) { + // No-op. + } - this.$get = ['$q', '$injector', '$rootScope', '$state', '$http', ($q, $injector, $root, $state, $http) => { - if (_user) - $root.user = _user; + this.$get = ['$q', '$injector', '$rootScope', '$state', '$http', ($q, $injector, $root, $state, $http) => { + if (_user) + $root.user = _user; - return { - read() { - return $http.post('/api/v1/user').then(({data}) => { - if (_.isEmpty(data)) { - var Auth = $injector.get('Auth'); + return { + read() { + return $http.post('/api/v1/user').then(({data}) => { + if (_.isEmpty(data)) { + const Auth = $injector.get('Auth'); - Auth.authorized = false; + Auth.authorized = false; - $state.go('login'); - } + $state.go('login'); + } - try { - localStorage.user = JSON.stringify(data); - } catch(ignore) { - // No-op. - } + try { + localStorage.user = JSON.stringify(data); + } + catch (ignore) { + // No-op. + } - return _user = $root.user = data; - }) - }, - clean() { - delete $root.user; + return _user = $root.user = data; + }); + }, + clean() { + delete $root.user; - delete localStorage.user; - } - } - }] + delete localStorage.user; + } + }; + }]; }); http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/configuration/sidebar/main.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/configuration/sidebar/main.js b/modules/control-center-web/src/main/js/app/modules/configuration/sidebar/main.js index 48bdfea..3849749 100644 --- a/modules/control-center-web/src/main/js/app/modules/configuration/sidebar/main.js +++ b/modules/control-center-web/src/main/js/app/modules/configuration/sidebar/main.js @@ -15,14 +15,14 @@ * limitations under the License. */ -import angular from 'angular' +import angular from 'angular'; angular .module('ignite-console.configuration.sidebar', [ ]) .provider('igniteConfigurationSidebar', function() { - var items = [ + const items = [ { text: 'Clusters', sref: 'base.configuration.clusters' }, { text: 'Caches', sref: 'base.configuration.caches' }, { text: 'Metadata', sref: 'base.configuration.metadata' }, @@ -34,23 +34,23 @@ angular }; this.$get = [function() { - var r = angular.copy(items); + const r = angular.copy(items); r.push({ text: 'Summary', sref: 'base.configuration.summary' }); return r; - }] + }]; }) .directive('igniteConfigurationSidebar', ['igniteConfigurationSidebar', function(igniteConfigurationSidebar) { function controller() { - var ctrl = this; + const ctrl = this; ctrl.items = igniteConfigurationSidebar; } return { restrict: 'A', - controller: controller, + controller, controllerAs: 'sidebar' - } + }; }]); http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/dialog/dialog-content.directive.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/dialog/dialog-content.directive.js b/modules/control-center-web/src/main/js/app/modules/dialog/dialog-content.directive.js index 51c6c76..98e9903 100644 --- a/modules/control-center-web/src/main/js/app/modules/dialog/dialog-content.directive.js +++ b/modules/control-center-web/src/main/js/app/modules/dialog/dialog-content.directive.js @@ -15,17 +15,17 @@ * limitations under the License. */ -export default ['igniteDialogContent', ['$compile', ($compile) => { - let link = ($scope, $element, $attrs, igniteDialog) => { - igniteDialog.content = $element.html(); +export default ['igniteDialogContent', [() => { + const link = ($scope, $element, $attrs, igniteDialog) => { + igniteDialog.content = $element.html(); - $element.hide(); - }; + $element.hide(); + }; - return { - scope: {}, - restrict: 'E', - link, - require: '^igniteDialog' - }; + return { + scope: {}, + restrict: 'E', + link, + require: '^igniteDialog' + }; }]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/dialog/dialog-title.directive.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/dialog/dialog-title.directive.js b/modules/control-center-web/src/main/js/app/modules/dialog/dialog-title.directive.js index eddfc74..ed4adb8 100644 --- a/modules/control-center-web/src/main/js/app/modules/dialog/dialog-title.directive.js +++ b/modules/control-center-web/src/main/js/app/modules/dialog/dialog-title.directive.js @@ -16,16 +16,16 @@ */ export default ['igniteDialogTitle', [() => { - let link = ($scope, $element, $attrs, igniteDialog) => { - igniteDialog.title = $element.text(); + const link = ($scope, $element, $attrs, igniteDialog) => { + igniteDialog.title = $element.text(); - $element.hide(); - }; + $element.hide(); + }; - return { - scope: {}, - restrict: 'E', - link, - require: '^igniteDialog' - }; + return { + scope: {}, + restrict: 'E', + link, + require: '^igniteDialog' + }; }]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/dialog/dialog.controller.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/dialog/dialog.controller.js b/modules/control-center-web/src/main/js/app/modules/dialog/dialog.controller.js index ed56936..05518d3 100644 --- a/modules/control-center-web/src/main/js/app/modules/dialog/dialog.controller.js +++ b/modules/control-center-web/src/main/js/app/modules/dialog/dialog.controller.js @@ -15,26 +15,26 @@ * limitations under the License. */ -export default ['$rootScope' ,'$scope', 'IgniteDialog', function($root, $scope, IgniteDialog) { - let ctrl = this; +export default ['$rootScope', '$scope', 'IgniteDialog', function($root, $scope, IgniteDialog) { + const ctrl = this; - let dialog = new IgniteDialog({ + const dialog = new IgniteDialog({ scope: $scope }); ctrl.show = () => { dialog.$promise.then(dialog.show); - }; + }; $scope.$watch(() => ctrl.title, () => { - $scope.title = ctrl.title + $scope.title = ctrl.title; }); $scope.$watch(() => ctrl.content, () => { - $scope.content = ctrl.content + $scope.content = ctrl.content; }); $root.$on('$stateChangeStart', () => { dialog.hide(); - }) + }); }]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/dialog/dialog.directive.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/dialog/dialog.directive.js b/modules/control-center-web/src/main/js/app/modules/dialog/dialog.directive.js index 47d0435..a034fce 100644 --- a/modules/control-center-web/src/main/js/app/modules/dialog/dialog.directive.js +++ b/modules/control-center-web/src/main/js/app/modules/dialog/dialog.directive.js @@ -17,22 +17,22 @@ import controller from './dialog.controller'; -const template = "<a ng-click='ctrl.show()'><span ng-transclude=''></span></a>"; +const template = `<a ng-click='ctrl.show()'><span ng-transclude=''></span></a>`; export default ['igniteDialog', [() => { - return { - scope: { - title: '=' - }, - bindToController: { - title: '=' - }, - restrict: 'E', - template, - controller, - controllerAs: 'ctrl', - replace: true, - transclude: true, - require: '^igniteDialog' - }; + return { + scope: { + title: '=' + }, + bindToController: { + title: '=' + }, + restrict: 'E', + template, + controller, + controllerAs: 'ctrl', + replace: true, + transclude: true, + require: '^igniteDialog' + }; }]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/dialog/dialog.factory.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/dialog/dialog.factory.js b/modules/control-center-web/src/main/js/app/modules/dialog/dialog.factory.js index 59ce5bd..756451d 100644 --- a/modules/control-center-web/src/main/js/app/modules/dialog/dialog.factory.js +++ b/modules/control-center-web/src/main/js/app/modules/dialog/dialog.factory.js @@ -15,18 +15,18 @@ * limitations under the License. */ -import template from './dialog.jade!' +import template from './dialog.jade!'; -export default ['IgniteDialog', ['$modal', ($modal) => { - let defaults = { - template: template(), - placement: 'center', - show: false - }; +export default ['IgniteDialog', ['$modal', $modal => { + const defaults = { + template: template(), + placement: 'center', + show: false + }; - return function(options) { - options = _.extend({}, defaults, options); + return function(options) { + options = _.extend({}, defaults, options); - return $modal(options); - } + return $modal(options); + }; }]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/dialog/index.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/dialog/index.js b/modules/control-center-web/src/main/js/app/modules/dialog/index.js index a28997f..2ca51ba 100644 --- a/modules/control-center-web/src/main/js/app/modules/dialog/index.js +++ b/modules/control-center-web/src/main/js/app/modules/dialog/index.js @@ -15,6 +15,7 @@ * limitations under the License. */ +import angular from 'angular'; import igniteDialog from './dialog.directive'; import igniteDialogTitle from './dialog-title.directive'; import igniteDialogContent from './dialog-content.directive'; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/navbar/main.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/navbar/main.js b/modules/control-center-web/src/main/js/app/modules/navbar/main.js index 186bbf7..258026d 100644 --- a/modules/control-center-web/src/main/js/app/modules/navbar/main.js +++ b/modules/control-center-web/src/main/js/app/modules/navbar/main.js @@ -15,14 +15,14 @@ * limitations under the License. */ -import angular from 'angular' +import angular from 'angular'; angular .module('ignite-console.navbar', [ ]) .provider('igniteNavbar', function() { - var items = []; + const items = []; this.push = function(data) { items.push(data); @@ -30,18 +30,18 @@ angular this.$get = [function() { return items; - }] + }]; }) .directive('igniteNavbar', ['igniteNavbar', function(igniteNavbar) { function controller() { - var ctrl = this; + const ctrl = this; ctrl.items = igniteNavbar; } return { restrict: 'A', - controller: controller, + controller, controllerAs: 'navbar' - } + }; }]); http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/settings/main.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/settings/main.js b/modules/control-center-web/src/main/js/app/modules/settings/main.js index 7027fd6..90bee2d 100644 --- a/modules/control-center-web/src/main/js/app/modules/settings/main.js +++ b/modules/control-center-web/src/main/js/app/modules/settings/main.js @@ -15,12 +15,14 @@ * limitations under the License. */ +import angular from 'angular'; + angular .module('ignite-console.userbar', [ ]) .provider('igniteSettings', function() { - var items = []; + const items = []; this.push = function(data) { items.push(data); @@ -28,34 +30,33 @@ angular this.$get = [function() { return items; - }] + }]; }) .directive('igniteSettings', function() { return { restrict: 'A', - controller: ['$rootScope', 'igniteSettings', function ($root, igniteSettings) { - var ctrl = this; + controller: ['$rootScope', 'igniteSettings', function($root, igniteSettings) { + const ctrl = this; ctrl.items = [{text: 'Profile', sref: 'settings.profile'}]; - ctrl.customItems = igniteSettings; - var _rebuildSettings = function (event, user) { + const _rebuildSettings = (event, user) => { ctrl.items.splice(1); if (!user.becomeUsed && user.admin) ctrl.items.push({text: 'Admin Panel', sref: 'settings.admin'}); - ctrl.items.push.apply(ctrl.items, ctrl.customItems); + ctrl.items.push(...igniteSettings); if (!user.becomeUsed) ctrl.items.push({text: 'Log Out', sref: 'logout'}); }; if ($root.user) - _rebuildSettings(undefined, $root.user); + _rebuildSettings(null, $root.user); $root.$on('user', _rebuildSettings); }], controllerAs: 'settings' - } + }; }); http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/states/admin/index.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/states/admin/index.js b/modules/control-center-web/src/main/js/app/modules/states/admin/index.js index e0ca86c..4a4b748 100644 --- a/modules/control-center-web/src/main/js/app/modules/states/admin/index.js +++ b/modules/control-center-web/src/main/js/app/modules/states/admin/index.js @@ -14,18 +14,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -import angular from 'angular' + +import angular from 'angular'; angular .module('ignite-console.states.admin', [ - 'ui.router' + 'ui.router' ]) .config(['$stateProvider', function($stateProvider) { - // set up the states - $stateProvider - .state('settings.admin', { - url: '/admin', - templateUrl: '/settings/admin.html' - }) + // set up the states + $stateProvider + .state('settings.admin', { + url: '/admin', + templateUrl: '/settings/admin.html' + }); }]); http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/states/configuration/index.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/index.js b/modules/control-center-web/src/main/js/app/modules/states/configuration/index.js index 61b2d7e..8f35e36 100644 --- a/modules/control-center-web/src/main/js/app/modules/states/configuration/index.js +++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/index.js @@ -14,60 +14,60 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -import angular from 'angular' -import ConfigurationSummaryCtrl from './summary/summary.controller' -import ConfigurationSummaryResource from './summary/summary.resource' +import angular from 'angular'; + +import ConfigurationSummaryCtrl from './summary/summary.controller'; +import ConfigurationSummaryResource from './summary/summary.resource'; angular .module('ignite-console.states.configuration', [ - 'ui.router' + 'ui.router' ]) // Services. .service(...ConfigurationSummaryResource) .config(['$stateProvider', function($stateProvider) { - // Setup the states. - $stateProvider - .state('base.configuration', { - url: '/configuration', - templateUrl: '/configuration/sidebar.html' - }) - .state('base.configuration.clusters', { - url: '/clusters', - templateUrl: '/configuration/clusters.html', - data: { - loading: 'Loading clusters screen...' - } - }) - .state('base.configuration.caches', { - url: '/caches', - templateUrl: '/configuration/caches.html', - data: { - loading: 'Loading caches screen...' - } - }) - .state('base.configuration.metadata', { - url: '/metadata', - templateUrl: '/configuration/metadata.html', - data: { - loading: 'Loading metadata screen...' - } - }) - .state('base.configuration.igfs', { - url: '/igfs', - templateUrl: '/configuration/igfs.html', - data: { - loading: 'Loading IGFS screen...' - } - }) - .state('base.configuration.summary', { - url: '/summary', - templateUrl: '/configuration/summary.html', - controller: ConfigurationSummaryCtrl, - controllerAs: 'ctrl', - data: { - loading: 'Loading summary screen...' - } - }) + // Setup the states. + $stateProvider + .state('base.configuration', { + url: '/configuration', + templateUrl: '/configuration/sidebar.html' + }) + .state('base.configuration.clusters', { + url: '/clusters', + templateUrl: '/configuration/clusters.html', + data: { + loading: 'Loading clusters screen...' + } + }) + .state('base.configuration.caches', { + url: '/caches', + templateUrl: '/configuration/caches.html', + data: { + loading: 'Loading caches screen...' + } + }) + .state('base.configuration.metadata', { + url: '/metadata', + templateUrl: '/configuration/metadata.html', + data: { + loading: 'Loading metadata screen...' + } + }) + .state('base.configuration.igfs', { + url: '/igfs', + templateUrl: '/configuration/igfs.html', + data: { + loading: 'Loading IGFS screen...' + } + }) + .state('base.configuration.summary', { + url: '/summary', + templateUrl: '/configuration/summary.html', + controller: ConfigurationSummaryCtrl, + controllerAs: 'ctrl', + data: { + loading: 'Loading summary screen...' + } + }); }]); http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js b/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js index 0fc6736..a29ce86 100644 --- a/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js +++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js @@ -15,103 +15,106 @@ * limitations under the License. */ +import JSZip from 'jszip'; + export default [ '$scope', '$http', '$common', '$loading', '$table', '$filter', 'ConfigurationSummaryResource', function($scope, $http, $common, $loading, $table, $filter, Resource) { - let ctrl = this; - let igniteVersion = '1.5.0-b1'; + const ctrl = this; + const igniteVersion = '1.5.0-b1'; - $loading.start('loading'); + $loading.start('loading'); - Resource.read().then(({clusters}) => { - $scope.clusters = clusters; + Resource.read().then(({clusters}) => { + $scope.clusters = clusters; - $loading.finish('loading'); + $loading.finish('loading'); - const idx = sessionStorage.summarySelectedId || 0; + const idx = sessionStorage.summarySelectedId || 0; - $scope.selectItem(clusters[idx]); - }); + $scope.selectItem(clusters[idx]); + }); - $scope.panelExpanded = $common.panelExpanded; - $scope.tableVisibleRow = $table.tableVisibleRow; - $scope.widthIsSufficient = $common.widthIsSufficient; + $scope.panelExpanded = $common.panelExpanded; + $scope.tableVisibleRow = $table.tableVisibleRow; + $scope.widthIsSufficient = $common.widthIsSufficient; - $scope.tabsServer = { activeTab: 0 }; - $scope.tabsClient = { activeTab: 0 }; + $scope.tabsServer = { activeTab: 0 }; + $scope.tabsClient = { activeTab: 0 }; - $scope.selectItem = (cluster) => { - delete ctrl.cluster; + $scope.selectItem = cluster => { + delete ctrl.cluster; - if (!cluster) - return; + if (!cluster) + return; - ctrl.cluster = cluster; + ctrl.cluster = cluster; - $scope.cluster = cluster; - $scope.selectedItem = cluster; + $scope.cluster = cluster; + $scope.selectedItem = cluster; - sessionStorage.summarySelectedId = $scope.clusters.indexOf(cluster); - }; + sessionStorage.summarySelectedId = $scope.clusters.indexOf(cluster); + }; - let updateTab = (cluster) => { - if (!cluster) - return; + const updateTab = cluster => { + if (!cluster) + return; - if (!$filter('hasPojo')(cluster) && $scope.tabsClient.activeTab === 3) - $scope.tabsClient.activeTab = 0; - }; + if (!$filter('hasPojo')(cluster) && $scope.tabsClient.activeTab === 3) + $scope.tabsClient.activeTab = 0; + }; - $scope.$watch('cluster', updateTab); + $scope.$watch('cluster', updateTab); - // TODO IGNITE-2114: implemented as independent logic for download. - $scope.downloadConfiguration = function () { - var cluster = $scope.cluster; - var clientNearCfg = cluster.clientNearCfg; + // TODO IGNITE-2114: implemented as independent logic for download. + $scope.downloadConfiguration = function() { + const cluster = $scope.cluster; + const clientNearCfg = cluster.clientNearCfg; - var zip = new JSZip(); + const zip = new JSZip(); - zip.file('Dockerfile', ctrl.data.docker); + zip.file('Dockerfile', ctrl.data.docker); - var builder = $generatorProperties.generateProperties(cluster); + const builder = $generatorProperties.generateProperties(cluster); - if (builder) - zip.file('src/main/resources/secret.properties', builder.asString()); + if (builder) + zip.file('src/main/resources/secret.properties', builder.asString()); - var srcPath = 'src/main/java/'; + const srcPath = 'src/main/java/'; - var serverXml = 'config/' + cluster.name + '-server.xml'; - var clientXml = 'config/' + cluster.name + '-client.xml'; + const serverXml = 'config/' + cluster.name + '-server.xml'; + const clientXml = 'config/' + cluster.name + '-client.xml'; - zip.file(serverXml, $generatorXml.cluster(cluster)); - zip.file(clientXml , $generatorXml.cluster(cluster, clientNearCfg)); + zip.file(serverXml, $generatorXml.cluster(cluster)); + zip.file(clientXml, $generatorXml.cluster(cluster, clientNearCfg)); - zip.file(srcPath + 'factory/ServerConfigurationFactory.java', $generatorJava.cluster(cluster, 'factory', 'ServerConfigurationFactory', null)); - zip.file(srcPath + 'factory/ClientConfigurationFactory.java', $generatorJava.cluster(cluster, 'factory', 'ClientConfigurationFactory', clientNearCfg)); + zip.file(srcPath + 'factory/ServerConfigurationFactory.java', $generatorJava.cluster(cluster, 'factory', 'ServerConfigurationFactory', null)); + zip.file(srcPath + 'factory/ClientConfigurationFactory.java', $generatorJava.cluster(cluster, 'factory', 'ClientConfigurationFactory', clientNearCfg)); - zip.file(srcPath + 'startup/ServerNodeSpringStartup.java', $generatorJava.nodeStartup(cluster, 'startup', 'ServerNodeSpringStartup', '"' + serverXml + '"')); - zip.file(srcPath + 'startup/ClientNodeSpringStartup.java', $generatorJava.nodeStartup(cluster, 'startup', 'ClientNodeSpringStartup', '"' + clientXml + '"')); + zip.file(srcPath + 'startup/ServerNodeSpringStartup.java', $generatorJava.nodeStartup(cluster, 'startup', 'ServerNodeSpringStartup', '"' + serverXml + '"')); + zip.file(srcPath + 'startup/ClientNodeSpringStartup.java', $generatorJava.nodeStartup(cluster, 'startup', 'ClientNodeSpringStartup', '"' + clientXml + '"')); - zip.file(srcPath + 'startup/ServerNodeCodeStartup.java', $generatorJava.nodeStartup(cluster, 'startup', 'ServerNodeCodeStartup', - 'ServerConfigurationFactory.createConfiguration()', 'factory.ServerConfigurationFactory')); - zip.file(srcPath + 'startup/ClientNodeCodeStartup.java', $generatorJava.nodeStartup(cluster, 'startup', 'ClientNodeCodeStartup', - 'ClientConfigurationFactory.createConfiguration()', 'factory.ClientConfigurationFactory', clientNearCfg)); + zip.file(srcPath + 'startup/ServerNodeCodeStartup.java', $generatorJava.nodeStartup(cluster, 'startup', 'ServerNodeCodeStartup', + 'ServerConfigurationFactory.createConfiguration()', 'factory.ServerConfigurationFactory')); + zip.file(srcPath + 'startup/ClientNodeCodeStartup.java', $generatorJava.nodeStartup(cluster, 'startup', 'ClientNodeCodeStartup', + 'ClientConfigurationFactory.createConfiguration()', 'factory.ClientConfigurationFactory', clientNearCfg)); - zip.file('pom.xml', $generatorPom.pom(cluster, igniteVersion).asString()); + zip.file('pom.xml', $generatorPom.pom(cluster, igniteVersion).asString()); - zip.file('README.txt', $generatorReadme.readme().asString()); - zip.file('jdbc-drivers/README.txt', $generatorReadme.readmeJdbc().asString()); + zip.file('README.txt', $generatorReadme.readme().asString()); + zip.file('jdbc-drivers/README.txt', $generatorReadme.readmeJdbc().asString()); - for (var meta of ctrl.data.metadatas) { - if (meta.keyClass) - zip.file(srcPath + meta.keyType.replace(/\./g, '/') + '.java', meta.keyClass); + for (const meta of ctrl.data.metadatas) { + if (meta.keyClass) + zip.file(srcPath + meta.keyType.replace(/\./g, '/') + '.java', meta.keyClass); - zip.file(srcPath + meta.valueType.replace(/\./g, '/') + '.java', meta.valueClass); - } + zip.file(srcPath + meta.valueType.replace(/\./g, '/') + '.java', meta.valueClass); + } - var blob = zip.generate({type:'blob', mimeType: 'application/octet-stream'}); + const blob = zip.generate({type: 'blob', mimeType: 'application/octet-stream'}); - // Download archive. - saveAs(blob, cluster.name + '-configuration.zip'); - }; -}] + // Download archive. + saveAs(blob, cluster.name + '-configuration.zip'); + }; + } +]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.resource.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.resource.js b/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.resource.js index b125aca..14721b8 100644 --- a/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.resource.js +++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.resource.js @@ -16,26 +16,26 @@ */ export default ['ConfigurationSummaryResource', ['$q', '$http', ($q, $http) => { - const api = '/api/v1/configuration/clusters/list'; + const api = '/api/v1/configuration/clusters/list'; - return { - read() { - return $http - .post(api) - .then(({data}) => data) - .then(({clusters, caches, igfss}) => { - if (!clusters || !clusters.length) - return {}; + return { + read() { + return $http + .post(api) + .then(({data}) => data) + .then(({clusters, caches, igfss}) => { + if (!clusters || !clusters.length) + return {}; - _.each(clusters, cluster => { - cluster.igfss = _.filter(igfss, ({_id}) => _.contains(cluster.igfss, _id)); - cluster.caches = _.filter(caches, ({_id}) => _.contains(cluster.caches, _id)); - }); + _.each(clusters, cluster => { + cluster.igfss = _.filter(igfss, ({_id}) => _.contains(cluster.igfss, _id)); + cluster.caches = _.filter(caches, ({_id}) => _.contains(cluster.caches, _id)); + }); - return {clusters}; - }, (err) => { - return $q.reject(err); - }) - } - }; -}]] + return {clusters}; + }, err => { + return $q.reject(err); + }); + } + }; +}]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/states/login/index.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/states/login/index.js b/modules/control-center-web/src/main/js/app/modules/states/login/index.js index 46ba664..316aecd 100644 --- a/modules/control-center-web/src/main/js/app/modules/states/login/index.js +++ b/modules/control-center-web/src/main/js/app/modules/states/login/index.js @@ -14,37 +14,37 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - + import angular from 'angular'; angular .module('ignite-console.states.login', [ - 'ui.router', - // services - 'ignite-console.Auth' + 'ui.router', + // services + 'ignite-console.Auth' ]) .config(['$stateProvider', function($stateProvider) { - // set up the states - $stateProvider - .state('login', { - url: '/login', - templateUrl: '/login.html' - }); + // set up the states + $stateProvider + .state('login', { + url: '/login', + templateUrl: '/login.html' + }); }]) .run(['$rootScope', '$state', 'Auth', 'igniteTerms', function($root, $state, Auth, igniteTerms) { - $root.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams) { + $root.$on('$stateChangeStart', function(event, toState) { if (toState.name === igniteTerms.termsState) return; - if (!Auth.authorized && (toState.name !== 'login' && !_.startsWith(toState.name, 'password.'))) { - event.preventDefault(); + if (!Auth.authorized && (toState.name !== 'login' && !_.startsWith(toState.name, 'password.'))) { + event.preventDefault(); - $state.go('login'); - } - else if (Auth.authorized && toState.name === 'login') { - event.preventDefault(); + $state.go('login'); + } + else if (Auth.authorized && toState.name === 'login') { + event.preventDefault(); - $state.go('base.configuration.clusters'); - } - }); + $state.go('base.configuration.clusters'); + } + }); }]); http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/states/logout/index.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/states/logout/index.js b/modules/control-center-web/src/main/js/app/modules/states/logout/index.js index 4d9fa95..7609f24 100644 --- a/modules/control-center-web/src/main/js/app/modules/states/logout/index.js +++ b/modules/control-center-web/src/main/js/app/modules/states/logout/index.js @@ -14,20 +14,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -import angular from 'angular' + +import angular from 'angular'; angular .module('ignite-console.states.logout', [ - 'ui.router' + 'ui.router' ]) .config(['$stateProvider', function($stateProvider) { - // set up the states - $stateProvider - .state('logout', { - url: '/logout', - controller: ['Auth', function(Auth) { - Auth.logout(); - }] - }) + // set up the states + $stateProvider + .state('logout', { + url: '/logout', + controller: ['Auth', function(Auth) { + Auth.logout(); + }] + }); }]); http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/states/password/index.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/states/password/index.js b/modules/control-center-web/src/main/js/app/modules/states/password/index.js index 0c4d8f9..6014cd2 100644 --- a/modules/control-center-web/src/main/js/app/modules/states/password/index.js +++ b/modules/control-center-web/src/main/js/app/modules/states/password/index.js @@ -14,27 +14,27 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -import angular from 'angular' + +import angular from 'angular'; angular .module('ignite-console.states.password', [ - 'ui.router' + 'ui.router' ]) .config(['$stateProvider', function($stateProvider) { - // set up the states - $stateProvider + // set up the states + $stateProvider .state('password', { url: '/password', abstract: true, template: '<ui-view></ui-view>' }) - .state('password.reset', { - url: '/reset?{token}', - templateUrl: '/reset.html' - }) + .state('password.reset', { + url: '/reset?{token}', + templateUrl: '/reset.html' + }) .state('password.send', { url: '/send', templateUrl: '/reset.html' - }) + }); }]); http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/states/profile/index.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/states/profile/index.js b/modules/control-center-web/src/main/js/app/modules/states/profile/index.js index cefa13b..2de7e98 100644 --- a/modules/control-center-web/src/main/js/app/modules/states/profile/index.js +++ b/modules/control-center-web/src/main/js/app/modules/states/profile/index.js @@ -14,18 +14,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -import angular from 'angular' + +import angular from 'angular'; angular .module('ignite-console.states.profile', [ - 'ui.router' + 'ui.router' ]) .config(['$stateProvider', function($stateProvider) { - // set up the states - $stateProvider - .state('settings.profile', { - url: '/profile', - templateUrl: '/settings/profile.html' - }) + // set up the states + $stateProvider + .state('settings.profile', { + url: '/profile', + templateUrl: '/settings/profile.html' + }); }]); http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/states/sql/index.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/states/sql/index.js b/modules/control-center-web/src/main/js/app/modules/states/sql/index.js index fe09f33..ab196f0 100644 --- a/modules/control-center-web/src/main/js/app/modules/states/sql/index.js +++ b/modules/control-center-web/src/main/js/app/modules/states/sql/index.js @@ -14,21 +14,21 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -import angular from 'angular' + +import angular from 'angular'; angular .module('ignite-console.states.sql', [ - 'ui.router' + 'ui.router' ]) .config(['$stateProvider', function($stateProvider) { // set up the states $stateProvider .state('base.sql', { url: '/sql/{id}', - templateUrl: '/sql/sql.html', - data: { - loading: 'Loading notebook screen...' - } - }); + templateUrl: '/sql/sql.html', + data: { + loading: 'Loading notebook screen...' + } + }); }]); http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/modules/terms/main.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/modules/terms/main.js b/modules/control-center-web/src/main/js/app/modules/terms/main.js index fe820b8..e99d21d 100644 --- a/modules/control-center-web/src/main/js/app/modules/terms/main.js +++ b/modules/control-center-web/src/main/js/app/modules/terms/main.js @@ -15,47 +15,47 @@ * limitations under the License. */ -import angular from 'angular' +import angular from 'angular'; angular - .module('ignite-console.terms', [ +.module('ignite-console.terms', [ - ]) - .provider('igniteTerms', function() { - var _rows = [ - 'Apache Ignite Web Console, version 1.0.0 beta', - '© 2015 The Apache Software Foundation.', - 'Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are trademarks of The Apache Software Foundation.' - ]; +]) +.provider('igniteTerms', function() { + let _rows = [ + 'Apache Ignite Web Console, version 1.0.0 beta', + '© 2015 The Apache Software Foundation.', + 'Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are trademarks of The Apache Software Foundation.' + ]; - var _state; + let _state; - this.footerRows = function(rows) { - _rows = rows; - }; - - this.termsState = function(state) { - _state = state; - }; + this.footerRows = function(rows) { + _rows = rows; + }; - this.$get = [function() { - return { - footerRows: _rows, - termsState: _state - }; - }] - }) - .directive('igniteTerms', ['igniteTerms', function(igniteTerms) { - function controller() { - var ctrl = this; - - ctrl.footerRows = igniteTerms.footerRows; - ctrl.termsState = igniteTerms.termsState; - } + this.termsState = function(state) { + _state = state; + }; + this.$get = [function() { return { - restrict: 'A', - controller: controller, - controllerAs: 'terms' - } - }]); + footerRows: _rows, + termsState: _state + }; + }]; +}) +.directive('igniteTerms', ['igniteTerms', function(igniteTerms) { + function controller() { + const ctrl = this; + + ctrl.footerRows = igniteTerms.footerRows; + ctrl.termsState = igniteTerms.termsState; + } + + return { + restrict: 'A', + controller, + controllerAs: 'terms' + }; +}]); http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/app/services/UiAceOnLoad/service.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/services/UiAceOnLoad/service.js b/modules/control-center-web/src/main/js/app/services/UiAceOnLoad/service.js index 1beef0e..3c87b94 100644 --- a/modules/control-center-web/src/main/js/app/services/UiAceOnLoad/service.js +++ b/modules/control-center-web/src/main/js/app/services/UiAceOnLoad/service.js @@ -16,21 +16,21 @@ */ export default ['IgniteUiAceOnLoad', () => { - return (editor) => { - editor.setReadOnly(true); - editor.setOption('highlightActiveLine', false); - editor.setAutoScrollEditorIntoView(true); - editor.$blockScrolling = Infinity; + return editor => { + editor.setReadOnly(true); + editor.setOption('highlightActiveLine', false); + editor.setAutoScrollEditorIntoView(true); + editor.$blockScrolling = Infinity; - var renderer = editor.renderer; + const renderer = editor.renderer; - renderer.setHighlightGutterLine(false); - renderer.setShowPrintMargin(false); - renderer.setOption('fontFamily', 'monospace'); - renderer.setOption('fontSize', '12px'); - renderer.setOption('minLines', '25'); - renderer.setOption('maxLines', '25'); + renderer.setHighlightGutterLine(false); + renderer.setShowPrintMargin(false); + renderer.setOption('fontFamily', 'monospace'); + renderer.setOption('fontSize', '12px'); + renderer.setOption('minLines', '25'); + renderer.setOption('maxLines', '25'); - editor.setTheme('ace/theme/chrome'); - } -}] + editor.setTheme('ace/theme/chrome'); + }; +}]; http://git-wip-us.apache.org/repos/asf/ignite/blob/6b110a8d/modules/control-center-web/src/main/js/gulpfile.js/tasks/bundle.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/gulpfile.js/tasks/bundle.js b/modules/control-center-web/src/main/js/gulpfile.js/tasks/bundle.js index 09dad7a..63cff4b 100644 --- a/modules/control-center-web/src/main/js/gulpfile.js/tasks/bundle.js +++ b/modules/control-center-web/src/main/js/gulpfile.js/tasks/bundle.js @@ -22,7 +22,8 @@ var concat = require('gulp-concat'); var sequence = require('gulp-sequence'); var paths = [ - './app/**/*.js' + './app/**/*.js', + './app/**/*.jade' ]; var legacy_paths = [ @@ -42,7 +43,7 @@ gulp.task('bundle', function(cb) { }); // Package all external dependencies and ignite-console. -gulp.task('bundle:ignite', function() { +gulp.task('bundle:ignite', ['eslint'], function() { if (util.env.debug) { delete options.minify; }