You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2018/09/27 04:18:19 UTC

[1/3] ignite git commit: IGNITE-9569 Web console: Refactored DI to use $inject instead of arrays.

Repository: ignite
Updated Branches:
  refs/heads/master 813f0977b -> 6e6e8bfff


http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/services/Messages.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/Messages.service.js b/modules/web-console/frontend/app/services/Messages.service.js
index b5e1b3c..05c058b 100644
--- a/modules/web-console/frontend/app/services/Messages.service.js
+++ b/modules/web-console/frontend/app/services/Messages.service.js
@@ -17,8 +17,12 @@
 
 import {CancellationError} from 'app/errors/CancellationError';
 
-// Service to show various information and error messages.
-export default ['IgniteMessages', ['$alert', 'IgniteErrorParser', function($alert, errorParser) {
+/**
+ * Service to show various information and error messages.
+ * @param {mgcrea.ngStrap.alert.IAlertService} $alert
+ * @param {import('./ErrorParser.service').default} errorParser
+ */
+export default function factory($alert, errorParser) {
     // Common instance of alert modal.
     let msgModal;
 
@@ -47,6 +51,10 @@ export default ['IgniteMessages', ['$alert', 'IgniteErrorParser', function($aler
     return {
         errorMessage,
         hideAlert,
+        /**
+         * @param {string|CancellationError} message
+         * @param [err]
+         */
         showError(message, err, duration = 10) {
             if (message instanceof CancellationError)
                 return false;
@@ -55,8 +63,13 @@ export default ['IgniteMessages', ['$alert', 'IgniteErrorParser', function($aler
 
             return false;
         },
+        /**
+         * @param {string} message
+         */
         showInfo(message, duration = 5) {
             _showMessage(message, null, 'success', duration);
         }
     };
-}]];
+}
+
+factory.$inject = ['$alert', 'IgniteErrorParser'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/services/ModelNormalizer.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/ModelNormalizer.service.js b/modules/web-console/frontend/app/services/ModelNormalizer.service.js
index a617784..fbbff9b 100644
--- a/modules/web-console/frontend/app/services/ModelNormalizer.service.js
+++ b/modules/web-console/frontend/app/services/ModelNormalizer.service.js
@@ -15,8 +15,10 @@
  * limitations under the License.
  */
 
+import _ from 'lodash';
+
 // Service to normalize objects for dirty checks.
-export default ['IgniteModelNormalizer', function() {
+export default function() {
     /**
      * Normalize object for dirty checks.
      *
@@ -56,4 +58,4 @@ export default ['IgniteModelNormalizer', function() {
             return _.isEqual(prev, normalize(cur));
         }
     };
-}];
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/services/SqlTypes.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/SqlTypes.service.js b/modules/web-console/frontend/app/services/SqlTypes.service.js
index e42d903..389d8e7 100644
--- a/modules/web-console/frontend/app/services/SqlTypes.service.js
+++ b/modules/web-console/frontend/app/services/SqlTypes.service.js
@@ -15,6 +15,8 @@
  * limitations under the License.
  */
 
+import _ from 'lodash';
+
 // List of H2 reserved SQL keywords.
 import H2_SQL_KEYWORDS from 'app/data/sql-keywords.json';
 
@@ -36,7 +38,7 @@ const UNKNOWN_JDBC_TYPE = {
  */
 export default class SqlTypes {
     /**
-     * @param value {String} Value to check.
+     * @param {String} value Value to check.
      * @returns {boolean} 'true' if given text is valid Java class name.
      */
     validIdentifier(value) {
@@ -54,7 +56,7 @@ export default class SqlTypes {
     /**
      * Find JDBC type descriptor for specified JDBC type and options.
      *
-     * @param dbType {Number} Column db type.
+     * @param {Number} dbType  Column db type.
      * @return {String} Java type.
      */
     findJdbcType(dbType) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/services/Version.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/Version.service.js b/modules/web-console/frontend/app/services/Version.service.js
index a4625df..bbd03cb 100644
--- a/modules/web-console/frontend/app/services/Version.service.js
+++ b/modules/web-console/frontend/app/services/Version.service.js
@@ -49,8 +49,8 @@ const numberComparator = (a, b) => a > b ? 1 : a < b ? -1 : 0;
 
 /**
  * Compare to version.
- * @param a {Object} first compared version.
- * @param b {Object} second compared version.
+ * @param {Object} a first compared version.
+ * @param {Object} b second compared version.
  * @returns {Number} 1 if a > b, 0 if versions equals, -1 if a < b
  */
 const compare = (a, b) => {

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/services/exceptionHandler.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/exceptionHandler.js b/modules/web-console/frontend/app/services/exceptionHandler.js
index 82a88e1..c6a09c3 100644
--- a/modules/web-console/frontend/app/services/exceptionHandler.js
+++ b/modules/web-console/frontend/app/services/exceptionHandler.js
@@ -17,6 +17,9 @@
 
 import {CancellationError} from 'app/errors/CancellationError';
 
+/**
+ * @param {ng.ILogService} $log
+ */
 export function $exceptionHandler($log) {
     return function(exception, cause) {
         if (exception instanceof CancellationError)

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/package.json
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/package.json b/modules/web-console/frontend/package.json
index 33f397f..445b390 100644
--- a/modules/web-console/frontend/package.json
+++ b/modules/web-console/frontend/package.json
@@ -28,6 +28,7 @@
   ],
   "dependencies": {
     "@babel/plugin-transform-parameters": "7.0.0",
+    "@types/angular-translate": "2.16.0",
     "@uirouter/angularjs": "1.0.20",
     "@uirouter/core": "5.0.19",
     "@uirouter/rx": "0.4.1",


[2/3] ignite git commit: IGNITE-9569 Web console: Refactored DI to use $inject instead of arrays.

Posted by ak...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/branding/terms.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/branding/terms.directive.js b/modules/web-console/frontend/app/modules/branding/terms.directive.js
index 0207745..8126a39 100644
--- a/modules/web-console/frontend/app/modules/branding/terms.directive.js
+++ b/modules/web-console/frontend/app/modules/branding/terms.directive.js
@@ -15,7 +15,10 @@
  * limitations under the License.
  */
 
-export default ['igniteTerms', ['IgniteBranding', (branding) => {
+/**
+ * @param {import('./branding.service').default} branding
+ */
+export default function factory(branding) {
     function controller() {
         const ctrl = this;
 
@@ -27,4 +30,6 @@ export default ['igniteTerms', ['IgniteBranding', (branding) => {
         controller,
         controllerAs: 'terms'
     };
-}]];
+}
+
+factory.$inject = ['IgniteBranding'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/configuration/generator/PlatformGenerator.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/configuration/generator/PlatformGenerator.js b/modules/web-console/frontend/app/modules/configuration/generator/PlatformGenerator.js
index f4a712d4..5f7eed2 100644
--- a/modules/web-console/frontend/app/modules/configuration/generator/PlatformGenerator.js
+++ b/modules/web-console/frontend/app/modules/configuration/generator/PlatformGenerator.js
@@ -20,7 +20,12 @@ import _ from 'lodash';
 import {nonEmpty} from 'app/utils/lodashMixins';
 import { EmptyBean, Bean } from './Beans';
 
-export default ['JavaTypes', 'igniteClusterPlatformDefaults', 'igniteCachePlatformDefaults', function(JavaTypes, clusterDflts, cacheDflts) {
+/**
+ * @param {import('app/services/JavaTypes.service').default} JavaTypes
+ * @param {import('./defaults/Cluster.service').default} clusterDflts
+ * @param {import('./defaults/Cache.service').default} cacheDflts
+ */
+export default function service(JavaTypes, clusterDflts, cacheDflts) {
     class PlatformGenerator {
         static igniteConfigurationBean(cluster) {
             return new Bean('Apache.Ignite.Core.IgniteConfiguration', 'cfg', cluster, clusterDflts);
@@ -521,4 +526,6 @@ export default ['JavaTypes', 'igniteClusterPlatformDefaults', 'igniteCachePlatfo
     }
 
     return PlatformGenerator;
-}];
+}
+
+service.$inject = ['JavaTypes', 'igniteClusterPlatformDefaults', 'igniteCachePlatformDefaults'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/demo/Demo.module.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/demo/Demo.module.js b/modules/web-console/frontend/app/modules/demo/Demo.module.js
index 96d409f..6c14e4a 100644
--- a/modules/web-console/frontend/app/modules/demo/Demo.module.js
+++ b/modules/web-console/frontend/app/modules/demo/Demo.module.js
@@ -22,47 +22,12 @@ import templateUrl from 'views/templates/demo-info.tpl.pug';
 
 const DEMO_QUERY_STATE = {state: 'base.sql.notebook', params: {noteId: 'demo'}};
 
-angular
-.module('ignite-console.demo', [
-    'ignite-console.socket'
-])
-.config(['$stateProvider', ($stateProvider) => {
-    $stateProvider
-        .state('demo', {
-            abstract: true,
-            url: '/demo',
-            template: '<ui-view></ui-view>'
-        })
-        .state('demo.resume', {
-            url: '/resume',
-            permission: 'demo',
-            redirectTo: DEMO_QUERY_STATE,
-            unsaved: true,
-            tfMetaTags: {
-                title: 'Demo resume'
-            }
-        })
-        .state('demo.reset', {
-            url: '/reset',
-            permission: 'demo',
-            redirectTo: (trans) => {
-                const $http = trans.injector().get('$http');
-
-                return $http.post('/api/v1/demo/reset')
-                    .then(() => DEMO_QUERY_STATE)
-                    .catch((err) => {
-                        trans.injector().get('IgniteMessages').showError(err);
-
-                        return DEMO_QUERY_STATE;
-                    });
-            },
-            unsaved: true,
-            tfMetaTags: {
-                title: 'Demo reset'
-            }
-        });
-}])
-.provider('Demo', ['$stateProvider', '$httpProvider', 'igniteSocketFactoryProvider', function($state, $http, socketFactory) {
+/**
+ * @param {import('@uirouter/angularjs').StateProvider} $state
+ * @param {ng.IHttpProvider} $http
+ * @param {unknown} socketFactory
+ */
+export function DemoProvider($state, $http, socketFactory) {
     if (/(\/demo.*)/ig.test(location.pathname))
         sessionStorage.setItem('IgniteDemoMode', 'true');
 
@@ -74,13 +39,24 @@ angular
         $http.interceptors.push('demoInterceptor');
     }
 
-    this.$get = ['$rootScope', ($root) => {
+    function service($root) {
         $root.IgniteDemoMode = enabled;
 
         return {enabled};
-    }];
-}])
-.factory('demoInterceptor', ['Demo', function(Demo) {
+    }
+    service.$inject = ['$rootScope'];
+
+    this.$get = service;
+    return this;
+}
+
+DemoProvider.$inject = ['$stateProvider', '$httpProvider', 'igniteSocketFactoryProvider'];
+
+/**
+ * @param {{enabled: boolean}} Demo
+ * @returns {ng.IHttpInterceptor}
+ */
+function demoInterceptor(Demo) {
     const isApiRequest = (url) => /\/api\/v1/ig.test(url);
 
     return {
@@ -91,8 +67,17 @@ angular
             return cfg;
         }
     };
-}])
-.controller('demoController', ['$scope', '$state', '$window', 'IgniteConfirm', function($scope, $state, $window, Confirm) {
+}
+
+demoInterceptor.$inject = ['Demo'];
+
+/**
+ * @param {ng.IScope} $scope
+ * @param {import('@uirouter/angularjs').StateService} $state
+ * @param {ng.IWindowService} $window
+ * @param {ReturnType<typeof import('app/services/Confirm.service').default>} Confirm
+ */
+function demoController($scope, $state, $window, Confirm) {
     const _openTab = (stateName) => $window.open($state.href(stateName), '_blank');
 
     $scope.startDemo = () => {
@@ -111,17 +96,30 @@ angular
     $scope.closeDemo = () => {
         $window.close();
     };
-}])
-.provider('igniteDemoInfo', [function() {
+}
+
+demoController.$inject = ['$scope', '$state', '$window', 'IgniteConfirm'];
+
+function igniteDemoInfoProvider() {
     const items = DEMO_INFO;
 
     this.update = (data) => items[0] = data;
 
-    this.$get = [() => {
+    this.$get = () => {
         return items;
-    }];
-}])
-.service('DemoInfo', ['$rootScope', '$modal', '$state', '$q', 'igniteDemoInfo', 'AgentManager', function($rootScope, $modal, $state, $q, igniteDemoInfo, agentMgr) {
+    };
+    return this;
+}
+
+/**
+ * @param {ng.IRootScopeService} $rootScope
+ * @param {mgcrea.ngStrap.modal.IModalScope} $modal
+ * @param {import('@uirouter/angularjs').StateService} $state
+ * @param {ng.IQService} $q
+ * @param {Array<{title: string, message: Array<string>}>} igniteDemoInfo
+ * @param {import('app/modules/agent/AgentManager.service').default} agentMgr
+ */
+function DemoInfo($rootScope, $modal, $state, $q, igniteDemoInfo, agentMgr) {
     const scope = $rootScope.$new();
 
     let closePromise = null;
@@ -160,4 +158,59 @@ angular
                 .then(() => scope.hasAgents = true);
         }
     };
-}]);
+}
+
+DemoInfo.$inject = ['$rootScope', '$modal', '$state', '$q', 'igniteDemoInfo', 'AgentManager'];
+
+/**
+ * @param {import('@uirouter/angularjs').StateProvider} $stateProvider
+ */
+function config($stateProvider) {
+    $stateProvider
+        .state('demo', {
+            abstract: true,
+            url: '/demo',
+            template: '<ui-view></ui-view>'
+        })
+        .state('demo.resume', {
+            url: '/resume',
+            permission: 'demo',
+            redirectTo: DEMO_QUERY_STATE,
+            unsaved: true,
+            tfMetaTags: {
+                title: 'Demo resume'
+            }
+        })
+        .state('demo.reset', {
+            url: '/reset',
+            permission: 'demo',
+            redirectTo: (trans) => {
+                const $http = trans.injector().get('$http');
+
+                return $http.post('/api/v1/demo/reset')
+                    .then(() => DEMO_QUERY_STATE)
+                    .catch((err) => {
+                        trans.injector().get('IgniteMessages').showError(err);
+
+                        return DEMO_QUERY_STATE;
+                    });
+            },
+            unsaved: true,
+            tfMetaTags: {
+                title: 'Demo reset'
+            }
+        });
+}
+
+config.$inject = ['$stateProvider'];
+
+angular
+.module('ignite-console.demo', [
+    'ignite-console.socket'
+])
+.config(config)
+.provider('Demo', DemoProvider)
+.factory('demoInterceptor', demoInterceptor)
+.controller('demoController', demoController)
+.provider('igniteDemoInfo', igniteDemoInfoProvider)
+.service('DemoInfo', DemoInfo);

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/dialog/dialog-content.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/dialog/dialog-content.directive.js b/modules/web-console/frontend/app/modules/dialog/dialog-content.directive.js
index 98e9903..fb5d972 100644
--- a/modules/web-console/frontend/app/modules/dialog/dialog-content.directive.js
+++ b/modules/web-console/frontend/app/modules/dialog/dialog-content.directive.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-export default ['igniteDialogContent', [() => {
+export default () => {
     const link = ($scope, $element, $attrs, igniteDialog) => {
         igniteDialog.content = $element.html();
 
@@ -28,4 +28,4 @@ export default ['igniteDialogContent', [() => {
         link,
         require: '^igniteDialog'
     };
-}]];
+};

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/dialog/dialog-title.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/dialog/dialog-title.directive.js b/modules/web-console/frontend/app/modules/dialog/dialog-title.directive.js
index ed4adb8..ebd2d94 100644
--- a/modules/web-console/frontend/app/modules/dialog/dialog-title.directive.js
+++ b/modules/web-console/frontend/app/modules/dialog/dialog-title.directive.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-export default ['igniteDialogTitle', [() => {
+export default () => {
     const link = ($scope, $element, $attrs, igniteDialog) => {
         igniteDialog.title = $element.text();
 
@@ -28,4 +28,4 @@ export default ['igniteDialogTitle', [() => {
         link,
         require: '^igniteDialog'
     };
-}]];
+};

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/dialog/dialog.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/dialog/dialog.directive.js b/modules/web-console/frontend/app/modules/dialog/dialog.directive.js
index 7aab10f..96a96e2 100644
--- a/modules/web-console/frontend/app/modules/dialog/dialog.directive.js
+++ b/modules/web-console/frontend/app/modules/dialog/dialog.directive.js
@@ -19,7 +19,7 @@ import controller from './dialog.controller';
 
 const template = '<a ng-click="ctrl.show()"><span ng-transclude=""></span></a>';
 
-export default ['igniteDialog', [() => {
+export default () => {
     return {
         restrict: 'E',
         template,
@@ -29,4 +29,4 @@ export default ['igniteDialog', [() => {
         transclude: true,
         require: '^igniteDialog'
     };
-}]];
+};

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/dialog/dialog.factory.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/dialog/dialog.factory.js b/modules/web-console/frontend/app/modules/dialog/dialog.factory.js
index 749f833..14afcdf 100644
--- a/modules/web-console/frontend/app/modules/dialog/dialog.factory.js
+++ b/modules/web-console/frontend/app/modules/dialog/dialog.factory.js
@@ -17,7 +17,10 @@
 
 import templateUrl from './dialog.tpl.pug';
 
-export default ['IgniteDialog', ['$modal', function($modal) {
+/**
+ * @param {mgcrea.ngStrap.modal.IModalService} $modal
+ */
+export default function factory($modal) {
     const defaults = {
         templateUrl,
         show: false
@@ -28,4 +31,6 @@ export default ['IgniteDialog', ['$modal', function($modal) {
 
         return $modal(options);
     };
-}]];
+}
+
+factory.$inject = ['$modal'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/dialog/dialog.module.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/dialog/dialog.module.js b/modules/web-console/frontend/app/modules/dialog/dialog.module.js
index c9ba9f9..6d9324f 100644
--- a/modules/web-console/frontend/app/modules/dialog/dialog.module.js
+++ b/modules/web-console/frontend/app/modules/dialog/dialog.module.js
@@ -26,7 +26,7 @@ angular
 .module('ignite-console.dialog', [
 
 ])
-.factory(...IgniteDialog)
-.directive(...igniteDialog)
-.directive(...igniteDialogTitle)
-.directive(...igniteDialogContent);
+.factory('IgniteDialog', IgniteDialog)
+.directive('igniteDialog', igniteDialog)
+.directive('igniteDialogTitle', igniteDialogTitle)
+.directive('igniteDialogContent', igniteDialogContent);

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/form/field/bs-select-placeholder.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/form/field/bs-select-placeholder.directive.js b/modules/web-console/frontend/app/modules/form/field/bs-select-placeholder.directive.js
index cecb49c..9d7f59f 100644
--- a/modules/web-console/frontend/app/modules/form/field/bs-select-placeholder.directive.js
+++ b/modules/web-console/frontend/app/modules/form/field/bs-select-placeholder.directive.js
@@ -16,7 +16,13 @@
  */
 
 // Override AngularStrap "bsSelect" in order to dynamically change placeholder and class.
-export default ['bsSelect', [() => {
+export default () => {
+    /**
+     * @param {ng.IScope} scope
+     * @param {JQLite} $element
+     * @param {ng.IAttributes} attrs
+     * @param {[ng.INgModelController]} [ngModel]
+     */
     const link = (scope, $element, attrs, [ngModel]) => {
         if (!ngModel)
             return;
@@ -48,4 +54,4 @@ export default ['bsSelect', [() => {
         link,
         require: ['?ngModel']
     };
-}]];
+};

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/form/field/input/autofocus.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/form/field/input/autofocus.directive.js b/modules/web-console/frontend/app/modules/form/field/input/autofocus.directive.js
index 8ffc9a0..f54eaee 100644
--- a/modules/web-console/frontend/app/modules/form/field/input/autofocus.directive.js
+++ b/modules/web-console/frontend/app/modules/form/field/input/autofocus.directive.js
@@ -15,7 +15,17 @@
  * limitations under the License.
  */
 
-export default ['igniteFormFieldInputAutofocus', ['$timeout', ($timeout) => {
+import _ from 'lodash';
+
+/**
+ * @param {ng.ITimeoutService} $timeout
+ */
+export default function factory($timeout) {
+    /**
+     * @param {ng.IScope} scope
+     * @param {JQLite} el
+     * @param {ng.IAttributes} attrs
+     */
     const link = (scope, el, attrs) => {
         if (_.isUndefined(attrs.igniteFormFieldInputAutofocus) || attrs.igniteFormFieldInputAutofocus !== 'true')
             return;
@@ -27,4 +37,6 @@ export default ['igniteFormFieldInputAutofocus', ['$timeout', ($timeout) => {
         restrict: 'A',
         link
     };
-}]];
+}
+
+factory.$inject = ['$timeout'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/form/form.module.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/form/form.module.js b/modules/web-console/frontend/app/modules/form/form.module.js
index ac15c6a..29afa59 100644
--- a/modules/web-console/frontend/app/modules/form/form.module.js
+++ b/modules/web-console/frontend/app/modules/form/form.module.js
@@ -41,20 +41,20 @@ angular
 
 ])
 // Field.
-.directive(...placeholder)
+.directive('bsSelect', placeholder)
 // Validators.
-.directive(...ipaddress)
-.directive(...javaKeywords)
-.directive(...javaPackageSpecified)
-.directive(...javaBuiltInClass)
-.directive(...javaIdentifier)
-.directive(...javaPackageName)
-.directive(...propertyValueSpecified)
-.directive(...propertyUnique)
-.directive(...unique)
-.directive(...uuid)
+.directive('ipaddress', ipaddress)
+.directive('javaKeywords', javaKeywords)
+.directive('javaPackageSpecified', javaPackageSpecified)
+.directive('javaBuiltInClass', javaBuiltInClass)
+.directive('javaIdentifier', javaIdentifier)
+.directive('javaPackageName', javaPackageName)
+.directive('ignitePropertyValueSpecified', propertyValueSpecified)
+.directive('ignitePropertyUnique', propertyUnique)
+.directive('igniteUnique', unique)
+.directive('uuid', uuid)
 // Helpers.
-.directive(...igniteFormFieldInputAutofocus)
+.directive('igniteFormFieldInputAutofocus', igniteFormFieldInputAutofocus)
 
 // Generator of globally unique identifier.
 .service('IgniteFormGUID', IgniteFormGUID);

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/form/services/FormGUID.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/form/services/FormGUID.service.js b/modules/web-console/frontend/app/modules/form/services/FormGUID.service.js
index a018500..6b8df3c 100644
--- a/modules/web-console/frontend/app/modules/form/services/FormGUID.service.js
+++ b/modules/web-console/frontend/app/modules/form/services/FormGUID.service.js
@@ -15,8 +15,8 @@
  * limitations under the License.
  */
 
-export default [function() {
+export default function() {
     let guid = 0;
 
     return () => `form-field-${guid++}`;
-}];
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/form/validator/ipaddress.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/form/validator/ipaddress.directive.js b/modules/web-console/frontend/app/modules/form/validator/ipaddress.directive.js
index 77e63f6..531e682 100644
--- a/modules/web-console/frontend/app/modules/form/validator/ipaddress.directive.js
+++ b/modules/web-console/frontend/app/modules/form/validator/ipaddress.directive.js
@@ -15,7 +15,12 @@
  * limitations under the License.
  */
 
-export default ['ipaddress', ['IgniteInetAddress', (InetAddress) => {
+import _ from 'lodash';
+
+/**
+ * @param {ReturnType<typeof import('app/services/InetAddress.service').default>} InetAddress
+ */
+export default function factory(InetAddress) {
     const onlyDigits = (str) => (/^\d+$/.test(str));
 
     const strictParseInt = (str) => onlyDigits(str) ? parseInt(str, 10) : Number.NaN;
@@ -27,6 +32,12 @@ export default ['ipaddress', ['IgniteInetAddress', (InetAddress) => {
         return {ipOrHost, ports};
     };
 
+    /**
+     * @param {ng.IScope} scope
+     * @param {JQLite} el
+     * @param {ng.IAttributes} attrs
+     * @param {[ng.INgModelController]} [ngModel]
+     */
     const link = (scope, el, attrs, [ngModel]) => {
         const isEmpty = (modelValue) => {
             return ngModel.$isEmpty(modelValue) || _.isUndefined(attrs.ipaddress) || attrs.ipaddress !== 'true';
@@ -83,4 +94,6 @@ export default ['ipaddress', ['IgniteInetAddress', (InetAddress) => {
         link,
         require: ['ngModel']
     };
-}]];
+}
+
+factory.$inject = ['IgniteInetAddress'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/form/validator/java-built-in-class.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/form/validator/java-built-in-class.directive.js b/modules/web-console/frontend/app/modules/form/validator/java-built-in-class.directive.js
index f9aadc4..736179c 100644
--- a/modules/web-console/frontend/app/modules/form/validator/java-built-in-class.directive.js
+++ b/modules/web-console/frontend/app/modules/form/validator/java-built-in-class.directive.js
@@ -15,7 +15,18 @@
  * limitations under the License.
  */
 
-export default ['javaBuiltInClass', ['JavaTypes', (JavaTypes) => {
+import _ from 'lodash';
+
+/**
+ * @param {import('app/services/JavaTypes.service').default} JavaTypes
+ */
+export default function factory(JavaTypes) {
+    /**
+     * @param {ng.IScope} scope
+     * @param {JQLite} el
+     * @param {ng.IAttributes} attrs
+     * @param {[ng.INgModelController]} [ngModel]
+     */
     const link = (scope, el, attrs, [ngModel]) => {
         if (_.isUndefined(attrs.javaBuiltInClass) || !attrs.javaBuiltInClass)
             return;
@@ -32,4 +43,6 @@ export default ['javaBuiltInClass', ['JavaTypes', (JavaTypes) => {
         link,
         require: ['ngModel']
     };
-}]];
+}
+
+factory.$inject = ['JavaTypes'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/form/validator/java-identifier.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/form/validator/java-identifier.directive.js b/modules/web-console/frontend/app/modules/form/validator/java-identifier.directive.js
index a61d309..1b5a700 100644
--- a/modules/web-console/frontend/app/modules/form/validator/java-identifier.directive.js
+++ b/modules/web-console/frontend/app/modules/form/validator/java-identifier.directive.js
@@ -15,7 +15,18 @@
  * limitations under the License.
  */
 
-export default ['javaIdentifier', ['JavaTypes', (JavaTypes) => {
+import _ from 'lodash';
+
+/**
+ * @param {import('app/services/JavaTypes.service').default} JavaTypes
+ */
+export default function factory(JavaTypes) {
+    /**
+     * @param {ng.IScope} scope
+     * @param {JQLite} el
+     * @param {ng.IAttributes} attrs
+     * @param {[ng.INgModelController]} [ngModel]
+     */
     const link = (scope, el, attrs, [ngModel]) => {
         if (_.isNil(attrs.javaIdentifier) || attrs.javaIdentifier !== 'true')
             return;
@@ -35,4 +46,6 @@ export default ['javaIdentifier', ['JavaTypes', (JavaTypes) => {
         link,
         require: ['ngModel']
     };
-}]];
+}
+
+factory.$inject = ['JavaTypes'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/form/validator/java-keywords.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/form/validator/java-keywords.directive.js b/modules/web-console/frontend/app/modules/form/validator/java-keywords.directive.js
index 9d5c2aa..9581ee9 100644
--- a/modules/web-console/frontend/app/modules/form/validator/java-keywords.directive.js
+++ b/modules/web-console/frontend/app/modules/form/validator/java-keywords.directive.js
@@ -15,7 +15,18 @@
  * limitations under the License.
  */
 
-export default ['javaKeywords', ['JavaTypes', (JavaTypes) => {
+import _ from 'lodash';
+
+/**
+ * @param {import('app/services/JavaTypes.service').default} JavaTypes
+ */
+export default function factory(JavaTypes) {
+    /**
+     * @param {ng.IScope} scope
+     * @param {JQLite} el
+     * @param {ng.IAttributes} attrs
+     * @param {[ng.INgModelController]} [ngModel]
+     */
     const link = (scope, el, attrs, [ngModel]) => {
         if (_.isNil(attrs.javaKeywords) || attrs.javaKeywords === 'false')
             return;
@@ -36,4 +47,6 @@ export default ['javaKeywords', ['JavaTypes', (JavaTypes) => {
         link,
         require: ['ngModel']
     };
-}]];
+}
+
+factory.$inject = ['JavaTypes'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/form/validator/java-package-name.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/form/validator/java-package-name.directive.js b/modules/web-console/frontend/app/modules/form/validator/java-package-name.directive.js
index 49d4b55..9059112 100644
--- a/modules/web-console/frontend/app/modules/form/validator/java-package-name.directive.js
+++ b/modules/web-console/frontend/app/modules/form/validator/java-package-name.directive.js
@@ -15,7 +15,18 @@
  * limitations under the License.
  */
 
-export default ['javaPackageName', ['JavaTypes', (JavaTypes) => {
+import _ from 'lodash';
+
+/**
+ * @param {import('app/services/JavaTypes.service').default} JavaTypes
+ */
+export default function factory(JavaTypes) {
+    /**
+     * @param {ng.IScope} scope
+     * @param {JQLite} el
+     * @param {ng.IAttributes} attrs
+     * @param {[ng.INgModelController]} [ngModel]
+     */
     const link = (scope, el, attrs, [ngModel]) => {
         if (_.isNil(attrs.javaPackageName) || attrs.javaPackageName === 'false')
             return;
@@ -28,4 +39,6 @@ export default ['javaPackageName', ['JavaTypes', (JavaTypes) => {
         link,
         require: ['ngModel']
     };
-}]];
+}
+
+factory.$inject = ['JavaTypes'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/form/validator/java-package-specified.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/form/validator/java-package-specified.directive.js b/modules/web-console/frontend/app/modules/form/validator/java-package-specified.directive.js
index d3274ae..5ff25d5 100644
--- a/modules/web-console/frontend/app/modules/form/validator/java-package-specified.directive.js
+++ b/modules/web-console/frontend/app/modules/form/validator/java-package-specified.directive.js
@@ -15,7 +15,18 @@
  * limitations under the License.
  */
 
-export default ['javaPackageSpecified', ['JavaTypes', (JavaTypes) => {
+import _ from 'lodash';
+
+/**
+ * @param {import('app/services/JavaTypes.service').default} JavaTypes
+ */
+export default function factory(JavaTypes) {
+    /**
+     * @param {ng.IScope} scope
+     * @param {JQLite} el
+     * @param {ng.IAttributes} attrs
+     * @param {[ng.INgModelController]} [ngModel]
+     */
     const link = (scope, el, attrs, [ngModel]) => {
         if (_.isNil(attrs.javaPackageSpecified) || attrs.javaPackageSpecified === 'false')
             return;
@@ -36,4 +47,6 @@ export default ['javaPackageSpecified', ['JavaTypes', (JavaTypes) => {
         link,
         require: ['ngModel']
     };
-}]];
+}
+
+factory.$inject = ['JavaTypes'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/form/validator/property-unique.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/form/validator/property-unique.directive.js b/modules/web-console/frontend/app/modules/form/validator/property-unique.directive.js
index 8cfae89..fbcf734 100644
--- a/modules/web-console/frontend/app/modules/form/validator/property-unique.directive.js
+++ b/modules/web-console/frontend/app/modules/form/validator/property-unique.directive.js
@@ -15,7 +15,18 @@
  * limitations under the License.
  */
 
-export default ['ignitePropertyUnique', ['$parse', ($parse) => {
+import _ from 'lodash';
+
+/**
+ * @param {ng.IParseService} $parse
+ */
+export default function factory($parse) {
+    /**
+     * @param {ng.IScope} scope
+     * @param {JQLite} el
+     * @param {ng.IAttributes} attrs
+     * @param {[ng.INgModelController]} [ngModel]
+     */
     const link = (scope, el, attrs, [ngModel]) => {
         if (_.isUndefined(attrs.ignitePropertyUnique) || !attrs.ignitePropertyUnique)
             return;
@@ -44,4 +55,6 @@ export default ['ignitePropertyUnique', ['$parse', ($parse) => {
         link,
         require: ['ngModel']
     };
-}]];
+}
+
+factory.$inject = ['$parse'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/form/validator/property-value-specified.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/form/validator/property-value-specified.directive.js b/modules/web-console/frontend/app/modules/form/validator/property-value-specified.directive.js
index d113a4f..5136d1a 100644
--- a/modules/web-console/frontend/app/modules/form/validator/property-value-specified.directive.js
+++ b/modules/web-console/frontend/app/modules/form/validator/property-value-specified.directive.js
@@ -15,7 +15,15 @@
  * limitations under the License.
  */
 
-export default ['ignitePropertyValueSpecified', [() => {
+import _ from 'lodash';
+
+export default () => {
+    /**
+     * @param {ng.IScope} scope
+     * @param {JQLite} el
+     * @param {ng.IAttributes} attrs
+     * @param {[ng.INgModelController]} [ngModel]
+     */
     const link = (scope, el, attrs, [ngModel]) => {
         if (_.isUndefined(attrs.ignitePropertyValueSpecified) || !attrs.ignitePropertyValueSpecified)
             return;
@@ -28,4 +36,4 @@ export default ['ignitePropertyValueSpecified', [() => {
         link,
         require: ['ngModel']
     };
-}]];
+};

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/form/validator/unique.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/form/validator/unique.directive.js b/modules/web-console/frontend/app/modules/form/validator/unique.directive.js
index 318b8b6..ac6787f 100644
--- a/modules/web-console/frontend/app/modules/form/validator/unique.directive.js
+++ b/modules/web-console/frontend/app/modules/form/validator/unique.directive.js
@@ -26,9 +26,16 @@ class Controller {
     listEditableTransclude;
     /** @type {Array} */
     items;
+    /** @type {string?} */
+    key;
+    /** @type {Array<string>} */
+    skip;
 
     static $inject = ['$scope'];
 
+    /**
+     * @param {ng.IScope} $scope
+     */
     constructor($scope) {
         this.$scope = $scope;
     }
@@ -69,7 +76,7 @@ class Controller {
     }
 }
 
-export default ['igniteUnique', () => {
+export default () => {
     return {
         controller: Controller,
         require: {
@@ -82,4 +89,4 @@ export default ['igniteUnique', () => {
             skip: '<?igniteUniqueSkip'
         }
     };
-}];
+};

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/form/validator/uuid.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/form/validator/uuid.directive.js b/modules/web-console/frontend/app/modules/form/validator/uuid.directive.js
index 94c6e3f..cb20981 100644
--- a/modules/web-console/frontend/app/modules/form/validator/uuid.directive.js
+++ b/modules/web-console/frontend/app/modules/form/validator/uuid.directive.js
@@ -15,7 +15,18 @@
  * limitations under the License.
  */
 
-export default ['uuid', ['JavaTypes', (JavaTypes) => {
+import _ from 'lodash';
+
+/**
+ * @param {import('app/services/JavaTypes.service').default} JavaTypes
+ */
+export default function factory(JavaTypes) {
+    /**
+     * @param {ng.IScope} scope
+     * @param {JQLite} el
+     * @param {ng.IAttributes} attrs
+     * @param {[ng.INgModelController]} [ngModel]
+     */
     const link = (scope, el, attrs, [ngModel]) => {
         if (_.isNil(attrs.uuid) || attrs.uuid !== 'true')
             return;
@@ -28,4 +39,6 @@ export default ['uuid', ['JavaTypes', (JavaTypes) => {
         link,
         require: ['ngModel']
     };
-}]];
+}
+
+factory.$inject = ['JavaTypes'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/getting-started/GettingStarted.provider.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/getting-started/GettingStarted.provider.js b/modules/web-console/frontend/app/modules/getting-started/GettingStarted.provider.js
index 09b65f4..14dd26a 100644
--- a/modules/web-console/frontend/app/modules/getting-started/GettingStarted.provider.js
+++ b/modules/web-console/frontend/app/modules/getting-started/GettingStarted.provider.js
@@ -17,101 +17,130 @@
 
 import angular from 'angular';
 
-// Getting started pages.
+/**
+ * @typedef GettingStartedItem
+ * @prop {string} title
+ * @prop {Array<string>} message
+ */
+
+/**
+ * @typedef {Array<GettingStartedItem>} GettingStartedItems
+ */
+
 import PAGES from 'app/data/getting-started.json';
 import templateUrl from 'views/templates/getting-started.tpl.pug';
 
-angular
-    .module('ignite-console.getting-started', [])
-    .provider('igniteGettingStarted', function() {
-        const items = PAGES;
+export function provider() {
+    /**
+     * Getting started pages.
+     * @type {GettingStartedItems}
+     */
+    const items = PAGES;
 
-        this.push = (before, data) => {
-            const idx = _.findIndex(items, {title: before});
+    this.push = (before, data) => {
+        const idx = _.findIndex(items, {title: before});
 
-            if (idx < 0)
-                items.push(data);
-            else
-                items.splice(idx, 0, data);
-        };
+        if (idx < 0)
+            items.push(data);
+        else
+            items.splice(idx, 0, data);
+    };
 
-        this.update = (before, data) => {
-            const idx = _.findIndex(items, {title: before});
+    this.update = (before, data) => {
+        const idx = _.findIndex(items, {title: before});
 
-            if (idx >= 0)
-                items[idx] = data;
-        };
+        if (idx >= 0)
+            items[idx] = data;
+    };
 
-        this.$get = [function() {
-            return items;
-        }];
-    })
-    .service('gettingStarted', ['$rootScope', '$modal', 'igniteGettingStarted', function($root, $modal, igniteGettingStarted) {
-        const _model = igniteGettingStarted;
+    this.$get = function() {
+        return items;
+    };
 
-        let _page = 0;
+    return this;
+}
 
-        const scope = $root.$new();
+/**
+ * @param {ng.IRootScopeService} $root
+ * @param {mgcrea.ngStrap.modal.IModalService} $modal
+ * @param {GettingStartedItems} igniteGettingStarted
+ */
+export function service($root, $modal, igniteGettingStarted) {
+    const _model = igniteGettingStarted;
 
-        scope.ui = {
-            dontShowGettingStarted: false
-        };
+    let _page = 0;
 
-        function _fillPage() {
-            if (_page === 0)
-                scope.title = `${_model[_page].title}`;
-            else
-                scope.title = `${_page}. ${_model[_page].title}`;
+    const scope = $root.$new();
 
-            scope.message = _model[_page].message.join(' ');
-        }
+    scope.ui = {
+        dontShowGettingStarted: false
+    };
+
+    function _fillPage() {
+        if (_page === 0)
+            scope.title = `${_model[_page].title}`;
+        else
+            scope.title = `${_page}. ${_model[_page].title}`;
 
-        scope.isFirst = () => _page === 0;
+        scope.message = _model[_page].message.join(' ');
+    }
 
-        scope.isLast = () => _page === _model.length - 1;
+    scope.isFirst = () => _page === 0;
 
-        scope.next = () => {
-            _page += 1;
+    scope.isLast = () => _page === _model.length - 1;
 
-            _fillPage();
-        };
+    scope.next = () => {
+        _page += 1;
 
-        scope.prev = () => {
-            _page -= 1;
+        _fillPage();
+    };
 
-            _fillPage();
-        };
+    scope.prev = () => {
+        _page -= 1;
 
-        const dialog = $modal({ templateUrl, scope, show: false, backdrop: 'static'});
+        _fillPage();
+    };
 
-        scope.close = () => {
+    const dialog = $modal({ templateUrl, scope, show: false, backdrop: 'static'});
+
+    scope.close = () => {
+        try {
+            localStorage.showGettingStarted = !scope.ui.dontShowGettingStarted;
+        }
+        catch (ignore) {
+            // No-op.
+        }
+
+        dialog.hide();
+    };
+
+    return {
+        /**
+         * @param {boolean} force
+         */
+        tryShow: (force) => {
             try {
-                localStorage.showGettingStarted = !scope.ui.dontShowGettingStarted;
+                scope.ui.dontShowGettingStarted = !(_.isNil(localStorage.showGettingStarted)
+                        || localStorage.showGettingStarted === 'true');
             }
             catch (ignore) {
                 // No-op.
             }
 
-            dialog.hide();
-        };
+            if (force || !scope.ui.dontShowGettingStarted) {
+                _page = 0;
 
-        return {
-            tryShow: (force) => {
-                try {
-                    scope.ui.dontShowGettingStarted = !(_.isNil(localStorage.showGettingStarted)
-                        || localStorage.showGettingStarted === 'true');
-                }
-                catch (ignore) {
-                    // No-op.
-                }
+                _fillPage();
 
-                if (force || !scope.ui.dontShowGettingStarted) {
-                    _page = 0;
+                dialog.$promise.then(dialog.show);
+            }
+        }
+    };
+}
 
-                    _fillPage();
+service.$inject = ['$rootScope', '$modal', 'igniteGettingStarted'];
 
-                    dialog.$promise.then(dialog.show);
-                }
-            }
-        };
-    }]);
+export default angular
+    .module('ignite-console.getting-started', [])
+    .provider('igniteGettingStarted', provider)
+    .service('gettingStarted', service);

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/loading/loading.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/loading/loading.directive.js b/modules/web-console/frontend/app/modules/loading/loading.directive.js
index 8a4ca9f..983e597 100644
--- a/modules/web-console/frontend/app/modules/loading/loading.directive.js
+++ b/modules/web-console/frontend/app/modules/loading/loading.directive.js
@@ -18,7 +18,11 @@
 import template from './loading.pug';
 import './loading.scss';
 
-export default ['igniteLoading', ['IgniteLoading', '$compile', (Loading, $compile) => {
+/**
+ * @param {ReturnType<typeof import('./loading.service').default>} Loading
+ * @param {ng.ICompileService} $compile
+ */
+export default function factory(Loading, $compile) {
     const link = (scope, element) => {
         const compiledTemplate = $compile(template);
 
@@ -48,4 +52,6 @@ export default ['igniteLoading', ['IgniteLoading', '$compile', (Loading, $compil
         restrict: 'A',
         link
     };
-}]];
+}
+
+factory.$inject = ['IgniteLoading', '$compile'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/loading/loading.module.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/loading/loading.module.js b/modules/web-console/frontend/app/modules/loading/loading.module.js
index 889cd6b..ac9e127 100644
--- a/modules/web-console/frontend/app/modules/loading/loading.module.js
+++ b/modules/web-console/frontend/app/modules/loading/loading.module.js
@@ -22,5 +22,5 @@ import IgniteLoadingService from './loading.service';
 
 angular
     .module('ignite-console.loading', [])
-    .directive(...IgniteLoadingDirective)
-    .service(...IgniteLoadingService);
+    .directive('igniteLoading', IgniteLoadingDirective)
+    .service('IgniteLoading', IgniteLoadingService);

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/loading/loading.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/loading/loading.service.js b/modules/web-console/frontend/app/modules/loading/loading.service.js
index a5c9e7e..0aa02a3 100644
--- a/modules/web-console/frontend/app/modules/loading/loading.service.js
+++ b/modules/web-console/frontend/app/modules/loading/loading.service.js
@@ -15,9 +15,12 @@
  * limitations under the License.
  */
 
-export default ['IgniteLoading', [function() {
+export default function() {
     const _overlays = {};
 
+    /**
+     * @param {string} key
+     */
     const start = (key) => {
         setTimeout(() => {
             const loadingOverlay = _overlays[key];
@@ -26,6 +29,9 @@ export default ['IgniteLoading', [function() {
         });
     };
 
+    /**
+     * @param {string} key
+     */
     const finish = (key) => {
         setTimeout(() => {
             const loadingOverlay = _overlays[key];
@@ -45,4 +51,4 @@ export default ['IgniteLoading', [function() {
         start,
         finish
     };
-}]];
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/navbar/Navbar.provider.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/navbar/Navbar.provider.js b/modules/web-console/frontend/app/modules/navbar/Navbar.provider.js
index f1ae1b2..9b905d7 100644
--- a/modules/web-console/frontend/app/modules/navbar/Navbar.provider.js
+++ b/modules/web-console/frontend/app/modules/navbar/Navbar.provider.js
@@ -15,14 +15,16 @@
  * limitations under the License.
  */
 
-export default ['IgniteNavbar', [function() {
+export default function() {
     const items = [];
 
     this.push = function(data) {
         items.push(data);
     };
 
-    this.$get = [function() {
+    this.$get = function() {
         return items;
-    }];
-}]];
+    };
+
+    return this;
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/navbar/Userbar.provider.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/navbar/Userbar.provider.js b/modules/web-console/frontend/app/modules/navbar/Userbar.provider.js
index 9513641..9b905d7 100644
--- a/modules/web-console/frontend/app/modules/navbar/Userbar.provider.js
+++ b/modules/web-console/frontend/app/modules/navbar/Userbar.provider.js
@@ -15,14 +15,16 @@
  * limitations under the License.
  */
 
-export default ['IgniteUserbar', [function() {
+export default function() {
     const items = [];
 
     this.push = function(data) {
         items.push(data);
     };
 
-    this.$get = [function() {
+    this.$get = function() {
         return items;
-    }];
-}]];
+    };
+
+    return this;
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/navbar/navbar.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/navbar/navbar.directive.js b/modules/web-console/frontend/app/modules/navbar/navbar.directive.js
index 020cfe4..e400cf7 100644
--- a/modules/web-console/frontend/app/modules/navbar/navbar.directive.js
+++ b/modules/web-console/frontend/app/modules/navbar/navbar.directive.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-export default ['igniteNavbar', ['IgniteNavbar', (IgniteNavbar) => {
+export default function factory(IgniteNavbar) {
     function controller() {
         const ctrl = this;
 
@@ -27,4 +27,6 @@ export default ['igniteNavbar', ['IgniteNavbar', (IgniteNavbar) => {
         controller,
         controllerAs: 'navbar'
     };
-}]];
+}
+
+factory.$inject = ['IgniteNavbar'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/navbar/navbar.module.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/navbar/navbar.module.js b/modules/web-console/frontend/app/modules/navbar/navbar.module.js
index b845cbc..63588c7 100644
--- a/modules/web-console/frontend/app/modules/navbar/navbar.module.js
+++ b/modules/web-console/frontend/app/modules/navbar/navbar.module.js
@@ -27,7 +27,7 @@ angular
 .module('ignite-console.navbar', [
 
 ])
-.provider(...IgniteNavbar)
-.provider(...IgniteUserbar)
-.directive(...igniteNavbar)
-.directive(...igniteUserbar);
+.provider('IgniteNavbar', IgniteNavbar)
+.provider('IgniteUserbar', IgniteUserbar)
+.directive('igniteNavbar', igniteNavbar)
+.directive('igniteUserbar', igniteUserbar);

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/navbar/userbar.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/navbar/userbar.directive.js b/modules/web-console/frontend/app/modules/navbar/userbar.directive.js
index 51f46d4..b636a34 100644
--- a/modules/web-console/frontend/app/modules/navbar/userbar.directive.js
+++ b/modules/web-console/frontend/app/modules/navbar/userbar.directive.js
@@ -15,36 +15,45 @@
  * limitations under the License.
  */
 
-export default ['igniteUserbar', [function() {
-    return {
-        restrict: 'A',
-        controller: ['$rootScope', 'IgniteUserbar', 'AclService', function($root, IgniteUserbar, AclService) {
-            const ctrl = this;
+/**
+ * @param {ng.IRootScopeService} $root
+ * @param {unknown} IgniteUserbar
+ * @param {unknown} AclService
+ */
+function controller($root, IgniteUserbar, AclService) {
+    const ctrl = this;
+
+    this.$onInit = () => {
+        ctrl.items = [
+            {text: 'Profile', sref: 'base.settings.profile'},
+            {text: 'Getting started', click: 'gettingStarted.tryShow(true)'}
+        ];
 
-            this.$onInit = () => {
-                ctrl.items = [
-                    {text: 'Profile', sref: 'base.settings.profile'},
-                    {text: 'Getting started', click: 'gettingStarted.tryShow(true)'}
-                ];
+        const _rebuildSettings = () => {
+            ctrl.items.splice(2);
 
-                const _rebuildSettings = () => {
-                    ctrl.items.splice(2);
+            if (AclService.can('admin_page'))
+                ctrl.items.push({text: 'Admin panel', sref: 'base.settings.admin'});
 
-                    if (AclService.can('admin_page'))
-                        ctrl.items.push({text: 'Admin panel', sref: 'base.settings.admin'});
+            ctrl.items.push(...IgniteUserbar);
 
-                    ctrl.items.push(...IgniteUserbar);
+            if (AclService.can('logout'))
+                ctrl.items.push({text: 'Log out', sref: 'logout'});
+        };
 
-                    if (AclService.can('logout'))
-                        ctrl.items.push({text: 'Log out', sref: 'logout'});
-                };
+        if ($root.user)
+            _rebuildSettings(null, $root.user);
 
-                if ($root.user)
-                    _rebuildSettings(null, $root.user);
+        $root.$on('user', _rebuildSettings);
+    };
+}
+
+controller.$inject = ['$rootScope', 'IgniteUserbar', 'AclService'];
 
-                $root.$on('user', _rebuildSettings);
-            };
-        }],
+export default function() {
+    return {
+        restrict: 'A',
+        controller,
         controllerAs: 'userbar'
     };
-}]];
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/nodes/Nodes.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/nodes/Nodes.service.js b/modules/web-console/frontend/app/modules/nodes/Nodes.service.js
index e231753..9130fc6 100644
--- a/modules/web-console/frontend/app/modules/nodes/Nodes.service.js
+++ b/modules/web-console/frontend/app/modules/nodes/Nodes.service.js
@@ -27,8 +27,8 @@ class Nodes {
     static $inject = ['$q', '$modal'];
 
     /**
-     * @param $q
-     * @param $modal
+     * @param {ng.IQService} $q
+     * @param {mgcrea.ngStrap.modal.IModalService} $modal
      */
     constructor($q, $modal) {
         this.$q = $q;

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/nodes/nodes-dialog.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/nodes/nodes-dialog.controller.js b/modules/web-console/frontend/app/modules/nodes/nodes-dialog.controller.js
index 2296aed..a0cf80a 100644
--- a/modules/web-console/frontend/app/modules/nodes/nodes-dialog.controller.js
+++ b/modules/web-console/frontend/app/modules/nodes/nodes-dialog.controller.js
@@ -25,7 +25,7 @@ const COLUMNS_DEFS = [
     {displayName: 'OS information', field: 'os', headerTooltip: 'OS information for node\'s host', minWidth: 125}
 ];
 
-export default ['$scope', '$animate', 'uiGridConstants', 'nodes', 'options', function($scope, $animate, uiGridConstants, nodes, options) {
+export default function controller($scope, $animate, uiGridConstants, nodes, options) {
     const $ctrl = this;
 
     const updateSelected = () => {
@@ -65,4 +65,6 @@ export default ['$scope', '$animate', 'uiGridConstants', 'nodes', 'options', fun
         },
         ...options.grid
     };
-}];
+}
+
+controller.$inject = ['$scope', '$animate', 'uiGridConstants', 'nodes', 'options'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/socket.module.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/socket.module.js b/modules/web-console/frontend/app/modules/socket.module.js
index 3f50295..5a38bdb 100644
--- a/modules/web-console/frontend/app/modules/socket.module.js
+++ b/modules/web-console/frontend/app/modules/socket.module.js
@@ -21,7 +21,7 @@ import io from 'socket.io-client'; // eslint-disable-line no-unused-vars
 angular
 .module('ignite-console.socket', [
 ])
-.provider('igniteSocketFactory', [function() {
+.provider('igniteSocketFactory', function() {
     let _options = {};
 
     /**
@@ -31,11 +31,17 @@ angular
         _options = options;
     };
 
-    this.$get = ['socketFactory', function(socketFactory) {
+    function factory(socketFactory) {
         return function() {
             const ioSocket = io.connect(_options);
 
             return socketFactory({ioSocket});
         };
-    }];
-}]);
+    }
+
+    factory.$inject = ['socketFactory'];
+
+    this.$get = factory;
+
+    return this;
+});

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/states/admin.state.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/admin.state.js b/modules/web-console/frontend/app/modules/states/admin.state.js
index f45421a..68e65cf 100644
--- a/modules/web-console/frontend/app/modules/states/admin.state.js
+++ b/modules/web-console/frontend/app/modules/states/admin.state.js
@@ -21,7 +21,7 @@ angular
 .module('ignite-console.states.admin', [
     'ui.router'
 ])
-.config(['$stateProvider', function($stateProvider) {
+.config(['$stateProvider', /** @param {import('@uirouter/angularjs').StateProvider} $stateProvider */ function($stateProvider) {
     // set up the states
     $stateProvider
     .state('base.settings.admin', {

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/states/errors.state.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/errors.state.js b/modules/web-console/frontend/app/modules/states/errors.state.js
index fcc6a5b..19a1947 100644
--- a/modules/web-console/frontend/app/modules/states/errors.state.js
+++ b/modules/web-console/frontend/app/modules/states/errors.state.js
@@ -23,7 +23,7 @@ angular
     .module('ignite-console.states.errors', [
         'ui.router'
     ])
-    .config(['$stateProvider', function($stateProvider) {
+    .config(['$stateProvider', /** @param {import('@uirouter/angularjs').StateProvider} $stateProvider */ function($stateProvider) {
         // set up the states
         $stateProvider
             .state('404', {

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/states/logout.state.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/logout.state.js b/modules/web-console/frontend/app/modules/states/logout.state.js
index a46f871..9adc81b 100644
--- a/modules/web-console/frontend/app/modules/states/logout.state.js
+++ b/modules/web-console/frontend/app/modules/states/logout.state.js
@@ -20,7 +20,7 @@ import angular from 'angular';
 angular.module('ignite-console.states.logout', [
     'ui.router'
 ])
-.config(['$stateProvider', function($stateProvider) {
+.config(['$stateProvider', /** @param {import('@uirouter/angularjs').StateProvider} $stateProvider */ function($stateProvider) {
     // set up the states
     $stateProvider.state('logout', {
         url: '/logout',

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/states/settings.state.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/settings.state.js b/modules/web-console/frontend/app/modules/states/settings.state.js
index 1651376..e967bad 100644
--- a/modules/web-console/frontend/app/modules/states/settings.state.js
+++ b/modules/web-console/frontend/app/modules/states/settings.state.js
@@ -22,7 +22,7 @@ angular
     .module('ignite-console.states.settings', [
         'ui.router'
     ])
-    .config(['$stateProvider', function($stateProvider) {
+    .config(['$stateProvider', /** @param {import('@uirouter/angularjs').StateProvider} $stateProvider */ function($stateProvider) {
         // Set up the states.
         $stateProvider
             .state('base.settings', {

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/user/Auth.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/user/Auth.service.js b/modules/web-console/frontend/app/modules/user/Auth.service.js
index 744943a..8c3cc4e 100644
--- a/modules/web-console/frontend/app/modules/user/Auth.service.js
+++ b/modules/web-console/frontend/app/modules/user/Auth.service.js
@@ -30,7 +30,11 @@ export default class AuthService {
     /**
      * @param {ng.IHttpService} $http
      * @param {ng.IRootScopeService} $root
+     * @param {import('@uirouter/angularjs').StateService} $state
      * @param {ng.IWindowService} $window
+     * @param {ReturnType<typeof import('app/services/Messages.service').default>} Messages
+     * @param {ReturnType<typeof import('app/modules/getting-started/GettingStarted.provider').service>} gettingStarted
+     * @param {ReturnType<typeof import('./User.service').default>} User
      */
     constructor($http, $root, $state, $window, Messages, gettingStarted, User) {
         this.$http = $http;

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/user/User.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/user/User.service.js b/modules/web-console/frontend/app/modules/user/User.service.js
index 8b9a1e7..3fdb9b9 100644
--- a/modules/web-console/frontend/app/modules/user/User.service.js
+++ b/modules/web-console/frontend/app/modules/user/User.service.js
@@ -15,10 +15,35 @@
  * limitations under the License.
  */
 
-export default ['User', ['$q', '$injector', '$rootScope', '$state', '$http', function($q, $injector, $root, $state, $http) {
+/**
+ * @typedef User
+ * @prop {string} _id
+ * @prop {boolean} admin
+ * @prop {string} country
+ * @prop {string} email
+ * @prop {string} firstName
+ * @prop {string} lastName
+ * @prop {string} lastActivity
+ * @prop {string} lastLogin
+ * @prop {string} registered
+ * @prop {string} token
+ */
+
+/**
+ * @param {ng.IQService} $q
+ * @param {ng.auto.IInjectorService} $injector
+ * @param {ng.IRootScopeService} $root
+ * @param {import('@uirouter/angularjs').StateService} $state
+ * @param {ng.IHttpService} $http
+ */
+export default function User($q, $injector, $root, $state, $http) {
+    /** @type {ng.IPromise<User>} */
     let user;
 
     return {
+        /**
+         * @returns {ng.IPromise<User>}
+         */
         load() {
             return user = $http.post('/api/v1/user')
                 .then(({data}) => {
@@ -48,4 +73,6 @@ export default ['User', ['$q', '$injector', '$rootScope', '$state', '$http', fun
             sessionStorage.removeItem('IgniteDemoMode');
         }
     };
-}]];
+}
+
+User.$inject = ['$q', '$injector', '$rootScope', '$state', '$http'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/user/user.module.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/user/user.module.js b/modules/web-console/frontend/app/modules/user/user.module.js
index 24dfc8f..9591a98 100644
--- a/modules/web-console/frontend/app/modules/user/user.module.js
+++ b/modules/web-console/frontend/app/modules/user/user.module.js
@@ -21,12 +21,12 @@ import aclData from './permissions';
 import Auth from './Auth.service';
 import User from './User.service';
 
-angular.module('ignite-console.user', [
-    'mm.acl',
-    'ignite-console.config',
-    'ignite-console.core'
-])
-.factory('sessionRecoverer', ['$injector', '$q', function($injector, $q) {
+/**
+ * @param {ng.auto.IInjectorService} $injector
+ * @param {ng.IQService} $q
+ */
+function sessionRecoverer($injector, $q) {
+    /** @type {ng.IHttpInterceptor} */
     return {
         responseError: (response) => {
             // Session has expired
@@ -42,13 +42,18 @@ angular.module('ignite-console.user', [
             return $q.reject(response);
         }
     };
-}])
-.config(['$httpProvider', ($httpProvider) => {
-    $httpProvider.interceptors.push('sessionRecoverer');
-}])
-.service('Auth', Auth)
-.service(...User)
-.run(['$rootScope', '$transitions', 'AclService', 'User', 'IgniteActivitiesData', ($root, $transitions, AclService, User, Activities) => {
+}
+
+sessionRecoverer.$inject = ['$injector', '$q'];
+
+/**
+ * @param {ng.IRootScopeService} $root
+ * @param {import('@uirouter/angularjs').TransitionService} $transitions
+ * @param {unknown} AclService
+ * @param {ReturnType<typeof import('./User.service').default>} User
+ * @param {ReturnType<typeof import('app/components/activities-user-dialog/index').default>} Activities
+ */
+function run($root, $transitions, AclService, User, Activities) {
     AclService.setAbilities(aclData);
     AclService.attachRole('guest');
 
@@ -90,4 +95,19 @@ angular.module('ignite-console.user', [
                 return $state.target(trans.to().failState || '403');
             });
     });
-}]);
+}
+
+run.$inject = ['$rootScope', '$transitions', 'AclService', 'User', 'IgniteActivitiesData'];
+
+angular.module('ignite-console.user', [
+    'mm.acl',
+    'ignite-console.config',
+    'ignite-console.core'
+])
+.factory('sessionRecoverer', sessionRecoverer)
+.config(['$httpProvider', ($httpProvider) => {
+    $httpProvider.interceptors.push('sessionRecoverer');
+}])
+.service('Auth', Auth)
+.service('User', User)
+.run(run);

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/services/ChartColors.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/ChartColors.service.js b/modules/web-console/frontend/app/services/ChartColors.service.js
index 843aa5c..061ff3f 100644
--- a/modules/web-console/frontend/app/services/ChartColors.service.js
+++ b/modules/web-console/frontend/app/services/ChartColors.service.js
@@ -17,6 +17,6 @@
 
 import COLORS from 'app/data/colors.json';
 
-export default ['IgniteChartColors', function() {
+export default function() {
     return COLORS;
-}];
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/services/Confirm.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/Confirm.service.js b/modules/web-console/frontend/app/services/Confirm.service.js
index 8c88a40..953bdcd 100644
--- a/modules/web-console/frontend/app/services/Confirm.service.js
+++ b/modules/web-console/frontend/app/services/Confirm.service.js
@@ -56,8 +56,15 @@ export class Confirm {
     }
 }
 
-// Confirm popup service.
-export default ['IgniteConfirm', ['$rootScope', '$q', '$modal', '$animate', function($root, $q, $modal, $animate) {
+/**
+ * Confirm popup service.
+ * @deprecated Use Confirm instead
+ * @param {ng.IRootScopeService} $root
+ * @param {ng.IQService} $q
+ * @param {mgcrea.ngStrap.modal.IModalService} $modal
+ * @param {ng.animate.IAnimateService} $animate
+ */
+export default function IgniteConfirm($root, $q, $modal, $animate) {
     const scope = $root.$new();
 
     const modal = $modal({templateUrl, scope, show: false, backdrop: true});
@@ -106,4 +113,6 @@ export default ['IgniteConfirm', ['$rootScope', '$q', '$modal', '$animate', func
     };
 
     return modal;
-}]];
+}
+
+IgniteConfirm.$inject = ['$rootScope', '$q', '$modal', '$animate'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/services/CopyToClipboard.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/CopyToClipboard.service.js b/modules/web-console/frontend/app/services/CopyToClipboard.service.js
index 52285a6..f3c6309 100644
--- a/modules/web-console/frontend/app/services/CopyToClipboard.service.js
+++ b/modules/web-console/frontend/app/services/CopyToClipboard.service.js
@@ -15,10 +15,17 @@
  * limitations under the License.
  */
 
-// Service to copy some value to OS clipboard.
-export default ['IgniteCopyToClipboard', ['$window', 'IgniteMessages', function($window, Messages) {
+import angular from 'angular';
+
+/**
+ * Service to copy some value to OS clipboard.
+ * @param {ng.IWindowService} $window
+ * @param {ReturnType<typeof import('./Messages.service').default>} Messages
+ */
+export default function factory($window, Messages) {
     const body = angular.element($window.document.body);
 
+    /** @type {JQuery<HTMLTextAreaElement>} */
     const textArea = angular.element('<textarea/>');
 
     textArea.css({
@@ -27,6 +34,9 @@ export default ['IgniteCopyToClipboard', ['$window', 'IgniteMessages', function(
     });
 
     return {
+        /**
+         * @param {string} toCopy
+         */
         copy(toCopy) {
             textArea.val(toCopy);
 
@@ -47,4 +57,6 @@ export default ['IgniteCopyToClipboard', ['$window', 'IgniteMessages', function(
             textArea.remove();
         }
     };
-}]];
+}
+
+factory.$inject = ['$window', 'IgniteMessages'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/services/Countries.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/Countries.service.js b/modules/web-console/frontend/app/services/Countries.service.js
index 575951e..2de6716 100644
--- a/modules/web-console/frontend/app/services/Countries.service.js
+++ b/modules/web-console/frontend/app/services/Countries.service.js
@@ -15,17 +15,29 @@
  * limitations under the License.
  */
 
+import _ from 'lodash';
 import COUNTRIES from 'app/data/countries.json';
 
-export default ['IgniteCountries', function() {
+/**
+ * @typedef {{label:string,value:string,code:string}} Country
+ */
+
+export default function() {
     const indexByName = _.keyBy(COUNTRIES, 'label');
     const UNDEFINED_COUNTRY = {label: '', value: '', code: ''};
 
+    /**
+     * @param {string} name
+     * @return {Country}
+     */
     const getByName = (name) => (indexByName[name] || UNDEFINED_COUNTRY);
+    /**
+     * @returns {Array<Country>}
+     */
     const getAll = () => (COUNTRIES);
 
     return {
         getByName,
         getAll
     };
-}];
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/services/DefaultState.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/DefaultState.js b/modules/web-console/frontend/app/services/DefaultState.js
index db7b3e3..b46bfec 100644
--- a/modules/web-console/frontend/app/services/DefaultState.js
+++ b/modules/web-console/frontend/app/services/DefaultState.js
@@ -15,6 +15,9 @@
  * limitations under the License.
  */
 
+/**
+ * @param {import('@uirouter/angularjs').StateProvider} $stateProvider
+ */
 function DefaultState($stateProvider) {
     const stateName = 'default-state';
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/services/ErrorParser.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/ErrorParser.service.js b/modules/web-console/frontend/app/services/ErrorParser.service.js
index 9cda8ed..88642b9 100644
--- a/modules/web-console/frontend/app/services/ErrorParser.service.js
+++ b/modules/web-console/frontend/app/services/ErrorParser.service.js
@@ -22,7 +22,7 @@ export default class {
     static $inject = ['JavaTypes'];
 
     /**
-     * @param JavaTypes service.
+     * @param {import('./JavaTypes.service').default} JavaTypes
      */
     constructor(JavaTypes) {
         this.JavaTypes = JavaTypes;

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/services/ErrorPopover.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/ErrorPopover.service.js b/modules/web-console/frontend/app/services/ErrorPopover.service.js
index bddf436..3b02a7e 100644
--- a/modules/web-console/frontend/app/services/ErrorPopover.service.js
+++ b/modules/web-console/frontend/app/services/ErrorPopover.service.js
@@ -22,10 +22,10 @@ export default class ErrorPopover {
     static $inject = ['$popover', '$anchorScroll', '$timeout', 'IgniteFormUtils'];
 
     /**
-     * @param $popover
-     * @param $anchorScroll
-     * @param $timeout
-     * @param FormUtils
+     * @param {mgcrea.ngStrap.popover.IPopoverService} $popover
+     * @param {ng.IAnchorScrollService} $anchorScroll
+     * @param {ng.ITimeoutService} $timeout
+     * @param {ReturnType<typeof import('app/services/FormUtils.service').default>} FormUtils
      */
     constructor($popover, $anchorScroll, $timeout, FormUtils) {
         this.$popover = $popover;
@@ -41,7 +41,7 @@ export default class ErrorPopover {
     /**
      * Check that element is document area.
      *
-     * @param el Element to check.
+     * @param {HTMLElement} el Element to check.
      * @returns {boolean} True when element in document area.
      */
     static _isElementInViewport(el) {
@@ -58,8 +58,8 @@ export default class ErrorPopover {
     /**
      * Internal show popover message with detected properties.
      *
-     * @param id Id element to show popover message.
-     * @param message Message to show.
+     * @param {string }id Id element to show popover message.
+     * @param {string} message Message to show.
      * @param showTime Time before popover will be hidden.
      */
     _show(id, message, showTime = 5000) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/services/Focus.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/Focus.service.js b/modules/web-console/frontend/app/services/Focus.service.js
index a285fbc..a152ff1 100644
--- a/modules/web-console/frontend/app/services/Focus.service.js
+++ b/modules/web-console/frontend/app/services/Focus.service.js
@@ -15,9 +15,15 @@
  * limitations under the License.
  */
 
-// Service to transfer focus for specified element.
-export default ['IgniteFocus', ['$timeout', function($timeout) {
+/**
+ * Service to transfer focus for specified element.
+ * @param {ng.ITimeoutService} $timeout
+ */
+export default function factory($timeout) {
     return {
+        /**
+         * @param {string} id Element id
+         */
         move(id) {
             // Timeout makes sure that is invoked after any other event has been triggered.
             // E.g. click events that need to run before the focus or inputs elements that are
@@ -30,4 +36,6 @@ export default ['IgniteFocus', ['$timeout', function($timeout) {
             }, 100);
         }
     };
-}]];
+}
+
+factory.$inject = ['$timeout'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/services/FormUtils.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/FormUtils.service.js b/modules/web-console/frontend/app/services/FormUtils.service.js
index cda68f7..c8ce4b0 100644
--- a/modules/web-console/frontend/app/services/FormUtils.service.js
+++ b/modules/web-console/frontend/app/services/FormUtils.service.js
@@ -16,7 +16,12 @@
  */
 import _ from 'lodash';
 
-export default ['IgniteFormUtils', ['$window', 'IgniteFocus', '$rootScope', function($window, Focus, $rootScope) {
+/**
+ * @param {ng.IWindowService} $window
+ * @param {ReturnType<typeof import('./Focus.service').default>} Focus
+ * @param {ng.IRootScopeService} $rootScope
+ */
+export default function service($window, Focus, $rootScope) {
     function ensureActivePanel(ui, pnl, focusId) {
         if (ui && ui.loadPanel) {
             const collapses = $('[bs-collapse-target]');
@@ -55,12 +60,13 @@ export default ['IgniteFormUtils', ['$window', 'IgniteFocus', '$rootScope', func
         }
     }
 
+    /** @type {CanvasRenderingContext2D} */
     let context = null;
 
     /**
      * Calculate width of specified text in body's font.
      *
-     * @param text Text to calculate width.
+     * @param {string} text Text to calculate width.
      * @returns {Number} Width of text in pixels.
      */
     function measureText(text) {
@@ -453,4 +459,6 @@ export default ['IgniteFormUtils', ['$window', 'IgniteFocus', '$rootScope', func
         },
         triggerValidation
     };
-}]];
+}
+
+service.$inject = ['$window', 'IgniteFocus', '$rootScope'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/services/IGFSs.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/IGFSs.js b/modules/web-console/frontend/app/services/IGFSs.js
index de9e43d..c9bde77 100644
--- a/modules/web-console/frontend/app/services/IGFSs.js
+++ b/modules/web-console/frontend/app/services/IGFSs.js
@@ -29,10 +29,16 @@ export default class IGFSs {
         {value: 'DUAL_ASYNC', label: 'DUAL_ASYNC'}
     ];
 
+    /**
+     * @param {ng.IHttpService} $http
+     */
     constructor($http) {
-        Object.assign(this, {$http});
+        this.$http = $http;
     }
 
+    /**
+     * @param {string} igfsID
+     */
     getIGFS(igfsID) {
         return this.$http.get(`/api/v1/configuration/igfs/${igfsID}`);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/services/InetAddress.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/InetAddress.service.js b/modules/web-console/frontend/app/services/InetAddress.service.js
index abdd8a3..1f50bdf 100644
--- a/modules/web-console/frontend/app/services/InetAddress.service.js
+++ b/modules/web-console/frontend/app/services/InetAddress.service.js
@@ -15,7 +15,9 @@
  * limitations under the License.
  */
 
-export default ['IgniteInetAddress', function() {
+import _ from 'lodash';
+
+export default function() {
     return {
         /**
          * @param {String} ip IP address to check.
@@ -36,18 +38,18 @@ export default ['IgniteInetAddress', function() {
             return regexp.test(hostNameOrIp) || this.validIp(hostNameOrIp);
         },
         /**
-         * @param {int} port Port value to check.
+         * @param {number} port Port value to check.
          * @returns boolean 'true' if given port is valid tcp/udp port range.
          */
         validPort(port) {
             return _.isInteger(port) && port > 0 && port <= 65535;
         },
         /**
-         * @param {int} port Port value to check.
+         * @param {number} port Port value to check.
          * @returns {boolean} 'true' if given port in non system port range(user+dynamic).
          */
         validNonSystemPort(port) {
             return _.isInteger(port) && port >= 1024 && port <= 65535;
         }
     };
-}];
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/services/LegacyTable.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/LegacyTable.service.js b/modules/web-console/frontend/app/services/LegacyTable.service.js
index 2d795ce..3086f4f 100644
--- a/modules/web-console/frontend/app/services/LegacyTable.service.js
+++ b/modules/web-console/frontend/app/services/LegacyTable.service.js
@@ -16,214 +16,220 @@
  */
 
 // TODO: Refactor this service for legacy tables with more than one input field.
-export default ['IgniteLegacyTable',
-    ['IgniteLegacyUtils', 'IgniteFocus', 'IgniteErrorPopover', function(LegacyUtils, Focus, ErrorPopover) {
-        function _model(item, field) {
-            let path = field.path;
-
-            if (_.isNil(path) || _.isNil(item))
-                return item;
+/**
+ * @param {ReturnType<typeof import('./LegacyUtils.service').default>} LegacyUtils
+ * @param {ReturnType<typeof import('./Focus.service').default>} Focus
+ * @param {import('./ErrorPopover.service').default} ErrorPopover
+ */
+export default function service(LegacyUtils, Focus, ErrorPopover) {
+    function _model(item, field) {
+        let path = field.path;
 
-            path = path.replace(/\[(\w+)\]/g, '.$1'); // convert indexes to properties
-            path = path.replace(/^\./, ''); // strip a leading dot
+        if (_.isNil(path) || _.isNil(item))
+            return item;
 
-            const segs = path.split('.');
-            let root = item;
+        path = path.replace(/\[(\w+)\]/g, '.$1'); // convert indexes to properties
+        path = path.replace(/^\./, ''); // strip a leading dot
 
-            while (segs.length > 0) {
-                const pathStep = segs.shift();
+        const segs = path.split('.');
+        let root = item;
 
-                if (typeof root[pathStep] === 'undefined')
-                    root[pathStep] = {};
+        while (segs.length > 0) {
+            const pathStep = segs.shift();
 
-                root = root[pathStep];
-            }
+            if (typeof root[pathStep] === 'undefined')
+                root[pathStep] = {};
 
-            return root;
+            root = root[pathStep];
         }
 
-        const table = {name: 'none', editIndex: -1};
+        return root;
+    }
 
-        function _tableReset() {
-            delete table.field;
-            table.name = 'none';
-            table.editIndex = -1;
+    const table = {name: 'none', editIndex: -1};
 
-            ErrorPopover.hide();
-        }
+    function _tableReset() {
+        delete table.field;
+        table.name = 'none';
+        table.editIndex = -1;
 
-        function _tableSaveAndReset() {
-            const field = table.field;
+        ErrorPopover.hide();
+    }
 
-            const save = LegacyUtils.isDefined(field) && LegacyUtils.isDefined(field.save);
+    function _tableSaveAndReset() {
+        const field = table.field;
 
-            if (!save || !LegacyUtils.isDefined(field) || field.save(field, table.editIndex, true)) {
-                _tableReset();
+        const save = LegacyUtils.isDefined(field) && LegacyUtils.isDefined(field.save);
 
-                return true;
-            }
+        if (!save || !LegacyUtils.isDefined(field) || field.save(field, table.editIndex, true)) {
+            _tableReset();
 
-            return false;
+            return true;
         }
 
-        function _tableState(field, editIndex, specName) {
-            table.field = field;
-            table.name = specName || field.model;
-            table.editIndex = editIndex;
-        }
+        return false;
+    }
 
-        function _tableUI(tbl) {
-            const ui = tbl.ui;
+    function _tableState(field, editIndex, specName) {
+        table.field = field;
+        table.name = specName || field.model;
+        table.editIndex = editIndex;
+    }
 
-            return ui ? ui : tbl.type;
-        }
+    function _tableUI(tbl) {
+        const ui = tbl.ui;
 
-        function _tableFocus(focusId, index) {
-            Focus.move((index < 0 ? 'new' : 'cur') + focusId + (index >= 0 ? index : ''));
-        }
+        return ui ? ui : tbl.type;
+    }
 
-        function _tablePairValue(filed, index) {
-            return index < 0 ? {key: filed.newKey, value: filed.newValue} : {
-                key: filed.curKey,
-                value: filed.curValue
-            };
-        }
+    function _tableFocus(focusId, index) {
+        Focus.move((index < 0 ? 'new' : 'cur') + focusId + (index >= 0 ? index : ''));
+    }
 
-        function _tableStartEdit(item, tbl, index, save) {
-            _tableState(tbl, index);
+    function _tablePairValue(filed, index) {
+        return index < 0 ? {key: filed.newKey, value: filed.newValue} : {
+            key: filed.curKey,
+            value: filed.curValue
+        };
+    }
 
-            const val = _.get(_model(item, tbl), tbl.model)[index];
+    function _tableStartEdit(item, tbl, index, save) {
+        _tableState(tbl, index);
 
-            const ui = _tableUI(tbl);
+        const val = _.get(_model(item, tbl), tbl.model)[index];
 
-            tbl.save = save;
+        const ui = _tableUI(tbl);
 
-            if (ui === 'table-pair') {
-                tbl.curKey = val[tbl.keyName];
-                tbl.curValue = val[tbl.valueName];
+        tbl.save = save;
 
-                _tableFocus('Key' + tbl.focusId, index);
-            }
-            else if (ui === 'table-db-fields') {
-                tbl.curDatabaseFieldName = val.databaseFieldName;
-                tbl.curDatabaseFieldType = val.databaseFieldType;
-                tbl.curJavaFieldName = val.javaFieldName;
-                tbl.curJavaFieldType = val.javaFieldType;
+        if (ui === 'table-pair') {
+            tbl.curKey = val[tbl.keyName];
+            tbl.curValue = val[tbl.valueName];
 
-                _tableFocus('DatabaseFieldName' + tbl.focusId, index);
-            }
-            else if (ui === 'table-indexes') {
-                tbl.curIndexName = val.name;
-                tbl.curIndexType = val.indexType;
-                tbl.curIndexFields = val.fields;
+            _tableFocus('Key' + tbl.focusId, index);
+        }
+        else if (ui === 'table-db-fields') {
+            tbl.curDatabaseFieldName = val.databaseFieldName;
+            tbl.curDatabaseFieldType = val.databaseFieldType;
+            tbl.curJavaFieldName = val.javaFieldName;
+            tbl.curJavaFieldType = val.javaFieldType;
 
-                _tableFocus(tbl.focusId, index);
-            }
+            _tableFocus('DatabaseFieldName' + tbl.focusId, index);
         }
+        else if (ui === 'table-indexes') {
+            tbl.curIndexName = val.name;
+            tbl.curIndexType = val.indexType;
+            tbl.curIndexFields = val.fields;
 
-        function _tableNewItem(tbl) {
-            _tableState(tbl, -1);
+            _tableFocus(tbl.focusId, index);
+        }
+    }
 
-            const ui = _tableUI(tbl);
+    function _tableNewItem(tbl) {
+        _tableState(tbl, -1);
 
-            if (ui === 'table-pair') {
-                tbl.newKey = null;
-                tbl.newValue = null;
+        const ui = _tableUI(tbl);
 
-                _tableFocus('Key' + tbl.focusId, -1);
-            }
-            else if (ui === 'table-db-fields') {
-                tbl.newDatabaseFieldName = null;
-                tbl.newDatabaseFieldType = null;
-                tbl.newJavaFieldName = null;
-                tbl.newJavaFieldType = null;
+        if (ui === 'table-pair') {
+            tbl.newKey = null;
+            tbl.newValue = null;
 
-                _tableFocus('DatabaseFieldName' + tbl.focusId, -1);
-            }
-            else if (ui === 'table-indexes') {
-                tbl.newIndexName = null;
-                tbl.newIndexType = 'SORTED';
-                tbl.newIndexFields = null;
+            _tableFocus('Key' + tbl.focusId, -1);
+        }
+        else if (ui === 'table-db-fields') {
+            tbl.newDatabaseFieldName = null;
+            tbl.newDatabaseFieldType = null;
+            tbl.newJavaFieldName = null;
+            tbl.newJavaFieldType = null;
 
-                _tableFocus(tbl.focusId, -1);
-            }
+            _tableFocus('DatabaseFieldName' + tbl.focusId, -1);
         }
+        else if (ui === 'table-indexes') {
+            tbl.newIndexName = null;
+            tbl.newIndexType = 'SORTED';
+            tbl.newIndexFields = null;
 
-        return {
-            tableState: _tableState,
-            tableReset: _tableReset,
-            tableSaveAndReset: _tableSaveAndReset,
-            tableNewItem: _tableNewItem,
-            tableNewItemActive(tbl) {
-                return table.name === tbl.model && table.editIndex < 0;
-            },
-            tableEditing(tbl, index) {
-                return table.name === tbl.model && table.editIndex === index;
-            },
-            tableEditedRowIndex() {
-                return table.editIndex;
-            },
-            tableField() {
-                return table.field;
-            },
-            tableStartEdit: _tableStartEdit,
-            tableRemove(item, field, index) {
-                _tableReset();
-
-                _.get(_model(item, field), field.model).splice(index, 1);
-            },
-            tablePairValue: _tablePairValue,
-            tablePairSave(pairValid, item, field, index, stopEdit) {
-                const valid = pairValid(item, field, index, stopEdit);
-
-                if (valid) {
-                    const pairValue = _tablePairValue(field, index);
-
-                    let pairModel = {};
-
-                    const container = _.get(item, field.model);
-
-                    if (index < 0) {
-                        pairModel[field.keyName] = pairValue.key;
-                        pairModel[field.valueName] = pairValue.value;
-
-                        if (container)
-                            container.push(pairModel);
-                        else
-                            _.set(item, field.model, [pairModel]);
+            _tableFocus(tbl.focusId, -1);
+        }
+    }
+
+    return {
+        tableState: _tableState,
+        tableReset: _tableReset,
+        tableSaveAndReset: _tableSaveAndReset,
+        tableNewItem: _tableNewItem,
+        tableNewItemActive(tbl) {
+            return table.name === tbl.model && table.editIndex < 0;
+        },
+        tableEditing(tbl, index) {
+            return table.name === tbl.model && table.editIndex === index;
+        },
+        tableEditedRowIndex() {
+            return table.editIndex;
+        },
+        tableField() {
+            return table.field;
+        },
+        tableStartEdit: _tableStartEdit,
+        tableRemove(item, field, index) {
+            _tableReset();
+
+            _.get(_model(item, field), field.model).splice(index, 1);
+        },
+        tablePairValue: _tablePairValue,
+        tablePairSave(pairValid, item, field, index, stopEdit) {
+            const valid = pairValid(item, field, index, stopEdit);
+
+            if (valid) {
+                const pairValue = _tablePairValue(field, index);
+
+                let pairModel = {};
+
+                const container = _.get(item, field.model);
+
+                if (index < 0) {
+                    pairModel[field.keyName] = pairValue.key;
+                    pairModel[field.valueName] = pairValue.value;
+
+                    if (container)
+                        container.push(pairModel);
+                    else
+                        _.set(item, field.model, [pairModel]);
+
+                    if (!stopEdit)
+                        _tableNewItem(field);
+                }
+                else {
+                    pairModel = container[index];
+
+                    pairModel[field.keyName] = pairValue.key;
+                    pairModel[field.valueName] = pairValue.value;
 
-                        if (!stopEdit)
+                    if (!stopEdit) {
+                        if (index < container.length - 1)
+                            _tableStartEdit(item, field, index + 1);
+                        else
                             _tableNewItem(field);
                     }
-                    else {
-                        pairModel = container[index];
-
-                        pairModel[field.keyName] = pairValue.key;
-                        pairModel[field.valueName] = pairValue.value;
-
-                        if (!stopEdit) {
-                            if (index < container.length - 1)
-                                _tableStartEdit(item, field, index + 1);
-                            else
-                                _tableNewItem(field);
-                        }
-                    }
                 }
+            }
 
-                return valid || stopEdit;
-            },
-            tablePairSaveVisible(field, index) {
-                const pairValue = _tablePairValue(field, index);
+            return valid || stopEdit;
+        },
+        tablePairSaveVisible(field, index) {
+            const pairValue = _tablePairValue(field, index);
 
-                return !LegacyUtils.isEmptyString(pairValue.key) && !LegacyUtils.isEmptyString(pairValue.value);
-            },
-            tableFocusInvalidField(index, id) {
-                _tableFocus(id, index);
+            return !LegacyUtils.isEmptyString(pairValue.key) && !LegacyUtils.isEmptyString(pairValue.value);
+        },
+        tableFocusInvalidField(index, id) {
+            _tableFocus(id, index);
 
-                return false;
-            },
-            tableFieldId(index, id) {
-                return (index < 0 ? 'new' : 'cur') + id + (index >= 0 ? index : '');
-            }
-        };
-    }]];
+            return false;
+        },
+        tableFieldId(index, id) {
+            return (index < 0 ? 'new' : 'cur') + id + (index >= 0 ? index : '');
+        }
+    };
+}
+
+service.$inject = ['IgniteLegacyUtils', 'IgniteFocus', 'IgniteErrorPopover'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/services/LegacyUtils.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/LegacyUtils.service.js b/modules/web-console/frontend/app/services/LegacyUtils.service.js
index 1aea642..8362669 100644
--- a/modules/web-console/frontend/app/services/LegacyUtils.service.js
+++ b/modules/web-console/frontend/app/services/LegacyUtils.service.js
@@ -16,9 +16,13 @@
  */
 
 import saver from 'file-saver';
+import _ from 'lodash';
 
 // TODO: Refactor this service for legacy tables with more than one input field.
-export default ['IgniteLegacyUtils', ['IgniteErrorPopover', function(ErrorPopover) {
+/**
+ * @param {import('./ErrorPopover.service').default} ErrorPopover
+ */
+export default function service(ErrorPopover) {
     function isDefined(v) {
         return !_.isNil(v);
     }
@@ -547,4 +551,6 @@ export default ['IgniteLegacyUtils', ['IgniteErrorPopover', function(ErrorPopove
             return true;
         }
     };
-}]];
+}
+
+service.$inject = ['IgniteErrorPopover'];


[3/3] ignite git commit: IGNITE-9569 Web console: Refactored DI to use $inject instead of arrays.

Posted by ak...@apache.org.
IGNITE-9569 Web console: Refactored DI to use $inject instead of arrays.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/6e6e8bff
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6e6e8bff
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6e6e8bff

Branch: refs/heads/master
Commit: 6e6e8bfffa4893206fa26ee918a32166ce8e994b
Parents: 813f097
Author: Ilya Borisov <kl...@gmail.com>
Authored: Thu Sep 27 11:09:58 2018 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Thu Sep 27 11:10:34 2018 +0700

----------------------------------------------------------------------
 modules/web-console/frontend/app/app.js         | 165 +++++----
 .../components/activities-user-dialog/index.js  |   9 +-
 .../connected-clusters-badge/controller.js      |   7 +-
 .../components/cell-logout/index.js             |   7 +-
 .../components/list/controller.js               |   1 +
 .../app/components/ignite-chart/controller.js   |   2 +-
 .../app/components/ignite-icon/directive.js     |  19 +-
 .../app/components/ignite-icon/service.js       |  17 +
 .../input-dialog/input-dialog.controller.js     |   2 +
 .../input-dialog/input-dialog.service.js        |   9 +-
 .../page-password-reset/controller.js           |   6 +-
 .../app/components/page-profile/controller.js   |  21 +-
 .../app/components/page-queries/component.js    |  11 +-
 .../components/page-queries/notebook.data.js    |   5 +
 .../components/page-queries/notebook.service.js |   8 +-
 .../app/components/page-signin/controller.js    |   2 +
 .../app/components/page-signup/controller.js    |   3 +
 .../components/user-notifications/service.js    |  11 +-
 .../app/components/version-picker/component.js  |   5 +
 .../frontend/app/core/admin/Admin.data.js       |  21 +-
 .../app/directives/auto-focus.directive.js      |  15 +-
 .../app/directives/bs-affix-update.directive.js |  10 +-
 .../directives/centered/centered.directive.js   |   4 +-
 .../directives/copy-to-clipboard.directive.js   |  15 +-
 .../hide-on-state-change.directive.js           |  15 +-
 .../information/information.directive.js        |   4 +-
 .../app/directives/on-click-focus.directive.js  |  22 +-
 .../directives/on-enter-focus-move.directive.js |  22 +-
 .../app/directives/on-enter.directive.js        |  22 +-
 .../app/directives/on-escape.directive.js       |  22 +-
 .../directives/restore-input-focus.directive.js |  12 +-
 .../directives/retain-selection.directive.js    |  21 +-
 .../ui-ace-docker/ui-ace-docker.controller.js   |   6 +-
 .../ui-ace-docker/ui-ace-docker.directive.js    |   4 +-
 .../ui-ace-pojos/ui-ace-pojos.controller.js     |   7 +-
 .../ui-ace-pojos/ui-ace-pojos.directive.js      |   4 +-
 .../ui-ace-pom/ui-ace-pom.controller.js         |   6 +-
 .../ui-ace-pom/ui-ace-pom.directive.js          |   4 +-
 .../ui-ace-sharp/ui-ace-sharp.controller.js     |  11 +-
 .../ui-ace-sharp/ui-ace-sharp.directive.js      |  18 +-
 .../app/directives/ui-ace-tabs.directive.js     |   4 +-
 .../frontend/app/filters/byName.filter.js       |   6 +-
 .../frontend/app/filters/bytes.filter.js        |   8 +-
 .../frontend/app/filters/default-name.filter.js |  16 +-
 .../app/filters/domainsValidation.filter.js     |  42 ++-
 .../frontend/app/filters/duration.filter.js     |  10 +-
 .../frontend/app/filters/hasPojo.filter.js      |   4 +-
 .../app/filters/uiGridSubcategories.filter.js   |   6 +-
 .../app/modules/agent/AgentManager.service.js   |  21 +-
 .../app/modules/agent/AgentModal.service.js     |  36 +-
 .../agent/components/cluster-login/component.js |   6 +
 .../agent/components/cluster-login/service.js   |   9 +-
 .../app/modules/branding/branding.module.js     |  12 +-
 .../app/modules/branding/branding.service.js    |   3 +
 .../app/modules/branding/features.directive.js  |   9 +-
 .../app/modules/branding/footer.directive.js    |   9 +-
 .../modules/branding/header-logo.directive.js   |   9 +-
 .../modules/branding/header-title.directive.js  |   9 +-
 .../branding/powered-by-apache.directive.js     |   9 +-
 .../app/modules/branding/terms.directive.js     |   9 +-
 .../generator/PlatformGenerator.js              |  11 +-
 .../frontend/app/modules/demo/Demo.module.js    | 161 ++++++---
 .../modules/dialog/dialog-content.directive.js  |   4 +-
 .../modules/dialog/dialog-title.directive.js    |   4 +-
 .../app/modules/dialog/dialog.directive.js      |   4 +-
 .../app/modules/dialog/dialog.factory.js        |   9 +-
 .../app/modules/dialog/dialog.module.js         |   8 +-
 .../field/bs-select-placeholder.directive.js    |  10 +-
 .../form/field/input/autofocus.directive.js     |  16 +-
 .../frontend/app/modules/form/form.module.js    |  24 +-
 .../modules/form/services/FormGUID.service.js   |   4 +-
 .../form/validator/ipaddress.directive.js       |  17 +-
 .../validator/java-built-in-class.directive.js  |  17 +-
 .../form/validator/java-identifier.directive.js |  17 +-
 .../form/validator/java-keywords.directive.js   |  17 +-
 .../validator/java-package-name.directive.js    |  17 +-
 .../java-package-specified.directive.js         |  17 +-
 .../form/validator/property-unique.directive.js |  17 +-
 .../property-value-specified.directive.js       |  12 +-
 .../modules/form/validator/unique.directive.js  |  11 +-
 .../modules/form/validator/uuid.directive.js    |  17 +-
 .../getting-started/GettingStarted.provider.js  | 163 +++++----
 .../app/modules/loading/loading.directive.js    |  10 +-
 .../app/modules/loading/loading.module.js       |   4 +-
 .../app/modules/loading/loading.service.js      |  10 +-
 .../app/modules/navbar/Navbar.provider.js       |  10 +-
 .../app/modules/navbar/Userbar.provider.js      |  10 +-
 .../app/modules/navbar/navbar.directive.js      |   6 +-
 .../app/modules/navbar/navbar.module.js         |   8 +-
 .../app/modules/navbar/userbar.directive.js     |  57 ++--
 .../frontend/app/modules/nodes/Nodes.service.js |   4 +-
 .../modules/nodes/nodes-dialog.controller.js    |   6 +-
 .../frontend/app/modules/socket.module.js       |  14 +-
 .../frontend/app/modules/states/admin.state.js  |   2 +-
 .../frontend/app/modules/states/errors.state.js |   2 +-
 .../frontend/app/modules/states/logout.state.js |   2 +-
 .../app/modules/states/settings.state.js        |   2 +-
 .../frontend/app/modules/user/Auth.service.js   |   4 +
 .../frontend/app/modules/user/User.service.js   |  31 +-
 .../frontend/app/modules/user/user.module.js    |  48 ++-
 .../app/services/ChartColors.service.js         |   4 +-
 .../frontend/app/services/Confirm.service.js    |  15 +-
 .../app/services/CopyToClipboard.service.js     |  18 +-
 .../frontend/app/services/Countries.service.js  |  16 +-
 .../frontend/app/services/DefaultState.js       |   3 +
 .../app/services/ErrorParser.service.js         |   2 +-
 .../app/services/ErrorPopover.service.js        |  14 +-
 .../frontend/app/services/Focus.service.js      |  14 +-
 .../frontend/app/services/FormUtils.service.js  |  14 +-
 .../web-console/frontend/app/services/IGFSs.js  |   8 +-
 .../app/services/InetAddress.service.js         |  10 +-
 .../app/services/LegacyTable.service.js         | 338 ++++++++++---------
 .../app/services/LegacyUtils.service.js         |  10 +-
 .../frontend/app/services/Messages.service.js   |  19 +-
 .../app/services/ModelNormalizer.service.js     |   6 +-
 .../frontend/app/services/SqlTypes.service.js   |   6 +-
 .../frontend/app/services/Version.service.js    |   4 +-
 .../frontend/app/services/exceptionHandler.js   |   3 +
 modules/web-console/frontend/package.json       |   1 +
 119 files changed, 1456 insertions(+), 668 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/app.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/app.js b/modules/web-console/frontend/app/app.js
index 3fb6ae0..ced73a9 100644
--- a/modules/web-console/frontend/app/app.js
+++ b/modules/web-console/frontend/app/app.js
@@ -15,6 +15,8 @@
  * limitations under the License.
  */
 
+import _ from 'lodash';
+
 import './style.scss';
 
 import './vendor';
@@ -262,23 +264,23 @@ export default angular.module('ignite-console', [
 ])
 .service('$exceptionHandler', $exceptionHandler)
 // Directives.
-.directive(...igniteAutoFocus)
-.directive(...igniteBsAffixUpdate)
-.directive(...igniteCentered)
-.directive(...igniteCopyToClipboard)
-.directive(...igniteHideOnStateChange)
-.directive(...igniteInformation)
+.directive('igniteAutoFocus', igniteAutoFocus)
+.directive('igniteBsAffixUpdate', igniteBsAffixUpdate)
+.directive('centered', igniteCentered)
+.directive('igniteCopyToClipboard', igniteCopyToClipboard)
+.directive('hideOnStateChange', igniteHideOnStateChange)
+.directive('igniteInformation', igniteInformation)
 .directive('igniteMatch', igniteMatch)
-.directive(...igniteOnClickFocus)
-.directive(...igniteOnEnter)
-.directive(...igniteOnEnterFocusMove)
-.directive(...igniteOnEscape)
-.directive(...igniteUiAceCSharp)
-.directive(...igniteUiAcePojos)
-.directive(...igniteUiAcePom)
-.directive(...igniteUiAceDocker)
-.directive(...igniteUiAceTabs)
-.directive(...igniteRetainSelection)
+.directive('igniteOnClickFocus', igniteOnClickFocus)
+.directive('igniteOnEnter', igniteOnEnter)
+.directive('igniteOnEnterFocusMove', igniteOnEnterFocusMove)
+.directive('igniteOnEscape', igniteOnEscape)
+.directive('igniteUiAceSharp', igniteUiAceCSharp)
+.directive('igniteUiAcePojos', igniteUiAcePojos)
+.directive('igniteUiAcePom', igniteUiAcePom)
+.directive('igniteUiAceDocker', igniteUiAceDocker)
+.directive('igniteUiAceTabs', igniteUiAceTabs)
+.directive('igniteRetainSelection', igniteRetainSelection)
 .directive('igniteOnFocusOut', igniteOnFocusOut)
 .directive('igniteRestoreInputFocus', igniteRestoreInputFocus)
 .directive('btnIgniteLinkDashedSuccess', btnIgniteLink)
@@ -287,20 +289,20 @@ export default angular.module('ignite-console', [
 .service('IgniteErrorPopover', ErrorPopover)
 .service('JavaTypes', JavaTypes)
 .service('SqlTypes', SqlTypes)
-.service(...ChartColors)
-.service(...IgniteConfirm)
+.service('IgniteChartColors', ChartColors)
+.service('IgniteConfirm', IgniteConfirm)
 .service('Confirm', Confirm)
 .service('IgniteConfirmBatch', ConfirmBatch)
-.service(...CopyToClipboard)
-.service(...Countries)
-.service(...Focus)
-.service(...InetAddress)
-.service(...Messages)
+.service('IgniteCopyToClipboard', CopyToClipboard)
+.service('IgniteCountries', Countries)
+.service('IgniteFocus', Focus)
+.service('IgniteInetAddress', InetAddress)
+.service('IgniteMessages', Messages)
 .service('IgniteErrorParser', ErrorParser)
-.service(...ModelNormalizer)
-.service(...LegacyTable)
-.service(...FormUtils)
-.service(...LegacyUtils)
+.service('IgniteModelNormalizer', ModelNormalizer)
+.service('IgniteLegacyTable', LegacyTable)
+.service('IgniteFormUtils', FormUtils)
+.service('IgniteLegacyUtils', LegacyUtils)
 .service('IgniteActivitiesUserDialog', IgniteActivitiesUserDialog)
 .service('Caches', Caches)
 .service('CSV', CSV)
@@ -315,55 +317,85 @@ export default angular.module('ignite-console', [
 .filter('hasPojo', hasPojo)
 .filter('uiGridSubcategories', uiGridSubcategories)
 .filter('id8', id8)
-.config(['$translateProvider', '$stateProvider', '$locationProvider', '$urlRouterProvider', ($translateProvider, $stateProvider, $locationProvider, $urlRouterProvider) => {
-    $translateProvider.translations('en', i18n);
-    $translateProvider.preferredLanguage('en');
+.config(['$translateProvider', '$stateProvider', '$locationProvider', '$urlRouterProvider',
+    /**
+     * @param {angular.translate.ITranslateProvider} $translateProvider
+     * @param {import('@uirouter/angularjs').StateProvider} $stateProvider
+     * @param {ng.ILocationProvider} $locationProvider
+     * @param {import('@uirouter/angularjs').UrlRouterProvider} $urlRouterProvider
+     */
+    ($translateProvider, $stateProvider, $locationProvider, $urlRouterProvider) => {
+        $translateProvider.translations('en', i18n);
+        $translateProvider.preferredLanguage('en');
 
-    // Set up the states.
-    $stateProvider
+        // Set up the states.
+        $stateProvider
         .state('base', {
             url: '',
             abstract: true,
             template: baseTemplate
         });
 
-    $urlRouterProvider.otherwise('/404');
-    $locationProvider.html5Mode(true);
-}])
-.run(['$rootScope', '$state', 'gettingStarted', ($root, $state, gettingStarted) => {
-    $root._ = _;
-    $root.$state = $state;
-    $root.gettingStarted = gettingStarted;
-}])
-.run(['$rootScope', 'AgentManager', ($root, agentMgr) => {
-    let lastUser;
+        $urlRouterProvider.otherwise('/404');
+        $locationProvider.html5Mode(true);
+    }])
+.run(['$rootScope', '$state', 'gettingStarted',
+    /**
+     * @param {ng.IRootScopeService} $root
+     * @param {import('@uirouter/angularjs').StateService} $state
+     * @param {ReturnType<typeof import('./modules/getting-started/GettingStarted.provider').service>} gettingStarted
+     */
+    ($root, $state, gettingStarted) => {
+        $root._ = _;
+        $root.$state = $state;
+        $root.gettingStarted = gettingStarted;
+    }
+])
+.run(['$rootScope', 'AgentManager',
+    /**
+     * @param {ng.IRootScopeService} $root
+     * @param {import('./modules/agent/AgentManager.service').default} agentMgr
+     */
+    ($root, agentMgr) => {
+        let lastUser;
 
-    $root.$on('user', (e, user) => {
-        if (lastUser)
-            return;
+        $root.$on('user', (e, user) => {
+            if (lastUser)
+                return;
 
-        lastUser = user;
+            lastUser = user;
 
-        agentMgr.connect();
-    });
-}])
-.run(['$transitions', ($transitions) => {
-    $transitions.onSuccess({ }, (trans) => {
-        try {
-            const {name, unsaved} = trans.$to();
-            const params = trans.params();
+            agentMgr.connect();
+        });
+    }
+])
+.run(['$transitions',
+    /**
+     * @param {import('@uirouter/angularjs').TransitionService} $transitions
+     */
+    ($transitions) => {
+        $transitions.onSuccess({ }, (trans) => {
+            try {
+                const {name, unsaved} = trans.$to();
+                const params = trans.params();
 
-            if (unsaved)
-                localStorage.removeItem('lastStateChangeSuccess');
-            else
-                localStorage.setItem('lastStateChangeSuccess', JSON.stringify({name, params}));
-        }
-        catch (ignored) {
+                if (unsaved)
+                    localStorage.removeItem('lastStateChangeSuccess');
+                else
+                    localStorage.setItem('lastStateChangeSuccess', JSON.stringify({name, params}));
+            }
+            catch (ignored) {
             // No-op.
-        }
-    });
-}])
+            }
+        });
+    }
+])
 .run(['$rootScope', '$http', '$state', 'IgniteMessages', 'User', 'IgniteNotebookData',
+    /**
+     * @param {ng.IRootScopeService} $root
+     * @param {ng.IHttpService} $http
+     * @param {ReturnType<typeof import('./services/Messages.service').default>} Messages
+     */
     ($root, $http, $state, Messages, User, Notebook) => { // eslint-disable-line no-shadow
         $root.revertIdentity = () => {
             $http.get('/api/v1/admin/revert/identity')
@@ -374,4 +406,9 @@ export default angular.module('ignite-console', [
         };
     }
 ])
-.run(['IgniteIcon', (IgniteIcon) => IgniteIcon.registerIcons(icons)]);
+.run(['IgniteIcon',
+    /**
+     * @param {import('./components/ignite-icon/service').default} IgniteIcon
+     */
+    (IgniteIcon) => IgniteIcon.registerIcons(icons)
+]);

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/components/activities-user-dialog/index.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/activities-user-dialog/index.js b/modules/web-console/frontend/app/components/activities-user-dialog/index.js
index ab3acbb..ace3821 100644
--- a/modules/web-console/frontend/app/components/activities-user-dialog/index.js
+++ b/modules/web-console/frontend/app/components/activities-user-dialog/index.js
@@ -18,7 +18,10 @@
 import controller from './activities-user-dialog.controller';
 import templateUrl from './activities-user-dialog.tpl.pug';
 
-export default ['$modal', function($modal) {
+/**
+ * @param {mgcrea.ngStrap.modal.IModalService} $modal
+ */
+export default function service($modal) {
     return function({ show = true, user }) {
         const ActivitiesUserDialog = $modal({
             templateUrl,
@@ -33,4 +36,6 @@ export default ['$modal', function($modal) {
         return ActivitiesUserDialog.$promise
              .then(() => ActivitiesUserDialog);
     };
-}];
+}
+
+service.$inject = ['$modal'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/components/connected-clusters-badge/controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/connected-clusters-badge/controller.js b/modules/web-console/frontend/app/components/connected-clusters-badge/controller.js
index 8a622d9..807c3ba 100644
--- a/modules/web-console/frontend/app/components/connected-clusters-badge/controller.js
+++ b/modules/web-console/frontend/app/components/connected-clusters-badge/controller.js
@@ -15,17 +15,14 @@
  * limitations under the License.
  */
 
-import AgentManager from 'app/modules/agent/AgentManager.service';
-
 export default class {
     static $inject = ['AgentManager', 'ConnectedClustersDialog'];
 
-    /** @type {Number} */
     connectedClusters = 0;
 
     /**
-     * @param {AgentManager} agentMgr
-     * @param connectedClustersDialog
+     * @param {import('app/modules/agent/AgentManager.service').default} agentMgr
+     * @param {import('../connected-clusters-dialog/service').default} connectedClustersDialog
      */
     constructor(agentMgr, connectedClustersDialog) {
         this.agentMgr = agentMgr;

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/components/connected-clusters-dialog/components/cell-logout/index.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/connected-clusters-dialog/components/cell-logout/index.js b/modules/web-console/frontend/app/components/connected-clusters-dialog/components/cell-logout/index.js
index 1f7af80..e5bdd2c 100644
--- a/modules/web-console/frontend/app/components/connected-clusters-dialog/components/cell-logout/index.js
+++ b/modules/web-console/frontend/app/components/connected-clusters-dialog/components/cell-logout/index.js
@@ -17,13 +17,14 @@
 
 import template from './template.pug';
 
-import AgentManager from 'app/modules/agent/AgentManager.service';
-
 class controller {
+    /** @type {string} */
+    clusterId;
+
     static $inject = ['AgentManager'];
 
     /**
-     * @param {AgentManager} agentMgr
+     * @param {import('app/modules/agent/AgentManager.service').default} agentMgr
      */
     constructor(agentMgr) {
         this.agentMgr = agentMgr;

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/components/connected-clusters-dialog/components/list/controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/connected-clusters-dialog/components/list/controller.js b/modules/web-console/frontend/app/components/connected-clusters-dialog/components/list/controller.js
index c4b0f93..2d0ca26 100644
--- a/modules/web-console/frontend/app/components/connected-clusters-dialog/components/list/controller.js
+++ b/modules/web-console/frontend/app/components/connected-clusters-dialog/components/list/controller.js
@@ -24,6 +24,7 @@ export default class SnapshotsListCachesCtrl {
 
     /**
      * @param {ng.IScope} $scope
+     * @param {import('app/modules/agent/AgentManager.service').default} agentMgr
      */
     constructor($scope, agentMgr) {
         this.$scope = $scope;

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/components/ignite-chart/controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/ignite-chart/controller.js b/modules/web-console/frontend/app/components/ignite-chart/controller.js
index 2012aec..5ae536e 100644
--- a/modules/web-console/frontend/app/components/ignite-chart/controller.js
+++ b/modules/web-console/frontend/app/components/ignite-chart/controller.js
@@ -53,7 +53,7 @@ export class IgniteChartController {
 
     /**
      * @param {JQLite} $element
-     * @param {ng.IScope} $scope
+     * @param {Array<string>} IgniteChartColors
      * @param {ng.IFilterService} $filter
      */
     constructor($element, IgniteChartColors, $filter) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/components/ignite-icon/directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/ignite-icon/directive.js b/modules/web-console/frontend/app/components/ignite-icon/directive.js
index b72c4f9..9838fe2 100644
--- a/modules/web-console/frontend/app/components/ignite-icon/directive.js
+++ b/modules/web-console/frontend/app/components/ignite-icon/directive.js
@@ -21,8 +21,21 @@ export default function() {
         controller: class {
             static $inject = ['$scope', '$attrs', '$sce', '$element', '$window', 'IgniteIcon'];
 
+            /**
+             * @param {ng.IScope} $scope     
+             * @param {ng.IAttributes} $attrs     
+             * @param {ng.ISCEService} $sce       
+             * @param {JQLite} $element   
+             * @param {ng.IWindowService} $window    
+             * @param {import('./service').default} IgniteIcon 
+             */
             constructor($scope, $attrs, $sce, $element, $window, IgniteIcon) {
-                Object.assign(this, {$scope, $attrs, $sce, $element, $window, IgniteIcon});
+                this.$scope = $scope;
+                this.$attrs = $attrs;
+                this.$sce = $sce;
+                this.$element = $element;
+                this.$window = $window;
+                this.IgniteIcon = IgniteIcon;
             }
 
             $onInit() {
@@ -40,6 +53,7 @@ export default function() {
             }
 
             $postLink() {
+                /** @type {string} */
                 this.name = this.$attrs.igniteIcon;
                 this.$element.attr('viewBox', this.IgniteIcon.getIcon(this.name).viewBox);
 
@@ -52,6 +66,9 @@ export default function() {
                 return `${url.split('#')[0]}#${this.name}`;
             }
 
+            /**
+             * @param {string} url 
+             */
             render(url) {
                 // templateNamespace: 'svg' does not work in IE11
                 this.wrapper.innerHTML = `<svg><use xlink:href="${url}" href="${url}" /></svg>`;

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/components/ignite-icon/service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/ignite-icon/service.js b/modules/web-console/frontend/app/components/ignite-icon/service.js
index e142a2d..34ea074 100644
--- a/modules/web-console/frontend/app/components/ignite-icon/service.js
+++ b/modules/web-console/frontend/app/components/ignite-icon/service.js
@@ -15,13 +15,30 @@
  * limitations under the License.
  */
 
+/**
+ * @typedef {{id: string, viewBox: string, content: string}} SpriteSymbol
+ */
+
+/**
+ * @typedef {{[name: string]: SpriteSymbol}} Icons
+ */
+
 export default class IgniteIcon {
+    /**
+     * @type {Icons}
+     */
     _icons = {};
 
+    /**
+     * @param {Icons} icons
+     */
     registerIcons(icons) {
         return Object.assign(this._icons, icons);
     }
 
+    /**
+     * @param {string} name
+     */
     getIcon(name) {
         return this._icons[name];
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/components/input-dialog/input-dialog.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/input-dialog/input-dialog.controller.js b/modules/web-console/frontend/app/components/input-dialog/input-dialog.controller.js
index 3f6e97b..a2dd035 100644
--- a/modules/web-console/frontend/app/components/input-dialog/input-dialog.controller.js
+++ b/modules/web-console/frontend/app/components/input-dialog/input-dialog.controller.js
@@ -15,6 +15,8 @@
  * limitations under the License.
  */
 
+import _ from 'lodash';
+
 export default class InputDialogController {
     static $inject = ['deferred', 'ui'];
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/components/input-dialog/input-dialog.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/input-dialog/input-dialog.service.js b/modules/web-console/frontend/app/components/input-dialog/input-dialog.service.js
index cfd6171..7ef9c07 100644
--- a/modules/web-console/frontend/app/components/input-dialog/input-dialog.service.js
+++ b/modules/web-console/frontend/app/components/input-dialog/input-dialog.service.js
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 
+import _ from 'lodash';
 import controller from './input-dialog.controller';
 import templateUrl from './input-dialog.tpl.pug';
 import {CancellationError} from 'app/errors/CancellationError';
@@ -22,6 +23,10 @@ import {CancellationError} from 'app/errors/CancellationError';
 export default class InputDialog {
     static $inject = ['$modal', '$q'];
 
+    /**
+     * @param {mgcrea.ngStrap.modal.IModalService} $modal
+     * @param {ng.IQService} $q
+     */
     constructor($modal, $q) {
         this.$modal = $modal;
         this.$q = $q;
@@ -34,7 +39,7 @@ export default class InputDialog {
      * @param {String} label Input field label.
      * @param {String} value Default value.
      * @param {Function} [toValidValue] Validator function.
-     * @returns {Promise.<String>} User input.
+     * @returns {ng.IPromise<string>} User input.
      */
     input(title, label, value, toValidValue) {
         const deferred = this.$q.defer();
@@ -67,7 +72,7 @@ export default class InputDialog {
      *
      * @param {String} srcName Name of source object.
      * @param {Array.<String>} names List of already exist names.
-     * @returns {Promise.<String>} New name
+     * @returns {ng.IPromise<string>} New name
      */
     clone(srcName, names) {
         const uniqueName = (value) => {

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/components/page-password-reset/controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-password-reset/controller.js b/modules/web-console/frontend/app/components/page-password-reset/controller.js
index 6b40228..53d6c69 100644
--- a/modules/web-console/frontend/app/components/page-password-reset/controller.js
+++ b/modules/web-console/frontend/app/components/page-password-reset/controller.js
@@ -20,9 +20,9 @@ export default class {
 
     /**
      * @param {mgcrea.ngStrap.modal.IModalService} $modal
-     * @param $http
-     * @param {StateProvider} $state
-     * @param Messages
+     * @param {ng.IHttpService} $http
+     * @param {import('@uirouter/angularjs').StateService} $state
+     * @param {ReturnType<typeof import('app/services/Messages.service').default>} Messages
      */
     constructor($modal, $http, $state, Messages) {
         this.$http = $http;

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/components/page-profile/controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-profile/controller.js b/modules/web-console/frontend/app/components/page-profile/controller.js
index 2c786f0..8586656 100644
--- a/modules/web-console/frontend/app/components/page-profile/controller.js
+++ b/modules/web-console/frontend/app/components/page-profile/controller.js
@@ -22,8 +22,27 @@ export default class PageProfileController {
         '$rootScope', '$scope', '$http', 'IgniteLegacyUtils', 'IgniteMessages', 'IgniteFocus', 'IgniteConfirm', 'IgniteCountries', 'User'
     ];
 
+    /**
+     * @param {ng.IRootScopeService} $root       
+     * @param {ng.IScope} $scope      
+     * @param {ng.IHttpService} $http       
+     * @param {ReturnType<typeof import('app/services/LegacyUtils.service').default>} LegacyUtils
+     * @param {ReturnType<typeof import('app/services/Messages.service').default>} Messages
+     * @param {ReturnType<typeof import('app/services/Focus.service').default>} Focus
+     * @param {import('app/services/Confirm.service').Confirm} Confirm
+     * @param {ReturnType<typeof import('app/services/Countries.service').default>} Countries
+     * @param {ReturnType<typeof import('app/modules/user/User.service').default>} User
+     */
     constructor($root, $scope, $http, LegacyUtils, Messages, Focus, Confirm, Countries, User) {
-        Object.assign(this, {$root, $scope, $http, LegacyUtils, Messages, Focus, Confirm, Countries, User});
+        this.$root = $root;
+        this.$scope = $scope;
+        this.$http = $http;
+        this.LegacyUtils = LegacyUtils;
+        this.Messages = Messages;
+        this.Focus = Focus;
+        this.Confirm = Confirm;
+        this.Countries = Countries;
+        this.User = User;
     }
 
     $onInit() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/components/page-queries/component.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-queries/component.js b/modules/web-console/frontend/app/components/page-queries/component.js
index 056b120..e0c1083 100644
--- a/modules/web-console/frontend/app/components/page-queries/component.js
+++ b/modules/web-console/frontend/app/components/page-queries/component.js
@@ -27,8 +27,17 @@ export default {
     controller: class Ctrl {
         static $inject = ['$element', '$rootScope', '$state', 'IgniteNotebook'];
 
+        /**
+         * @param {JQLite} $element       
+         * @param {ng.IRootScopeService} $rootScope     
+         * @param {import('@uirouter/angularjs').StateService} $state         
+         * @param {import('./notebook.service').default} IgniteNotebook
+         */
         constructor($element, $rootScope, $state, IgniteNotebook) {
-            Object.assign(this, {$element, $rootScope, $state, IgniteNotebook});
+            this.$element = $element;
+            this.$rootScope = $rootScope;
+            this.$state = $state;
+            this.IgniteNotebook = IgniteNotebook;
         }
 
         $onInit() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/components/page-queries/notebook.data.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-queries/notebook.data.js b/modules/web-console/frontend/app/components/page-queries/notebook.data.js
index d83101d..6c784bf 100644
--- a/modules/web-console/frontend/app/components/page-queries/notebook.data.js
+++ b/modules/web-console/frontend/app/components/page-queries/notebook.data.js
@@ -80,6 +80,11 @@ const DEMO_NOTEBOOK = {
 export default class NotebookData {
     static $inject = ['$rootScope', '$http', '$q'];
 
+    /**
+     * @param {ng.IRootScopeService} $root 
+     * @param {ng.IHttpService} $http 
+     * @param {ng.IQService} $q    
+     */
     constructor($root, $http, $q) {
         this.demo = $root.IgniteDemoMode;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/components/page-queries/notebook.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-queries/notebook.service.js b/modules/web-console/frontend/app/components/page-queries/notebook.service.js
index 3004447..dbfd6a6 100644
--- a/modules/web-console/frontend/app/components/page-queries/notebook.service.js
+++ b/modules/web-console/frontend/app/components/page-queries/notebook.service.js
@@ -19,10 +19,10 @@ export default class Notebook {
     static $inject = ['$state', 'IgniteConfirm', 'IgniteMessages', 'IgniteNotebookData'];
 
     /**
-     * @param $state
-     * @param confirmModal
-     * @param Messages
-     * @param {NotebookData} NotebookData
+     * @param {import('@uirouter/angularjs').StateService} $state
+     * @param {ReturnType<typeof import('app/services/Confirm.service').default>} confirmModal
+     * @param {ReturnType<typeof import('app/services/Messages.service').default>} Messages
+     * @param {import('./notebook.data').default} NotebookData
      */
     constructor($state, confirmModal, Messages, NotebookData) {
         this.$state = $state;

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/components/page-signin/controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-signin/controller.js b/modules/web-console/frontend/app/components/page-signin/controller.js
index f2d28e8..c2ca6fe 100644
--- a/modules/web-console/frontend/app/components/page-signin/controller.js
+++ b/modules/web-console/frontend/app/components/page-signin/controller.js
@@ -30,6 +30,8 @@ export default class {
 
     /**
      * @param {import('app/modules/user/Auth.service').default} Auth
+     * @param {ReturnType<typeof import('app/services/Messages.service').default>} IgniteMessages
+     * @param {ReturnType<typeof import('app/services/FormUtils.service').default>} IgniteFormUtils
      */
     constructor(Auth, IgniteMessages, IgniteFormUtils) {
         this.Auth = Auth;

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/components/page-signup/controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-signup/controller.js b/modules/web-console/frontend/app/components/page-signup/controller.js
index 57f404a..1039776 100644
--- a/modules/web-console/frontend/app/components/page-signup/controller.js
+++ b/modules/web-console/frontend/app/components/page-signup/controller.js
@@ -33,7 +33,10 @@ export default class PageSignup {
     static $inject = ['IgniteCountries', 'Auth', 'IgniteMessages', 'IgniteFormUtils'];
 
     /**
+     * @param {ReturnType<typeof import('app/services/Countries.service').default>} Countries
      * @param {import('app/modules/user/Auth.service').default} Auth
+     * @param {ReturnType<typeof import('app/services/Messages.service').default>} IgniteMessages
+     * @param {ReturnType<typeof import('app/services/FormUtils.service').default>} IgniteFormUtils
      */
     constructor(Countries, Auth, IgniteMessages, IgniteFormUtils) {
         this.Auth = Auth;

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/components/user-notifications/service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/user-notifications/service.js b/modules/web-console/frontend/app/components/user-notifications/service.js
index d008482..5ee3257 100644
--- a/modules/web-console/frontend/app/components/user-notifications/service.js
+++ b/modules/web-console/frontend/app/components/user-notifications/service.js
@@ -27,8 +27,17 @@ export default class UserNotificationsService {
     /** @type {ng.IQService} */
     $q;
 
+    /**
+     * @param {ng.IHttpService} $http    
+     * @param {mgcrea.ngStrap.modal.IModalService} $modal   
+     * @param {ng.IQService} $q       
+     * @param {ReturnType<typeof import('app/services/Messages.service').default>} Messages
+     */
     constructor($http, $modal, $q, Messages) {
-        Object.assign(this, {$http, $modal, $q, Messages});
+        this.$http = $http;
+        this.$modal = $modal;
+        this.$q = $q;
+        this.Messages = Messages;
 
         this.message = null;
         this.isShown = false;

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/components/version-picker/component.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/version-picker/component.js b/modules/web-console/frontend/app/components/version-picker/component.js
index 68382ee..16fcb7e 100644
--- a/modules/web-console/frontend/app/components/version-picker/component.js
+++ b/modules/web-console/frontend/app/components/version-picker/component.js
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 
+import _ from 'lodash';
 import template from './template.pug';
 import './style.scss';
 
@@ -23,6 +24,10 @@ export default {
     controller: class {
         static $inject = ['IgniteVersion', '$scope'];
 
+        /**
+         * @param {import('app/services/Version.service').default} Version
+         * @param {ng.IRootScopeService} $scope
+         */
         constructor(Version, $scope) {
             this.currentSbj = Version.currentSbj;
             this.supportedVersions = Version.supportedVersions;

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/core/admin/Admin.data.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/core/admin/Admin.data.js b/modules/web-console/frontend/app/core/admin/Admin.data.js
index 5c4fe10..9ebe599 100644
--- a/modules/web-console/frontend/app/core/admin/Admin.data.js
+++ b/modules/web-console/frontend/app/core/admin/Admin.data.js
@@ -15,15 +15,25 @@
  * limitations under the License.
  */
 
+import _ from 'lodash';
+
 export default class IgniteAdminData {
     static $inject = ['$http', 'IgniteMessages', 'IgniteCountries'];
 
+    /**
+     * @param {ng.IHttpService} $http     
+     * @param {ReturnType<typeof import('app/services/Messages.service').default>} Messages
+     * @param {ReturnType<typeof import('app/services/Countries.service').default>} Countries
+     */
     constructor($http, Messages, Countries) {
         this.$http = $http;
         this.Messages = Messages;
         this.Countries = Countries;
     }
 
+    /**
+     * @param {string} viewedUserId
+     */
     becomeUser(viewedUserId) {
         return this.$http.get('/api/v1/admin/become', {
             params: {viewedUserId}
@@ -31,6 +41,9 @@ export default class IgniteAdminData {
         .catch(this.Messages.showError);
     }
 
+    /**
+     * @param {import('app/modules/user/User.service').User} user
+     */
     removeUser(user) {
         return this.$http.post('/api/v1/admin/remove', {
             userId: user._id
@@ -46,6 +59,9 @@ export default class IgniteAdminData {
         });
     }
 
+    /**
+     * @param {import('app/modules/user/User.service').User} user
+     */
     toggleAdmin(user) {
         const adminFlag = !user.admin;
 
@@ -59,10 +75,13 @@ export default class IgniteAdminData {
             this.Messages.showInfo(`Admin rights was successfully ${adminFlag ? 'granted' : 'revoked'} for user: "${user.userName}"`);
         })
         .catch((res) => {
-            this.Messages.showError(`Failed to ${adminFlag ? 'grant' : 'revok'} admin rights for user: "${user.userName}"`, res);
+            this.Messages.showError(`Failed to ${adminFlag ? 'grant' : 'revoke'} admin rights for user: "${user.userName}"`, res);
         });
     }
 
+    /**
+     * @param {import('app/modules/user/User.service').User} user
+     */
     prepareUsers(user) {
         const { Countries } = this;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/directives/auto-focus.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/auto-focus.directive.js b/modules/web-console/frontend/app/directives/auto-focus.directive.js
index 9c17192..8d269ce 100644
--- a/modules/web-console/frontend/app/directives/auto-focus.directive.js
+++ b/modules/web-console/frontend/app/directives/auto-focus.directive.js
@@ -15,12 +15,21 @@
  * limitations under the License.
  */
 
-// Directive to auto-focus specified element.
-export default ['igniteAutoFocus', ['$timeout', function($timeout) {
+/**
+ * Directive to auto-focus specified element.
+ * @param {ng.ITimeoutService} $timeout
+ */
+export default function directive($timeout) {
     return {
         restrict: 'AC',
+        /**
+         * @param {ng.IScope} scope
+         * @param {JQLite} element
+         */
         link(scope, element) {
             $timeout(() => element[0].focus());
         }
     };
-}]];
+}
+
+directive.$inject = ['$timeout'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/directives/bs-affix-update.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/bs-affix-update.directive.js b/modules/web-console/frontend/app/directives/bs-affix-update.directive.js
index c2b1323..a462dcb 100644
--- a/modules/web-console/frontend/app/directives/bs-affix-update.directive.js
+++ b/modules/web-console/frontend/app/directives/bs-affix-update.directive.js
@@ -17,7 +17,11 @@
 
 import angular from 'angular';
 
-export default ['igniteBsAffixUpdate', ['$window', '$timeout', function($window, $timeout) {
+/**
+ * @param {ng.IWindowService} $window
+ * @param {ng.ITimeoutService} $timeout
+ */
+export default function directive($window, $timeout) {
     let update = null;
 
     const link = ({$last}) => {
@@ -31,4 +35,6 @@ export default ['igniteBsAffixUpdate', ['$window', '$timeout', function($window,
         restrict: 'A',
         link
     };
-}]];
+}
+
+directive.$inject = ['$window', '$timeout'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/directives/centered/centered.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/centered/centered.directive.js b/modules/web-console/frontend/app/directives/centered/centered.directive.js
index 5e3b1c8..967e0c2 100644
--- a/modules/web-console/frontend/app/directives/centered/centered.directive.js
+++ b/modules/web-console/frontend/app/directives/centered/centered.directive.js
@@ -17,10 +17,10 @@
 
 import './centered.scss';
 
-export default ['centered', [function() {
+export default function() {
     return {
         restrict: 'E',
         transclude: true,
         template: '<div class="center-container"><div class="centered"><div ng-transclude></div></div></div>'
     };
-}]];
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/directives/copy-to-clipboard.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/copy-to-clipboard.directive.js b/modules/web-console/frontend/app/directives/copy-to-clipboard.directive.js
index 027cb09..399e1f3 100644
--- a/modules/web-console/frontend/app/directives/copy-to-clipboard.directive.js
+++ b/modules/web-console/frontend/app/directives/copy-to-clipboard.directive.js
@@ -15,10 +15,17 @@
  * limitations under the License.
  */
 
-// Directive for copy to clipboard.
-export default ['igniteCopyToClipboard', ['IgniteCopyToClipboard', function(CopyToClipboard) {
+/**
+ * @param {ReturnType<typeof import('../services/CopyToClipboard.service').default>} CopyToClipboard
+ */
+export default function directive(CopyToClipboard) {
     return {
         restrict: 'A',
+        /**
+         * @param {ng.IScope} scope
+         * @param {JQLite} element
+         * @param {ng.IAttributes} attrs
+         */
         link(scope, element, attrs) {
             element.bind('click', () => CopyToClipboard.copy(attrs.igniteCopyToClipboard));
 
@@ -26,4 +33,6 @@ export default ['igniteCopyToClipboard', ['IgniteCopyToClipboard', function(Copy
                 element.hide();
         }
     };
-}]];
+}
+
+directive.$inject = ['IgniteCopyToClipboard'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/directives/hide-on-state-change/hide-on-state-change.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/hide-on-state-change/hide-on-state-change.directive.js b/modules/web-console/frontend/app/directives/hide-on-state-change/hide-on-state-change.directive.js
index 6c8d702..cd1f45a 100644
--- a/modules/web-console/frontend/app/directives/hide-on-state-change/hide-on-state-change.directive.js
+++ b/modules/web-console/frontend/app/directives/hide-on-state-change/hide-on-state-change.directive.js
@@ -15,13 +15,22 @@
  * limitations under the License.
  */
 
-export default ['hideOnStateChange', ['$transitions', function($transitions) {
+/**
+ * @param {import('@uirouter/angularjs').TransitionService} $transitions
+ */
+export default function directive($transitions) {
+    /**
+     * @param {ng.IScope} scope
+     * @param {JQLite} element
+     */
     const link = (scope, element) => {
-        $transitions.onSuccess({}, () => element.fadeOut('slow'));
+        $transitions.onSuccess({}, () => {element.fadeOut('slow');});
     };
 
     return {
         restrict: 'AE',
         link
     };
-}]];
+}
+
+directive.$inject = ['$transitions'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/directives/information/information.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/information/information.directive.js b/modules/web-console/frontend/app/directives/information/information.directive.js
index 3036262..8e95791 100644
--- a/modules/web-console/frontend/app/directives/information/information.directive.js
+++ b/modules/web-console/frontend/app/directives/information/information.directive.js
@@ -17,7 +17,7 @@
 
 import template from './information.pug';
 
-export default ['igniteInformation', [function() {
+export default function() {
     return {
         scope: {
             title: '@'
@@ -27,4 +27,4 @@ export default ['igniteInformation', [function() {
         replace: true,
         transclude: true
     };
-}]];
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/directives/on-click-focus.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/on-click-focus.directive.js b/modules/web-console/frontend/app/directives/on-click-focus.directive.js
index 593a677..bbc46d1 100644
--- a/modules/web-console/frontend/app/directives/on-click-focus.directive.js
+++ b/modules/web-console/frontend/app/directives/on-click-focus.directive.js
@@ -15,12 +15,24 @@
  * limitations under the License.
  */
 
-// Directive to describe element that should be focused on click.
-export default ['igniteOnClickFocus', ['IgniteFocus', function(Focus) {
-    return function(scope, elem, attrs) {
+/**
+ * Directive to describe element that should be focused on click.
+ * @param {ReturnType<typeof import('../services/Focus.service').default>} Focus
+ */
+export default function directive(Focus) {
+    /**
+     * @param {ng.IScope} scope
+     * @param {JQLite} elem
+     * @param {ng.IAttributes} attrs
+     */
+    function directive(scope, elem, attrs) {
         elem.on('click', () => Focus.move(attrs.igniteOnClickFocus));
 
         // Removes bound events in the element itself when the scope is destroyed
         scope.$on('$destroy', () => elem.off('click'));
-    };
-}]];
+    }
+
+    return directive;
+}
+
+directive.$inject = ['IgniteFocus'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/directives/on-enter-focus-move.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/on-enter-focus-move.directive.js b/modules/web-console/frontend/app/directives/on-enter-focus-move.directive.js
index 75ae1e2..9cb9913 100644
--- a/modules/web-console/frontend/app/directives/on-enter-focus-move.directive.js
+++ b/modules/web-console/frontend/app/directives/on-enter-focus-move.directive.js
@@ -15,9 +15,17 @@
  * limitations under the License.
  */
 
-// Directive to move focus to specified element on ENTER key.
-export default ['igniteOnEnterFocusMove', ['IgniteFocus', function(Focus) {
-    return function(scope, elem, attrs) {
+/**
+ * Directive to move focus to specified element on ENTER key.
+ * @param {ReturnType<typeof import('../services/Focus.service').default>} Focus
+ */
+export default function directive(Focus) {
+    /**
+     * @param {ng.IScope} scope
+     * @param {JQLite} elem
+     * @param {ng.IAttributes} attrs
+     */
+    function directive(scope, elem, attrs) {
         elem.on('keydown keypress', (event) => {
             if (event.which === 13) {
                 event.preventDefault();
@@ -25,5 +33,9 @@ export default ['igniteOnEnterFocusMove', ['IgniteFocus', function(Focus) {
                 Focus.move(attrs.igniteOnEnterFocusMove);
             }
         });
-    };
-}]];
+    }
+
+    return directive;
+}
+
+directive.$inject = ['IgniteFocus'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/directives/on-enter.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/on-enter.directive.js b/modules/web-console/frontend/app/directives/on-enter.directive.js
index 2ec75f9..1bc3e48 100644
--- a/modules/web-console/frontend/app/directives/on-enter.directive.js
+++ b/modules/web-console/frontend/app/directives/on-enter.directive.js
@@ -15,9 +15,17 @@
  * limitations under the License.
  */
 
-// Directive to bind ENTER key press with some user action.
-export default ['igniteOnEnter', ['$timeout', function($timeout) {
-    return function(scope, elem, attrs) {
+/**
+ * Directive to bind ENTER key press with some user action.
+ * @param {ng.ITimeoutService} $timeout
+ */
+export default function directive($timeout) {
+    /**
+     * @param {ng.IScope} scope
+     * @param {JQLite} elem
+     * @param {ng.IAttributes} attrs
+     */
+    function directive(scope, elem, attrs) {
         elem.on('keydown keypress', (event) => {
             if (event.which === 13) {
                 scope.$apply(() => $timeout(() => scope.$eval(attrs.igniteOnEnter)));
@@ -28,5 +36,9 @@ export default ['igniteOnEnter', ['$timeout', function($timeout) {
 
         // Removes bound events in the element itself when the scope is destroyed.
         scope.$on('$destroy', () => elem.off('keydown keypress'));
-    };
-}]];
+    }
+
+    return directive;
+}
+
+directive.$inject = ['$timeout'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/directives/on-escape.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/on-escape.directive.js b/modules/web-console/frontend/app/directives/on-escape.directive.js
index dafc176..b1f1648 100644
--- a/modules/web-console/frontend/app/directives/on-escape.directive.js
+++ b/modules/web-console/frontend/app/directives/on-escape.directive.js
@@ -15,9 +15,17 @@
  * limitations under the License.
  */
 
-// Directive to bind ESC key press with some user action.
-export default ['igniteOnEscape', ['$timeout', function($timeout) {
-    return function(scope, elem, attrs) {
+/**
+ * Directive to bind ESC key press with some user action.
+ * @param {ng.ITimeoutService} $timeout
+ */
+export default function directive($timeout) {
+    /**
+     * @param {ng.IScope} scope
+     * @param {JQLite} elem
+     * @param {ng.IAttributes} attrs
+     */
+    function directive(scope, elem, attrs) {
         elem.on('keydown keypress', (event) => {
             if (event.which === 27) {
                 scope.$apply(() => $timeout(() => scope.$eval(attrs.igniteOnEscape)));
@@ -28,5 +36,9 @@ export default ['igniteOnEscape', ['$timeout', function($timeout) {
 
         // Removes bound events in the element itself when the scope is destroyed.
         scope.$on('$destroy', () => elem.off('keydown keypress'));
-    };
-}]];
+    }
+
+    return directive;
+}
+
+directive.$inject = ['$timeout'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/directives/restore-input-focus.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/restore-input-focus.directive.js b/modules/web-console/frontend/app/directives/restore-input-focus.directive.js
index 97a1491..829b888 100644
--- a/modules/web-console/frontend/app/directives/restore-input-focus.directive.js
+++ b/modules/web-console/frontend/app/directives/restore-input-focus.directive.js
@@ -15,10 +15,16 @@
  * limitations under the License.
  */
 
-export default [function() {
-    return ($scope, $element) => {
+export default function() {
+    /**
+     * @param {ng.IScope} $scope
+     * @param {JQuery} $element
+     */
+    const directive = ($scope, $element) => {
         $element.on('click', () => {
             $element.siblings('.input-tip').find('input').focus();
         });
     };
-}];
+
+    return directive;
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/directives/retain-selection.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/retain-selection.directive.js b/modules/web-console/frontend/app/directives/retain-selection.directive.js
index 24a55d1..fb7321a 100644
--- a/modules/web-console/frontend/app/directives/retain-selection.directive.js
+++ b/modules/web-console/frontend/app/directives/retain-selection.directive.js
@@ -15,11 +15,18 @@
  * limitations under the License.
  */
 
-// Directive to workaround known issue with type ahead edit lost cursor position.
-export default ['igniteRetainSelection', ['$timeout', function($timeout) {
+/**
+ * Directive to workaround known issue with type ahead edit lost cursor position.
+ * @param {ng.ITimeoutService} $timeout
+ */
+export default function directive($timeout) {
     let promise;
 
-    return function(scope, elem) {
+    /**
+     * @param {ng.IScope} scope
+     * @param {JQLite} elem  [description]
+     */
+    function directive(scope, elem) {
         elem.on('keydown', function(evt) {
             const key = evt.which;
             const ctrlDown = evt.ctrlKey || evt.metaKey;
@@ -63,5 +70,9 @@ export default ['igniteRetainSelection', ['$timeout', function($timeout) {
         scope.$on('$destroy', function() {
             elem.off('keydown');
         });
-    };
-}]];
+    }
+
+    return directive;
+}
+
+directive.$inject = ['$timeout'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.controller.js b/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.controller.js
index 4f443ae..c3928c7 100644
--- a/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.controller.js
+++ b/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.controller.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-export default ['$scope', 'IgniteVersion', 'IgniteDockerGenerator', function($scope, Version, docker) {
+export default function controller($scope, Version, docker) {
     const ctrl = this;
 
     this.$onInit = () => {
@@ -36,4 +36,6 @@ export default ['$scope', 'IgniteVersion', 'IgniteDockerGenerator', function($sc
 
         $scope.$watch('cluster', clusterWatcher);
     };
-}];
+}
+
+controller.$inject = ['$scope', 'IgniteVersion', 'IgniteDockerGenerator'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.directive.js b/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.directive.js
index e83c315..188f11f 100644
--- a/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.directive.js
+++ b/modules/web-console/frontend/app/directives/ui-ace-docker/ui-ace-docker.directive.js
@@ -18,7 +18,7 @@
 import template from './ui-ace-docker.pug';
 import controller from './ui-ace-docker.controller';
 
-export default ['igniteUiAceDocker', [function() {
+export default function() {
     const link = ($scope, $el, $attrs, [igniteUiAceTabs]) => {
         if (igniteUiAceTabs.onLoad)
             $scope.onLoad = igniteUiAceTabs.onLoad;
@@ -43,4 +43,4 @@ export default ['igniteUiAceDocker', [function() {
         controllerAs: 'ctrl',
         require: ['?^igniteUiAceTabs']
     };
-}]];
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.controller.js b/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.controller.js
index 3f9580f..bb4d1c4 100644
--- a/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.controller.js
+++ b/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.controller.js
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
+import _ from 'lodash';
 import {nonNil} from 'app/utils/lodashMixins';
 
-export default ['$scope', 'JavaTypes', 'JavaTransformer', function($scope, JavaTypes, generator) {
+export default function controller($scope, JavaTypes, generator) {
     const ctrl = this;
 
     this.$onInit = () => {
@@ -96,4 +97,6 @@ export default ['$scope', 'JavaTypes', 'JavaTransformer', function($scope, JavaT
         $scope.$watch('ctrl.pojos', updatePojosData);
         $scope.$watch('ctrl.class', updatePojosData);
     };
-}];
+}
+
+controller.$inject = ['$scope', 'JavaTypes', 'JavaTransformer'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.directive.js b/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.directive.js
index 864f705..c9f97cc 100644
--- a/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.directive.js
+++ b/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.directive.js
@@ -18,7 +18,7 @@
 import template from './ui-ace-pojos.pug';
 import controller from './ui-ace-pojos.controller';
 
-export default ['igniteUiAcePojos', [function() {
+export default function() {
     const link = ($scope, $el, $attrs, [igniteUiAceTabs]) => {
         if (igniteUiAceTabs.onLoad)
             $scope.onLoad = igniteUiAceTabs.onLoad;
@@ -43,4 +43,4 @@ export default ['igniteUiAcePojos', [function() {
         controllerAs: 'ctrl',
         require: ['?^igniteUiAceTabs']
     };
-}]];
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.controller.js b/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.controller.js
index 2e421b2..ae64022 100644
--- a/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.controller.js
+++ b/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.controller.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-export default ['$scope', 'IgniteVersion', 'IgniteMavenGenerator', function($scope, Version, maven) {
+export default function controller($scope, Version, maven) {
     const ctrl = this;
 
     this.$onInit = () => {
@@ -36,4 +36,6 @@ export default ['$scope', 'IgniteVersion', 'IgniteMavenGenerator', function($sco
 
         $scope.$watch('cluster', clusterWatcher);
     };
-}];
+}
+
+controller.$inject = ['$scope', 'IgniteVersion', 'IgniteMavenGenerator'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.directive.js b/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.directive.js
index 87083ab..f2ba0ae 100644
--- a/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.directive.js
+++ b/modules/web-console/frontend/app/directives/ui-ace-pom/ui-ace-pom.directive.js
@@ -18,7 +18,7 @@
 import template from './ui-ace-pom.pug';
 import controller from './ui-ace-pom.controller';
 
-export default ['igniteUiAcePom', [function() {
+export default function() {
     const link = ($scope, $el, $attrs, [igniteUiAceTabs]) => {
         if (igniteUiAceTabs.onLoad)
             $scope.onLoad = igniteUiAceTabs.onLoad;
@@ -38,4 +38,4 @@ export default ['igniteUiAcePom', [function() {
         controllerAs: 'ctrl',
         require: ['?^igniteUiAceTabs']
     };
-}]];
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/directives/ui-ace-sharp/ui-ace-sharp.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-sharp/ui-ace-sharp.controller.js b/modules/web-console/frontend/app/directives/ui-ace-sharp/ui-ace-sharp.controller.js
index e87caca..09f7a01 100644
--- a/modules/web-console/frontend/app/directives/ui-ace-sharp/ui-ace-sharp.controller.js
+++ b/modules/web-console/frontend/app/directives/ui-ace-sharp/ui-ace-sharp.controller.js
@@ -18,7 +18,12 @@
 const SERVER_CFG = 'ServerConfigurationFactory';
 const CLIENT_CFG = 'ClientConfigurationFactory';
 
-export default ['$scope', 'IgniteSharpTransformer', function($scope, generator) {
+/**
+ * @param {ng.IScope} $scope
+ * @param {import('app/modules/configuration/generator/SharpTransformer.service').default} generator
+ */
+export default function controller($scope, generator) {
+    /** @type {ThisType} */
     const ctrl = this;
 
     this.$onInit = () => {
@@ -31,4 +36,6 @@ export default ['$scope', 'IgniteSharpTransformer', function($scope, generator)
             return generator.cluster(cluster, 'config', type, $scope.cfg);
         };
     };
-}];
+}
+
+controller.$inject = ['$scope', 'IgniteSharpTransformer'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/directives/ui-ace-sharp/ui-ace-sharp.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-sharp/ui-ace-sharp.directive.js b/modules/web-console/frontend/app/directives/ui-ace-sharp/ui-ace-sharp.directive.js
index 094028b..d6e366b 100644
--- a/modules/web-console/frontend/app/directives/ui-ace-sharp/ui-ace-sharp.directive.js
+++ b/modules/web-console/frontend/app/directives/ui-ace-sharp/ui-ace-sharp.directive.js
@@ -20,8 +20,18 @@ import _ from 'lodash';
 import template from './ui-ace-sharp.pug';
 import controller from './ui-ace-sharp.controller';
 
-export default ['igniteUiAceSharp', ['IgniteSharpTransformer', function(generator) {
-    const link = (scope, $el, attrs, [ctrl, igniteUiAceTabs, formCtrl, ngModelCtrl]) => {
+/**
+ * @param {import('app/modules/configuration/generator/SharpTransformer.service').default} generator
+ */
+export default function directive(generator) {
+    /**
+     * @param {ng.IScope} scope
+     * @param {JQLite} $el
+     * @param {ng.IAttributes} attrs
+     * @param {[typeof controller, any?, ng.IFormController?, ng.INgModelController?]} controllers
+     */
+    const link = (scope, $el, attrs, controllers) => {
+        const [ctrl, igniteUiAceTabs, formCtrl, ngModelCtrl] = controllers;
         if (formCtrl && ngModelCtrl)
             formCtrl.$removeControl(ngModelCtrl);
 
@@ -132,4 +142,6 @@ export default ['igniteUiAceSharp', ['IgniteSharpTransformer', function(generato
         controllerAs: 'ctrl',
         require: ['igniteUiAceSharp', '?^igniteUiAceTabs', '?^form', '?ngModel']
     };
-}]];
+}
+
+directive.$inject = ['IgniteSharpTransformer'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/directives/ui-ace-tabs.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-tabs.directive.js b/modules/web-console/frontend/app/directives/ui-ace-tabs.directive.js
index 6d11f58..a174b98 100644
--- a/modules/web-console/frontend/app/directives/ui-ace-tabs.directive.js
+++ b/modules/web-console/frontend/app/directives/ui-ace-tabs.directive.js
@@ -17,10 +17,10 @@
 
 import _ from 'lodash';
 
-export default ['igniteUiAceTabs', [function() {
+export default function() {
     return {
         scope: true,
         restrict: 'AE',
         controller: _.noop
     };
-}]];
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/filters/byName.filter.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/filters/byName.filter.js b/modules/web-console/frontend/app/filters/byName.filter.js
index 2769189..6ec56f4 100644
--- a/modules/web-console/frontend/app/filters/byName.filter.js
+++ b/modules/web-console/frontend/app/filters/byName.filter.js
@@ -15,9 +15,11 @@
  * limitations under the License.
  */
 
-export default [() => (arr, search) => {
+import _ from 'lodash';
+
+export default () => (arr, search) => {
     if (!(arr && arr.length) || !search)
         return arr;
 
     return _.filter(arr, ({ name }) => name.indexOf(search) >= 0);
-}];
+};

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/filters/bytes.filter.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/filters/bytes.filter.js b/modules/web-console/frontend/app/filters/bytes.filter.js
index 7576dad..71e77d4 100644
--- a/modules/web-console/frontend/app/filters/bytes.filter.js
+++ b/modules/web-console/frontend/app/filters/bytes.filter.js
@@ -16,7 +16,11 @@
  */
 
 export default () => {
-    return (bytes, precision) => {
+    /**
+     * @param {number} bytes
+     * @param {number} [precision]
+     */
+    const filter = (bytes, precision) => {
         if (bytes === 0)
             return '0 bytes';
 
@@ -31,4 +35,6 @@ export default () => {
 
         return (bytes / Math.pow(1024, Math.floor(number))).toFixed(precision) + ' ' + units[number];
     };
+
+    return filter;
 };

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/filters/default-name.filter.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/filters/default-name.filter.js b/modules/web-console/frontend/app/filters/default-name.filter.js
index 687ff84..a8b182e 100644
--- a/modules/web-console/frontend/app/filters/default-name.filter.js
+++ b/modules/web-console/frontend/app/filters/default-name.filter.js
@@ -15,7 +15,15 @@
  * limitations under the License.
  */
 
-// Filter that will check name and return `<default>` if needed.
-export default [() => {
-    return (name, html) => _.isEmpty(name) ? (html ? '&lt;default&gt;' : '<default>') : name;
-}];
+import _ from 'lodash';
+
+export default () => {
+    /**
+     * Filter that will check name and return `<default>` if needed.
+     * @param {string} name
+     * @param {string} html
+     */
+    const filter = (name, html) => _.isEmpty(name) ? (html ? '&lt;default&gt;' : '<default>') : name;
+
+    return filter;
+};

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/filters/domainsValidation.filter.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/filters/domainsValidation.filter.js b/modules/web-console/frontend/app/filters/domainsValidation.filter.js
index eec0ff1..d551ca5 100644
--- a/modules/web-console/frontend/app/filters/domainsValidation.filter.js
+++ b/modules/web-console/frontend/app/filters/domainsValidation.filter.js
@@ -15,19 +15,37 @@
  * limitations under the License.
  */
 
-// Filter domain models with key fields configuration.
-export default ['IgniteLegacyUtils', (LegacyUtils) => (domains, valid, invalid) => {
-    if (valid && invalid)
-        return domains;
+import _ from 'lodash';
 
-    const out = [];
+/**
+ * @param {ReturnType<typeof import('../services/LegacyUtils.service').default>} LegacyUtils [description]
+ */
+export default function factory(LegacyUtils) {
+    /**
+     * Filter domain models with key fields configuration.
+     * @template T
+     * @param {Array<T>} domains
+     * @param {boolean} valid
+     * @param {boolean} invalid
+     */
+    const filter = (domains, valid, invalid) => {
+        if (valid && invalid)
+            return domains;
+
+        /** @type {Array<T>} */
+        const out = [];
+
+        _.forEach(domains, function(domain) {
+            const _valid = !LegacyUtils.domainForStoreConfigured(domain) || LegacyUtils.isJavaBuiltInClass(domain.keyType) || !_.isEmpty(domain.keyFields);
+
+            if (valid && _valid || invalid && !_valid)
+                out.push(domain);
+        });
 
-    _.forEach(domains, function(domain) {
-        const _valid = !LegacyUtils.domainForStoreConfigured(domain) || LegacyUtils.isJavaBuiltInClass(domain.keyType) || !_.isEmpty(domain.keyFields);
+        return out;
+    };
 
-        if (valid && _valid || invalid && !_valid)
-            out.push(domain);
-    });
+    return filter;
+}
 
-    return out;
-}];
+factory.$inject = ['IgniteLegacyUtils'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/filters/duration.filter.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/filters/duration.filter.js b/modules/web-console/frontend/app/filters/duration.filter.js
index 55ec7e0..810cc4d 100644
--- a/modules/web-console/frontend/app/filters/duration.filter.js
+++ b/modules/web-console/frontend/app/filters/duration.filter.js
@@ -15,11 +15,11 @@
  * limitations under the License.
  */
 
-export default [() => {
+export default () => {
     /**
-     * @param {Number} t Time in ms.
+     * @param {number} t Time in ms.
      */
-    return (t) => {
+    const filter = (t) => {
         if (t === 9223372036854775807)
             return 'Infinite';
 
@@ -38,4 +38,6 @@ export default [() => {
 
         return a(d, 'd') + a(h, 'h') + a(m, 'm') + a(s, 's') + (t < 1000 || (t < cm && ms !== 0) ? ms + 'ms' : '');
     };
-}];
+
+    return filter;
+};

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/filters/hasPojo.filter.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/filters/hasPojo.filter.js b/modules/web-console/frontend/app/filters/hasPojo.filter.js
index 57530db..4186928 100644
--- a/modules/web-console/frontend/app/filters/hasPojo.filter.js
+++ b/modules/web-console/frontend/app/filters/hasPojo.filter.js
@@ -16,6 +16,6 @@
  */
 
 // Filter that return 'true' if caches has at least one domain with 'generatePojo' flag.
-export default [() => ({caches} = []) =>
+export default () => ({caches} = []) =>
     _.find(caches, (cache) => cache.domains && cache.domains.length &&
-        cache.domains.find((domain) => domain.generatePojo))];
+        cache.domains.find((domain) => domain.generatePojo));

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/filters/uiGridSubcategories.filter.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/filters/uiGridSubcategories.filter.js b/modules/web-console/frontend/app/filters/uiGridSubcategories.filter.js
index f36ae6e..859192d 100644
--- a/modules/web-console/frontend/app/filters/uiGridSubcategories.filter.js
+++ b/modules/web-console/frontend/app/filters/uiGridSubcategories.filter.js
@@ -15,10 +15,12 @@
  * limitations under the License.
  */
 
-export default [() => {
+import _ from 'lodash';
+
+export default () => {
     return (arr, category) => {
         return _.filter(arr, (item) => {
             return item.colDef.categoryDisplayName === category;
         });
     };
-}];
+};

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/agent/AgentManager.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/agent/AgentManager.service.js b/modules/web-console/frontend/app/modules/agent/AgentManager.service.js
index c5fcc99..f667374 100644
--- a/modules/web-console/frontend/app/modules/agent/AgentManager.service.js
+++ b/modules/web-console/frontend/app/modules/agent/AgentManager.service.js
@@ -142,7 +142,7 @@ export default class AgentManager {
 
     pool = new SimpleWorkerPool('decompressor', Worker, 4);
 
-    /** @type {Set<ng.IDifferend>} */
+    /** @type {Set<ng.IPromise<unknown>>} */
     promises = new Set();
 
     socket = null;
@@ -159,8 +159,25 @@ export default class AgentManager {
         }
     }
 
+    /**
+     * @param {ng.IRootScopeService} $root
+     * @param {ng.IQService} $q
+     * @param {import('@uirouter/angularjs').TransitionService} $transitions
+     * @param {unknown} socketFactory
+     * @param {import('./AgentModal.service').default} agentModal
+     * @param {import('app/components/user-notifications/service').default} UserNotifications
+     * @param {import('app/services/Version.service').default} Version
+     * @param {import('./components/cluster-login/service').default} ClusterLoginSrv
+     */
     constructor($root, $q, $transitions, socketFactory, agentModal, UserNotifications, Version, ClusterLoginSrv) {
-        Object.assign(this, {$root, $q, $transitions, socketFactory, agentModal, UserNotifications, Version, ClusterLoginSrv});
+        this.$root = $root;
+        this.$q = $q;
+        this.$transitions = $transitions;
+        this.socketFactory = socketFactory;
+        this.agentModal = agentModal;
+        this.UserNotifications = UserNotifications;
+        this.Version = Version;
+        this.ClusterLoginSrv = ClusterLoginSrv;
 
         let prevCluster;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/agent/AgentModal.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/agent/AgentModal.service.js b/modules/web-console/frontend/app/modules/agent/AgentModal.service.js
index 857a71e..e4b41ac 100644
--- a/modules/web-console/frontend/app/modules/agent/AgentModal.service.js
+++ b/modules/web-console/frontend/app/modules/agent/AgentModal.service.js
@@ -15,20 +15,28 @@
  * limitations under the License.
  */
 
+import angular from 'angular';
+import _ from 'lodash';
 import templateUrl from 'views/templates/agent-download.tpl.pug';
 
 export default class AgentModal {
     static $inject = ['$rootScope', '$state', '$modal', 'IgniteMessages'];
 
+    /**
+     * @param {ng.IRootScopeService} $root
+     * @param {import('@uirouter/angularjs').StateService} $state
+     * @param {mgcrea.ngStrap.modal.IModalService} $modal
+     * @param {ReturnType<typeof import('app/services/Messages.service').default>} Messages
+     */
     constructor($root, $state, $modal, Messages) {
         const self = this;
 
         this.$root = $root;
-        self.$state = $state;
-        self.Messages = Messages;
+        this.$state = $state;
+        this.Messages = Messages;
 
         // Pre-fetch modal dialogs.
-        self.modal = $modal({
+        this.modal = $modal({
             templateUrl,
             show: false,
             backdrop: 'static',
@@ -37,7 +45,7 @@ export default class AgentModal {
             controllerAs: 'ctrl'
         });
 
-        $root.$on('user', (event, user) => self.user = user);
+        $root.$on('user', (event, user) => this.user = user);
     }
 
     hide() {
@@ -63,14 +71,12 @@ export default class AgentModal {
      * @param {String} [backText]
      */
     agentDisconnected(backText, backState) {
-        const self = this;
+        this.backText = backText;
+        this.backState = backState;
 
-        self.backText = backText;
-        self.backState = backState;
+        this.status = 'agentMissing';
 
-        self.status = 'agentMissing';
-
-        self.modal.$promise.then(self.modal.show);
+        this.modal.$promise.then(() => this.modal.show());
     }
 
     /**
@@ -78,14 +84,12 @@ export default class AgentModal {
      * @param {String} [backText]
      */
     clusterDisconnected(backText, backState) {
-        const self = this;
-
-        self.backText = backText;
-        self.backState = backState;
+        this.backText = backText;
+        this.backState = backState;
 
-        self.status = 'nodeMissing';
+        this.status = 'nodeMissing';
 
-        self.modal.$promise.then(self.modal.show);
+        this.modal.$promise.then(() => this.modal.show());
     }
 
     get securityToken() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/agent/components/cluster-login/component.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/agent/components/cluster-login/component.js b/modules/web-console/frontend/app/modules/agent/components/cluster-login/component.js
index 5f1d9e3..e932bad 100644
--- a/modules/web-console/frontend/app/modules/agent/components/cluster-login/component.js
+++ b/modules/web-console/frontend/app/modules/agent/components/cluster-login/component.js
@@ -27,6 +27,12 @@ export const component = {
     controller: class {
         /** @type {ClusterSecrets} */
         secrets;
+        /** @type {ng.ICompiledExpression} */
+        onLogin;
+        /** @type {ng.ICompiledExpression} */
+        onHide;
+        /** @type {ng.IFormController} */
+        form;
 
         login() {
             if (this.form.$invalid)

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/agent/components/cluster-login/service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/agent/components/cluster-login/service.js b/modules/web-console/frontend/app/modules/agent/components/cluster-login/service.js
index a066bcf..128f3cc 100644
--- a/modules/web-console/frontend/app/modules/agent/components/cluster-login/service.js
+++ b/modules/web-console/frontend/app/modules/agent/components/cluster-login/service.js
@@ -17,20 +17,23 @@
 
 import _ from 'lodash';
 
-import {ClusterSecrets} from '../../types/ClusterSecrets';
 import {CancellationError} from 'app/errors/CancellationError';
 
 export default class ClusterLoginService {
     static $inject = ['$modal', '$q'];
 
+    /**
+     * @param {mgcrea.ngStrap.modal.IModalService} $modal
+     * @param {ng.IQService} $q
+     */
     constructor($modal, $q) {
         this.$modal = $modal;
         this.$q = $q;
     }
 
     /**
-     * @param {ClusterSecrets} baseSecrets
-     * @return {ng.IDifferend<ClusterSecrets>}
+     * @param {import('../../types/ClusterSecrets').ClusterSecrets} baseSecrets
+     * @returns {ng.IPromise<import('../../types/ClusterSecrets').ClusterSecrets>}
      */
     askCredentials(baseSecrets) {
         const deferred = this.$q.defer();

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/branding/branding.module.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/branding/branding.module.js b/modules/web-console/frontend/app/modules/branding/branding.module.js
index 2313728..20cd93e 100644
--- a/modules/web-console/frontend/app/modules/branding/branding.module.js
+++ b/modules/web-console/frontend/app/modules/branding/branding.module.js
@@ -41,9 +41,9 @@ angular
 
     tfMetaTagsProvider.setTitleSuffix(' – Apache Ignite Web Console');
 }])
-.directive(...ignitePoweredByApache)
-.directive(...igniteHeaderLogo)
-.directive(...igniteHeaderTitle)
-.directive(...igniteTerms)
-.directive(...igniteFeatures)
-.directive(...igniteFooter);
+.directive('ignitePoweredByApache', ignitePoweredByApache)
+.directive('igniteHeaderLogo', igniteHeaderLogo)
+.directive('igniteHeaderTitle', igniteHeaderTitle)
+.directive('igniteTerms', igniteTerms)
+.directive('igniteFeatures', igniteFeatures)
+.directive('igniteFooter', igniteFooter);

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/branding/branding.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/branding/branding.service.js b/modules/web-console/frontend/app/modules/branding/branding.service.js
index ebef881..667dbfd 100644
--- a/modules/web-console/frontend/app/modules/branding/branding.service.js
+++ b/modules/web-console/frontend/app/modules/branding/branding.service.js
@@ -18,6 +18,9 @@
 export default class {
     static $inject = ['IgniteVersion'];
 
+    /**
+     * @param {import('app/services/Version.service').default} Version
+     */
     constructor(Version) {
         this.titleSuffix = ' - Apache Ignite Web Console';
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/branding/features.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/branding/features.directive.js b/modules/web-console/frontend/app/modules/branding/features.directive.js
index d99b885..39c639c 100644
--- a/modules/web-console/frontend/app/modules/branding/features.directive.js
+++ b/modules/web-console/frontend/app/modules/branding/features.directive.js
@@ -17,7 +17,10 @@
 
 const template = '<div class="features" ng-bind-html="features.html"></div>';
 
-export default ['igniteFeatures', ['IgniteBranding', function(branding) {
+/**
+ * @param {import('./branding.service').default} branding
+ */
+export default function factory(branding) {
     function controller() {
         const ctrl = this;
 
@@ -31,5 +34,7 @@ export default ['igniteFeatures', ['IgniteBranding', function(branding) {
         controllerAs: 'features',
         replace: true
     };
-}]];
+}
+
+factory.$inject = ['IgniteBranding'];
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/branding/footer.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/branding/footer.directive.js b/modules/web-console/frontend/app/modules/branding/footer.directive.js
index 7f09e11..3c0bb83 100644
--- a/modules/web-console/frontend/app/modules/branding/footer.directive.js
+++ b/modules/web-console/frontend/app/modules/branding/footer.directive.js
@@ -17,7 +17,10 @@
 
 const template = '<div class="footer" ng-bind-html="footer.html"></div>';
 
-export default ['igniteFooter', ['IgniteBranding', function(branding) {
+/**
+ * @param {import('./branding.service').default} branding
+ */
+export default function factory(branding) {
     function controller() {
         const ctrl = this;
 
@@ -31,4 +34,6 @@ export default ['igniteFooter', ['IgniteBranding', function(branding) {
         controllerAs: 'footer',
         replace: true
     };
-}]];
+}
+
+factory.$inject = ['IgniteBranding'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/branding/header-logo.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/branding/header-logo.directive.js b/modules/web-console/frontend/app/modules/branding/header-logo.directive.js
index 18dff1c..60e5d5d 100644
--- a/modules/web-console/frontend/app/modules/branding/header-logo.directive.js
+++ b/modules/web-console/frontend/app/modules/branding/header-logo.directive.js
@@ -17,7 +17,10 @@
 
 import template from './header-logo.pug';
 
-export default ['igniteHeaderLogo', ['IgniteBranding', function(branding) {
+/**
+ * @param {import('./branding.service').default} branding
+ */
+export default function factory(branding) {
     function controller() {
         const ctrl = this;
 
@@ -31,4 +34,6 @@ export default ['igniteHeaderLogo', ['IgniteBranding', function(branding) {
         controllerAs: 'logo',
         replace: true
     };
-}]];
+}
+
+factory.$inject = ['IgniteBranding'];

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/branding/header-title.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/branding/header-title.directive.js b/modules/web-console/frontend/app/modules/branding/header-title.directive.js
index aedd4b9..f67439c 100644
--- a/modules/web-console/frontend/app/modules/branding/header-title.directive.js
+++ b/modules/web-console/frontend/app/modules/branding/header-title.directive.js
@@ -21,7 +21,10 @@ const template = `
     >{{::title.text}}</h1>
 `;
 
-export default ['igniteHeaderTitle', ['IgniteBranding', (branding) => {
+/**
+ * @param {import('./branding.service').default} branding
+ */
+export default function factory(branding) {
     function controller() {
         const ctrl = this;
 
@@ -35,5 +38,7 @@ export default ['igniteHeaderTitle', ['IgniteBranding', (branding) => {
         controllerAs: 'title',
         replace: true
     };
-}]];
+}
+
+factory.$inject = ['IgniteBranding'];
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e6e8bff/modules/web-console/frontend/app/modules/branding/powered-by-apache.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/branding/powered-by-apache.directive.js b/modules/web-console/frontend/app/modules/branding/powered-by-apache.directive.js
index e88f71f..3f8b3de 100644
--- a/modules/web-console/frontend/app/modules/branding/powered-by-apache.directive.js
+++ b/modules/web-console/frontend/app/modules/branding/powered-by-apache.directive.js
@@ -17,7 +17,10 @@
 
 import template from './powered-by-apache.pug';
 
-export default ['ignitePoweredByApache', ['IgniteBranding', (branding) => {
+/**
+ * @param {import('./branding.service').default} branding
+ */
+export default function factory(branding) {
     function controller() {
         const ctrl = this;
 
@@ -30,5 +33,7 @@ export default ['ignitePoweredByApache', ['IgniteBranding', (branding) => {
         controller,
         controllerAs: 'poweredBy'
     };
-}]];
+}
+
+factory.$inject = ['IgniteBranding'];