ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [08/46] ignite git commit: Ignite Web Console speed up bundle rebuild and watch. Minor fixes.
Date Wed, 20 Jul 2016 09:06:53 GMT
http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/build/system.config.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/build/system.config.js b/modules/web-console/src/main/js/build/system.config.js
deleted file mode 100644
index 20af865..0000000
--- a/modules/web-console/src/main/js/build/system.config.js
+++ /dev/null
@@ -1,424 +0,0 @@
-System.config({
-  defaultJSExtensions: true,
-  transpiler: "babel",
-  babelOptions: {
-    "optional": [
-      "runtime",
-      "optimisation.modules.system"
-    ]
-  },
-  paths: {
-    "github:*": "build/jspm_packages/github/*",
-    "npm:*": "build/jspm_packages/npm/*"
-  },
-  separateCSS: true,
-
-  map: {
-    "ace": "github:ajaxorg/ace-builds@1.2.3",
-    "angular": "github:angular/bower-angular@1.5.5",
-    "angular-animate": "github:angular/bower-angular-animate@1.5.5",
-    "angular-drag-and-drop-lists": "github:marceljuenemann/angular-drag-and-drop-lists@1.4.0",
-    "angular-gridster": "github:ManifestWebDesign/angular-gridster@0.13.9",
-    "angular-motion": "github:mgcrea/angular-motion@0.4.4",
-    "angular-nvd3": "github:krispo/angular-nvd3@1.0.7",
-    "angular-retina": "github:jrief/angular-retina@0.3.8",
-    "angular-sanitize": "github:angular/bower-angular-sanitize@1.5.5",
-    "angular-smart-table": "github:lorenzofox3/Smart-Table@2.1.8",
-    "angular-socket-io": "github:btford/angular-socket-io@0.7.0",
-    "angular-strap": "github:mgcrea/angular-strap@2.3.8",
-    "angular-tree-control": "github:wix/angular-tree-control@0.2.26",
-    "angular-ui-grid": "github:angular-ui/bower-ui-grid@3.1.1",
-    "angular-ui-router": "github:angular-ui/ui-router@0.2.18",
-    "angular-ui-router-metatags": "github:tinusn/ui-router-metatags@1.0.3",
-    "babel": "npm:babel-core@5.8.38",
-    "babel-runtime": "npm:babel-runtime@5.8.38",
-    "blob": "github:eligrey/Blob.js@master",
-    "bootstrap-carousel": "github:twbs/bootstrap@3.3.6",
-    "clean-css": "npm:clean-css@3.4.12",
-    "core-js": "npm:core-js@1.2.6",
-    "css": "github:systemjs/plugin-css@0.1.21",
-    "file-saver": "github:eligrey/FileSaver.js@master",
-    "font-awesome": "npm:font-awesome@4.5.0",
-    "jade": "github:johnsoftek/plugin-jade@0.6.3",
-    "jquery": "github:components/jquery@2.2.1",
-    "json": "github:systemjs/plugin-json@0.1.2",
-    "jszip": "github:Stuk/jszip@2.6.0",
-    "lodash": "github:lodash/lodash@4.13.0",
-    "pdfmake": "github:bpampuch/pdfmake@0.1.20",
-    "query-command-supported": "github:zenorocha/document.queryCommandSupported@1.0.0",
-    "socket.io-client": "github:socketio/socket.io-client@1.4.5",
-    "text": "github:systemjs/plugin-text@0.0.7",
-    "github:angular-ui/bower-ui-grid@3.1.1": {
-      "pdfmake": "github:bpampuch/pdfmake@0.1.20"
-    },
-    "github:angular-ui/ui-router@0.2.18": {
-      "angular": "github:angular/bower-angular@1.5.5"
-    },
-    "github:angular/bower-angular-animate@1.5.5": {
-      "angular": "github:angular/bower-angular@1.5.5"
-    },
-    "github:angular/bower-angular-sanitize@1.5.5": {
-      "angular": "github:angular/bower-angular@1.5.5"
-    },
-    "github:angular/bower-angular@1.5.5": {
-      "jquery": "github:components/jquery@2.2.1"
-    },
-    "github:btford/angular-socket-io@0.7.0": {
-      "socket.io-client": "github:socketio/socket.io-client@1.4.5"
-    },
-    "github:eligrey/FileSaver.js@master": {
-      "blob": "github:eligrey/Blob.js@master"
-    },
-    "github:johnsoftek/plugin-jade@0.6.3": {
-      "jade-compiler": "npm:jade@1.11.0"
-    },
-    "github:jspm/nodelibs-assert@0.1.0": {
-      "assert": "npm:assert@1.4.0"
-    },
-    "github:jspm/nodelibs-buffer@0.1.0": {
-      "buffer": "npm:buffer@3.6.0"
-    },
-    "github:jspm/nodelibs-events@0.1.1": {
-      "events": "npm:events@1.0.2"
-    },
-    "github:jspm/nodelibs-http@1.7.1": {
-      "Base64": "npm:Base64@0.2.1",
-      "events": "github:jspm/nodelibs-events@0.1.1",
-      "inherits": "npm:inherits@2.0.1",
-      "stream": "github:jspm/nodelibs-stream@0.1.0",
-      "url": "github:jspm/nodelibs-url@0.1.0",
-      "util": "github:jspm/nodelibs-util@0.1.0"
-    },
-    "github:jspm/nodelibs-https@0.1.0": {
-      "https-browserify": "npm:https-browserify@0.0.0"
-    },
-    "github:jspm/nodelibs-os@0.1.0": {
-      "os-browserify": "npm:os-browserify@0.1.2"
-    },
-    "github:jspm/nodelibs-path@0.1.0": {
-      "path-browserify": "npm:path-browserify@0.0.0"
-    },
-    "github:jspm/nodelibs-process@0.1.2": {
-      "process": "npm:process@0.11.3"
-    },
-    "github:jspm/nodelibs-stream@0.1.0": {
-      "stream-browserify": "npm:stream-browserify@1.0.0"
-    },
-    "github:jspm/nodelibs-tty@0.1.0": {
-      "tty-browserify": "npm:tty-browserify@0.0.0"
-    },
-    "github:jspm/nodelibs-url@0.1.0": {
-      "url": "npm:url@0.10.3"
-    },
-    "github:jspm/nodelibs-util@0.1.0": {
-      "util": "npm:util@0.10.3"
-    },
-    "github:jspm/nodelibs-vm@0.1.0": {
-      "vm-browserify": "npm:vm-browserify@0.0.4"
-    },
-    "github:krispo/angular-nvd3@1.0.7": {
-      "d3": "npm:d3@3.5.14",
-      "nvd3": "npm:nvd3@1.8.1"
-    },
-    "github:mgcrea/angular-motion@0.4.4": {
-      "angular": "github:angular/bower-angular@1.5.5",
-      "css": "github:systemjs/plugin-css@0.1.21"
-    },
-    "github:mgcrea/angular-strap@2.3.8": {
-      "angular": "github:angular/bower-angular@1.5.5",
-      "angular-animate": "github:angular/bower-angular-animate@1.5.5",
-      "angular-motion": "github:mgcrea/angular-motion@0.4.4",
-      "angular-sanitize": "github:angular/bower-angular-sanitize@1.5.5"
-    },
-    "github:twbs/bootstrap@3.3.6": {
-      "jquery": "npm:jquery@2.2.4"
-    },
-    "npm:acorn-globals@1.0.9": {
-      "acorn": "npm:acorn@2.7.0"
-    },
-    "npm:acorn@1.2.2": {
-      "fs": "github:jspm/nodelibs-fs@0.1.2",
-      "path": "github:jspm/nodelibs-path@0.1.0",
-      "process": "github:jspm/nodelibs-process@0.1.2",
-      "stream": "github:jspm/nodelibs-stream@0.1.0"
-    },
-    "npm:acorn@2.7.0": {
-      "fs": "github:jspm/nodelibs-fs@0.1.2",
-      "path": "github:jspm/nodelibs-path@0.1.0",
-      "process": "github:jspm/nodelibs-process@0.1.2",
-      "stream": "github:jspm/nodelibs-stream@0.1.0"
-    },
-    "npm:align-text@0.1.4": {
-      "kind-of": "npm:kind-of@3.0.3",
-      "longest": "npm:longest@1.0.1",
-      "repeat-string": "npm:repeat-string@1.5.4"
-    },
-    "npm:amdefine@1.0.0": {
-      "fs": "github:jspm/nodelibs-fs@0.1.2",
-      "module": "github:jspm/nodelibs-module@0.1.0",
-      "path": "github:jspm/nodelibs-path@0.1.0",
-      "process": "github:jspm/nodelibs-process@0.1.2"
-    },
-    "npm:asap@1.0.0": {
-      "process": "github:jspm/nodelibs-process@0.1.2"
-    },
-    "npm:assert@1.4.0": {
-      "assert": "github:jspm/nodelibs-assert@0.1.0",
-      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
-      "buffer-shims": "npm:buffer-shims@1.0.0",
-      "process": "github:jspm/nodelibs-process@0.1.2",
-      "util": "npm:util@0.10.3"
-    },
-    "npm:async@0.2.10": {
-      "process": "github:jspm/nodelibs-process@0.1.2"
-    },
-    "npm:babel-runtime@5.8.38": {
-      "process": "github:jspm/nodelibs-process@0.1.2"
-    },
-    "npm:buffer-shims@1.0.0": {
-      "buffer": "github:jspm/nodelibs-buffer@0.1.0"
-    },
-    "npm:buffer@3.6.0": {
-      "base64-js": "npm:base64-js@0.0.8",
-      "child_process": "github:jspm/nodelibs-child_process@0.1.0",
-      "fs": "github:jspm/nodelibs-fs@0.1.2",
-      "ieee754": "npm:ieee754@1.1.6",
-      "isarray": "npm:isarray@1.0.0",
-      "process": "github:jspm/nodelibs-process@0.1.2"
-    },
-    "npm:center-align@0.1.3": {
-      "align-text": "npm:align-text@0.1.4",
-      "lazy-cache": "npm:lazy-cache@1.0.4"
-    },
-    "npm:clean-css@3.4.12": {
-      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
-      "commander": "npm:commander@2.8.1",
-      "fs": "github:jspm/nodelibs-fs@0.1.2",
-      "http": "github:jspm/nodelibs-http@1.7.1",
-      "https": "github:jspm/nodelibs-https@0.1.0",
-      "os": "github:jspm/nodelibs-os@0.1.0",
-      "path": "github:jspm/nodelibs-path@0.1.0",
-      "process": "github:jspm/nodelibs-process@0.1.2",
-      "source-map": "npm:source-map@0.4.4",
-      "url": "github:jspm/nodelibs-url@0.1.0",
-      "util": "github:jspm/nodelibs-util@0.1.0"
-    },
-    "npm:cliui@2.1.0": {
-      "center-align": "npm:center-align@0.1.3",
-      "right-align": "npm:right-align@0.1.3",
-      "wordwrap": "npm:wordwrap@0.0.2"
-    },
-    "npm:commander@2.6.0": {
-      "child_process": "github:jspm/nodelibs-child_process@0.1.0",
-      "events": "github:jspm/nodelibs-events@0.1.1",
-      "path": "github:jspm/nodelibs-path@0.1.0",
-      "process": "github:jspm/nodelibs-process@0.1.2"
-    },
-    "npm:commander@2.8.1": {
-      "child_process": "github:jspm/nodelibs-child_process@0.1.0",
-      "events": "github:jspm/nodelibs-events@0.1.1",
-      "fs": "github:jspm/nodelibs-fs@0.1.2",
-      "graceful-readlink": "npm:graceful-readlink@1.0.1",
-      "path": "github:jspm/nodelibs-path@0.1.0",
-      "process": "github:jspm/nodelibs-process@0.1.2"
-    },
-    "npm:constantinople@3.0.2": {
-      "acorn": "npm:acorn@2.7.0"
-    },
-    "npm:core-js@1.2.6": {
-      "fs": "github:jspm/nodelibs-fs@0.1.2",
-      "path": "github:jspm/nodelibs-path@0.1.0",
-      "process": "github:jspm/nodelibs-process@0.1.2",
-      "systemjs-json": "github:systemjs/plugin-json@0.1.2"
-    },
-    "npm:core-util-is@1.0.2": {
-      "buffer": "github:jspm/nodelibs-buffer@0.1.0"
-    },
-    "npm:css@1.0.8": {
-      "assert": "github:jspm/nodelibs-assert@0.1.0",
-      "css-parse": "npm:css-parse@1.0.4",
-      "css-stringify": "npm:css-stringify@1.0.5",
-      "fs": "github:jspm/nodelibs-fs@0.1.2",
-      "process": "github:jspm/nodelibs-process@0.1.2"
-    },
-    "npm:font-awesome@4.5.0": {
-      "css": "github:systemjs/plugin-css@0.1.21"
-    },
-    "npm:graceful-readlink@1.0.1": {
-      "fs": "github:jspm/nodelibs-fs@0.1.2"
-    },
-    "npm:https-browserify@0.0.0": {
-      "http": "github:jspm/nodelibs-http@1.7.1"
-    },
-    "npm:inherits@2.0.1": {
-      "util": "github:jspm/nodelibs-util@0.1.0"
-    },
-    "npm:is-buffer@1.1.3": {
-      "buffer": "github:jspm/nodelibs-buffer@0.1.0"
-    },
-    "npm:isarray@1.0.0": {
-      "systemjs-json": "github:systemjs/plugin-json@0.1.2"
-    },
-    "npm:jade@1.11.0": {
-      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
-      "character-parser": "npm:character-parser@1.2.1",
-      "clean-css": "npm:clean-css@3.4.12",
-      "commander": "npm:commander@2.6.0",
-      "constantinople": "npm:constantinople@3.0.2",
-      "jstransformer": "npm:jstransformer@0.0.2",
-      "mkdirp": "npm:mkdirp@0.5.1",
-      "path": "github:jspm/nodelibs-path@0.1.0",
-      "process": "github:jspm/nodelibs-process@0.1.2",
-      "systemjs-json": "github:systemjs/plugin-json@0.1.2",
-      "transformers": "npm:transformers@2.1.0",
-      "uglify-js": "npm:uglify-js@2.6.2",
-      "void-elements": "npm:void-elements@2.0.1",
-      "with": "npm:with@4.0.3"
-    },
-    "npm:jstransformer@0.0.2": {
-      "assert": "github:jspm/nodelibs-assert@0.1.0",
-      "fs": "github:jspm/nodelibs-fs@0.1.2",
-      "is-promise": "npm:is-promise@2.1.0",
-      "promise": "npm:promise@6.1.0"
-    },
-    "npm:kind-of@3.0.3": {
-      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
-      "is-buffer": "npm:is-buffer@1.1.3"
-    },
-    "npm:lazy-cache@1.0.4": {
-      "process": "github:jspm/nodelibs-process@0.1.2"
-    },
-    "npm:mkdirp@0.5.1": {
-      "fs": "github:jspm/nodelibs-fs@0.1.2",
-      "minimist": "npm:minimist@0.0.8",
-      "path": "github:jspm/nodelibs-path@0.1.0",
-      "process": "github:jspm/nodelibs-process@0.1.2"
-    },
-    "npm:nvd3@1.8.1": {
-      "d3": "npm:d3@3.5.14"
-    },
-    "npm:optimist@0.3.7": {
-      "path": "github:jspm/nodelibs-path@0.1.0",
-      "process": "github:jspm/nodelibs-process@0.1.2",
-      "wordwrap": "npm:wordwrap@0.0.2"
-    },
-    "npm:os-browserify@0.1.2": {
-      "os": "github:jspm/nodelibs-os@0.1.0"
-    },
-    "npm:path-browserify@0.0.0": {
-      "process": "github:jspm/nodelibs-process@0.1.2"
-    },
-    "npm:process@0.11.3": {
-      "assert": "github:jspm/nodelibs-assert@0.1.0"
-    },
-    "npm:promise@2.0.0": {
-      "is-promise": "npm:is-promise@1.0.1",
-      "process": "github:jspm/nodelibs-process@0.1.2"
-    },
-    "npm:promise@6.1.0": {
-      "asap": "npm:asap@1.0.0"
-    },
-    "npm:punycode@1.3.2": {
-      "process": "github:jspm/nodelibs-process@0.1.2"
-    },
-    "npm:readable-stream@1.1.14": {
-      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
-      "core-util-is": "npm:core-util-is@1.0.2",
-      "events": "github:jspm/nodelibs-events@0.1.1",
-      "inherits": "npm:inherits@2.0.1",
-      "isarray": "npm:isarray@0.0.1",
-      "process": "github:jspm/nodelibs-process@0.1.2",
-      "stream-browserify": "npm:stream-browserify@1.0.0",
-      "string_decoder": "npm:string_decoder@0.10.31"
-    },
-    "npm:right-align@0.1.3": {
-      "align-text": "npm:align-text@0.1.4"
-    },
-    "npm:source-map@0.1.43": {
-      "amdefine": "npm:amdefine@1.0.0",
-      "fs": "github:jspm/nodelibs-fs@0.1.2",
-      "path": "github:jspm/nodelibs-path@0.1.0",
-      "process": "github:jspm/nodelibs-process@0.1.2"
-    },
-    "npm:source-map@0.4.4": {
-      "amdefine": "npm:amdefine@1.0.0",
-      "process": "github:jspm/nodelibs-process@0.1.2"
-    },
-    "npm:source-map@0.5.6": {
-      "process": "github:jspm/nodelibs-process@0.1.2"
-    },
-    "npm:stream-browserify@1.0.0": {
-      "events": "github:jspm/nodelibs-events@0.1.1",
-      "inherits": "npm:inherits@2.0.1",
-      "readable-stream": "npm:readable-stream@1.1.14"
-    },
-    "npm:string_decoder@0.10.31": {
-      "buffer": "github:jspm/nodelibs-buffer@0.1.0"
-    },
-    "npm:transformers@2.1.0": {
-      "css": "npm:css@1.0.8",
-      "fs": "github:jspm/nodelibs-fs@0.1.2",
-      "path": "github:jspm/nodelibs-path@0.1.0",
-      "process": "github:jspm/nodelibs-process@0.1.2",
-      "promise": "npm:promise@2.0.0",
-      "uglify-js": "npm:uglify-js@2.2.5",
-      "vm": "github:jspm/nodelibs-vm@0.1.0"
-    },
-    "npm:uglify-js@2.2.5": {
-      "fs": "github:jspm/nodelibs-fs@0.1.2",
-      "optimist": "npm:optimist@0.3.7",
-      "path": "github:jspm/nodelibs-path@0.1.0",
-      "process": "github:jspm/nodelibs-process@0.1.2",
-      "source-map": "npm:source-map@0.1.43",
-      "util": "github:jspm/nodelibs-util@0.1.0",
-      "vm": "github:jspm/nodelibs-vm@0.1.0"
-    },
-    "npm:uglify-js@2.6.2": {
-      "async": "npm:async@0.2.10",
-      "fs": "github:jspm/nodelibs-fs@0.1.2",
-      "path": "github:jspm/nodelibs-path@0.1.0",
-      "process": "github:jspm/nodelibs-process@0.1.2",
-      "source-map": "npm:source-map@0.5.6",
-      "uglify-to-browserify": "npm:uglify-to-browserify@1.0.2",
-      "yargs": "npm:yargs@3.10.0"
-    },
-    "npm:uglify-to-browserify@1.0.2": {
-      "fs": "github:jspm/nodelibs-fs@0.1.2",
-      "stream": "github:jspm/nodelibs-stream@0.1.0"
-    },
-    "npm:url@0.10.3": {
-      "assert": "github:jspm/nodelibs-assert@0.1.0",
-      "punycode": "npm:punycode@1.3.2",
-      "querystring": "npm:querystring@0.2.0",
-      "util": "github:jspm/nodelibs-util@0.1.0"
-    },
-    "npm:util@0.10.3": {
-      "inherits": "npm:inherits@2.0.1",
-      "process": "github:jspm/nodelibs-process@0.1.2"
-    },
-    "npm:vm-browserify@0.0.4": {
-      "indexof": "npm:indexof@0.0.1"
-    },
-    "npm:void-elements@2.0.1": {
-      "http": "github:jspm/nodelibs-http@1.7.1"
-    },
-    "npm:window-size@0.1.0": {
-      "process": "github:jspm/nodelibs-process@0.1.2",
-      "tty": "github:jspm/nodelibs-tty@0.1.0"
-    },
-    "npm:with@4.0.3": {
-      "acorn": "npm:acorn@1.2.2",
-      "acorn-globals": "npm:acorn-globals@1.0.9"
-    },
-    "npm:yargs@3.10.0": {
-      "assert": "github:jspm/nodelibs-assert@0.1.0",
-      "camelcase": "npm:camelcase@1.2.1",
-      "cliui": "npm:cliui@2.1.0",
-      "decamelize": "npm:decamelize@1.2.0",
-      "fs": "github:jspm/nodelibs-fs@0.1.2",
-      "path": "github:jspm/nodelibs-path@0.1.0",
-      "process": "github:jspm/nodelibs-process@0.1.2",
-      "window-size": "npm:window-size@0.1.0"
-    }
-  }
-});

http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/controllers/admin-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/controllers/admin-controller.js b/modules/web-console/src/main/js/controllers/admin-controller.js
index f46bab0..9e5aea7 100644
--- a/modules/web-console/src/main/js/controllers/admin-controller.js
+++ b/modules/web-console/src/main/js/controllers/admin-controller.js
@@ -16,11 +16,9 @@
  */
 
 // Controller for Admin screen.
-import consoleModule from 'controllers/common-module';
-
-consoleModule.controller('adminController', [
-    '$rootScope', '$scope', '$http', '$q', '$common', '$confirm', '$state', 'User', 'IgniteCountries',
-    ($rootScope, $scope, $http, $q, $common, $confirm, $state, User, Countries) => {
+export default ['adminController', [
+    '$rootScope', '$scope', '$http', '$q', '$state', 'IgniteMessages', 'IgniteConfirm', 'User', 'IgniteCountries',
+    ($rootScope, $scope, $http, $q, $state, Messages, Confirm, User, Countries) => {
         $scope.users = null;
 
         const _reloadUsers = () => {
@@ -35,7 +33,7 @@ consoleModule.controller('adminController', [
                             (user.company || '') + ' ' + (user.countryCode || '');
                     });
                 })
-                .catch((err) => $common.showError(err));
+                .catch(Messages.showError);
         };
 
         _reloadUsers();
@@ -48,11 +46,11 @@ consoleModule.controller('adminController', [
 
                     $state.go('base.configuration.clusters');
                 })
-                .catch((errMsg) => $common.showError($common.errorMessage(errMsg)));
+                .catch(Messages.showError);
         };
 
         $scope.removeUser = (user) => {
-            $confirm.confirm('Are you sure you want to remove user: "' + user.userName + '"?')
+            Confirm.confirm('Are you sure you want to remove user: "' + user.userName + '"?')
                 .then(() => {
                     $http.post('/api/v1/admin/remove', {userId: user._id})
                         .success(() => {
@@ -61,13 +59,13 @@ consoleModule.controller('adminController', [
                             if (i >= 0)
                                 $scope.users.splice(i, 1);
 
-                            $common.showInfo('User has been removed: "' + user.userName + '"');
+                            Messages.showInfo('User has been removed: "' + user.userName + '"');
                         })
-                        .error((errMsg, status) => {
+                        .error((err, status) => {
                             if (status === 503)
-                                $common.showInfo(errMsg);
+                                Messages.showInfo(err);
                             else
-                                $common.showError('Failed to remove user: "' + $common.errorMessage(errMsg) + '"');
+                                Messages.showError(Messages.errorMessage('Failed to remove user: ', err));
                         });
                 });
         };
@@ -82,11 +80,12 @@ consoleModule.controller('adminController', [
                 .success(() => {
                     user.admin = !user.admin;
 
-                    $common.showInfo('Admin right was successfully toggled for user: "' + user.userName + '"');
-                }).error((err) => {
-                    $common.showError('Failed to toggle admin right for user: "' + $common.errorMessage(err) + '"');
+                    Messages.showInfo('Admin right was successfully toggled for user: "' + user.userName + '"');
+                })
+                .error((err) => {
+                    Messages.showError(Messages.errorMessage('Failed to toggle admin right for user: ', err));
                 })
                 .finally(() => user.adminChanging = false);
         };
-    }]
-);
+    }
+]];

http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/controllers/caches-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/controllers/caches-controller.js b/modules/web-console/src/main/js/controllers/caches-controller.js
index ac4d951..cbd681e 100644
--- a/modules/web-console/src/main/js/controllers/caches-controller.js
+++ b/modules/web-console/src/main/js/controllers/caches-controller.js
@@ -16,12 +16,10 @@
  */
 
 // Controller for Caches screen.
-import consoleModule from 'controllers/common-module';
-
-consoleModule.controller('cachesController', [
-    '$scope', '$http', '$state', '$filter', '$timeout', '$common', '$confirm', '$clone', '$loading', '$cleanup', '$unsavedChangesGuard',
-    function($scope, $http, $state, $filter, $timeout, $common, $confirm, $clone, $loading, $cleanup, $unsavedChangesGuard) {
-        $unsavedChangesGuard.install($scope);
+export default ['cachesController', [
+    '$scope', '$http', '$state', '$filter', '$timeout', 'IgniteLegacyUtils', 'IgniteMessages', 'IgniteConfirm', 'IgniteClone', 'IgniteLoading', 'IgniteModelNormalizer', 'IgniteUnsavedChangesGuard',
+    function($scope, $http, $state, $filter, $timeout, LegacyUtils, Messages, Confirm, Clone, Loading, ModelNormalizer, UnsavedChangesGuard) {
+        UnsavedChangesGuard.install($scope);
 
         const emptyCache = {empty: true};
 
@@ -36,15 +34,15 @@ consoleModule.controller('cachesController', [
         // We need to initialize backupItem with empty object in order to properly used from angular directives.
         $scope.backupItem = emptyCache;
 
-        $scope.ui = $common.formUI();
+        $scope.ui = LegacyUtils.formUI();
         $scope.ui.activePanels = [0];
         $scope.ui.topPanels = [0, 1, 2, 3];
 
-        $scope.hidePopover = $common.hidePopover;
-        $scope.saveBtnTipText = $common.saveBtnTipText;
-        $scope.widthIsSufficient = $common.widthIsSufficient;
+        $scope.hidePopover = LegacyUtils.hidePopover;
+        $scope.saveBtnTipText = LegacyUtils.saveBtnTipText;
+        $scope.widthIsSufficient = LegacyUtils.widthIsSufficient;
 
-        const showPopoverMessage = $common.showPopoverMessage;
+        const showPopoverMessage = LegacyUtils.showPopoverMessage;
 
         $scope.contentVisible = function() {
             const item = $scope.backupItem;
@@ -55,7 +53,7 @@ consoleModule.controller('cachesController', [
         $scope.toggleExpanded = function() {
             $scope.ui.expanded = !$scope.ui.expanded;
 
-            $common.hidePopover();
+            LegacyUtils.hidePopover();
         };
 
         $scope.caches = [];
@@ -79,7 +77,7 @@ consoleModule.controller('cachesController', [
             }, []);
         }
 
-        $loading.start('loadingCachesScreen');
+        Loading.start('loadingCachesScreen');
 
         // When landing on the page, get caches and show them.
         $http.post('/api/v1/configuration/caches/list')
@@ -131,32 +129,33 @@ consoleModule.controller('cachesController', [
                 }
 
                 $scope.$watch('ui.inputForm.$valid', function(valid) {
-                    if (valid && _.isEqual(__original_value, $cleanup($scope.backupItem)))
+                    if (valid && ModelNormalizer.isEqual(__original_value, $scope.backupItem))
                         $scope.ui.inputForm.$dirty = false;
                 });
 
                 $scope.$watch('backupItem', function(val) {
                     const form = $scope.ui.inputForm;
 
-                    if (form.$pristine || (form.$valid && _.isEqual(__original_value, $cleanup(val))))
+                    if (form.$pristine || (form.$valid && ModelNormalizer.isEqual(__original_value, val)))
                         form.$setPristine();
                     else
                         form.$setDirty();
                 }, true);
             })
-            .catch(function(errMsg) {
-                $common.showError(errMsg);
-            })
+            .catch(Messages.showError)
             .finally(function() {
                 $scope.ui.ready = true;
                 $scope.ui.inputForm.$setPristine();
-                $loading.finish('loadingCachesScreen');
+                Loading.finish('loadingCachesScreen');
             });
 
         $scope.selectItem = function(item, backup) {
             function selectItem() {
                 $scope.selectedItem = item;
 
+                if (item && !_.get(item.cacheStoreFactory.CacheJdbcBlobStoreFactory, 'connectVia'))
+                    _.set(item.cacheStoreFactory, 'CacheJdbcBlobStoreFactory.connectVia', 'DataSource');
+
                 try {
                     if (item && item._id)
                         sessionStorage.lastSelectedCache = angular.toJson(item._id);
@@ -176,13 +175,13 @@ consoleModule.controller('cachesController', [
 
                 $scope.backupItem = angular.merge({}, blank, $scope.backupItem);
 
-                __original_value = $cleanup($scope.backupItem);
+                __original_value = ModelNormalizer.normalize($scope.backupItem);
 
-                if ($common.getQueryVariable('new'))
+                if (LegacyUtils.getQueryVariable('new'))
                     $state.go('base.configuration.caches');
             }
 
-            $common.confirmUnsavedChanges($scope.backupItem && $scope.ui.inputForm.$dirty, selectItem);
+            LegacyUtils.confirmUnsavedChanges($scope.backupItem && $scope.ui.inputForm.$dirty, selectItem);
         };
 
         $scope.linkId = () => $scope.backupItem._id ? $scope.backupItem._id : 'create';
@@ -203,7 +202,7 @@ consoleModule.controller('cachesController', [
 
         // Add new cache.
         $scope.createItem = function(linkId) {
-            $timeout(() => $common.ensureActivePanel($scope.ui, 'general', 'cacheName'));
+            $timeout(() => LegacyUtils.ensureActivePanel($scope.ui, 'general', 'cacheName'));
 
             $scope.selectItem(null, prepareNewItem(linkId));
         };
@@ -229,7 +228,7 @@ consoleModule.controller('cachesController', [
             const failCluster = _.find(clusters, (cluster) => {
                 const caches = clusterCaches(cluster);
 
-                checkRes = $common.checkCachesDataSources(caches, $scope.backupItem);
+                checkRes = LegacyUtils.checkCachesDataSources(caches, $scope.backupItem);
 
                 return !checkRes.checked;
             });
@@ -238,8 +237,8 @@ consoleModule.controller('cachesController', [
                 return showPopoverMessage($scope.ui, 'store', checkRes.firstCache.cacheStoreFactory.kind === 'CacheJdbcPojoStoreFactory' ? 'pojoDialect' : 'blobDialect',
                     'Found cache "' + checkRes.secondCache.name + '" in cluster "' + failCluster.label + '" ' +
                     'with the same data source bean name "' + checkRes.firstCache.cacheStoreFactory[checkRes.firstCache.cacheStoreFactory.kind].dataSourceBean +
-                    '" and different database: "' + $common.cacheStoreJdbcDialectsLabel(checkRes.firstDB) + '" in current cache and "' +
-                    $common.cacheStoreJdbcDialectsLabel(checkRes.secondDB) + '" in "' + checkRes.secondCache.name + '"', 10000);
+                    '" and different database: "' + LegacyUtils.cacheStoreJdbcDialectsLabel(checkRes.firstDB) + '" in current cache and "' +
+                    LegacyUtils.cacheStoreJdbcDialectsLabel(checkRes.secondDB) + '" in "' + checkRes.secondCache.name + '"', 10000);
             }
 
             return true;
@@ -253,7 +252,7 @@ consoleModule.controller('cachesController', [
             const failCluster = _.find(clusters, (cluster) => {
                 const caches = clusterCaches(cluster);
 
-                checkRes = $common.checkCacheSQLSchemas(caches, $scope.backupItem);
+                checkRes = LegacyUtils.checkCacheSQLSchemas(caches, $scope.backupItem);
 
                 return !checkRes.checked;
             });
@@ -268,7 +267,7 @@ consoleModule.controller('cachesController', [
         }
 
         function checkStoreFactoryBean(storeFactory, beanFieldId) {
-            if (!$common.isValidJavaIdentifier('Data source bean', storeFactory.dataSourceBean, beanFieldId, $scope.ui, 'store'))
+            if (!LegacyUtils.isValidJavaIdentifier('Data source bean', storeFactory.dataSourceBean, beanFieldId, $scope.ui, 'store'))
                 return false;
 
             return checkDataSources();
@@ -302,21 +301,21 @@ consoleModule.controller('cachesController', [
 
         // Check cache logical consistency.
         function validate(item) {
-            $common.hidePopover();
+            LegacyUtils.hidePopover();
 
-            if ($common.isEmptyString(item.name))
+            if (LegacyUtils.isEmptyString(item.name))
                 return showPopoverMessage($scope.ui, 'general', 'cacheName', 'Cache name should not be empty!');
 
-            if (item.memoryMode === 'ONHEAP_TIERED' && item.offHeapMaxMemory > 0 && !$common.isDefined(item.evictionPolicy.kind))
+            if (item.memoryMode === 'ONHEAP_TIERED' && item.offHeapMaxMemory > 0 && !LegacyUtils.isDefined(item.evictionPolicy.kind))
                 return showPopoverMessage($scope.ui, 'memory', 'evictionPolicyKind', 'Eviction policy should not be configured!');
 
-            if (!$common.checkFieldValidators($scope.ui))
+            if (!LegacyUtils.checkFieldValidators($scope.ui))
                 return false;
 
             if (item.memoryMode === 'OFFHEAP_VALUES' && !_.isEmpty(item.domains))
                 return showPopoverMessage($scope.ui, 'memory', 'memoryMode', 'Query indexing could not be enabled while values are stored off-heap!');
 
-            if (item.memoryMode === 'OFFHEAP_TIERED' && (!$common.isDefined(item.offHeapMaxMemory) || item.offHeapMaxMemory < 0))
+            if (item.memoryMode === 'OFFHEAP_TIERED' && (!LegacyUtils.isDefined(item.offHeapMaxMemory) || item.offHeapMaxMemory < 0))
                 return showPopoverMessage($scope.ui, 'memory', 'offHeapMaxMemory', 'Off-heap max memory should be specified!');
 
             if (!checkSQLSchemas())
@@ -366,18 +365,16 @@ consoleModule.controller('cachesController', [
 
                     $scope.selectItem(item);
 
-                    $common.showInfo('Cache "' + item.name + '" saved.');
+                    Messages.showInfo('Cache "' + item.name + '" saved.');
                 })
-                .error(function(errMsg) {
-                    $common.showError(errMsg);
-                });
+                .error(Messages.showError);
         }
 
         // Save cache.
         $scope.saveItem = function() {
             const item = $scope.backupItem;
 
-            angular.extend(item, $common.autoCacheStoreConfiguration(item, cacheDomains(item)));
+            angular.extend(item, LegacyUtils.autoCacheStoreConfiguration(item, cacheDomains(item)));
 
             if (validate(item))
                 save(item);
@@ -392,7 +389,7 @@ consoleModule.controller('cachesController', [
         // Clone cache with new name.
         $scope.cloneItem = function() {
             if (validate($scope.backupItem)) {
-                $clone.confirm($scope.backupItem.name, _cacheNames()).then(function(newName) {
+                Clone.confirm($scope.backupItem.name, _cacheNames()).then(function(newName) {
                     const item = angular.copy($scope.backupItem);
 
                     delete item._id;
@@ -410,13 +407,13 @@ consoleModule.controller('cachesController', [
         $scope.removeItem = function() {
             const selectedItem = $scope.selectedItem;
 
-            $confirm.confirm('Are you sure you want to remove cache: "' + selectedItem.name + '"?')
+            Confirm.confirm('Are you sure you want to remove cache: "' + selectedItem.name + '"?')
                 .then(function() {
                     const _id = selectedItem._id;
 
                     $http.post('/api/v1/configuration/caches/remove', {_id})
                         .success(function() {
-                            $common.showInfo('Cache has been removed: ' + selectedItem.name);
+                            Messages.showInfo('Cache has been removed: ' + selectedItem.name);
 
                             const caches = $scope.caches;
 
@@ -438,19 +435,17 @@ consoleModule.controller('cachesController', [
                                 _.forEach($scope.domains, (domain) => _.remove(domain.meta.caches, (id) => id === _id));
                             }
                         })
-                        .error(function(errMsg) {
-                            $common.showError(errMsg);
-                        });
+                        .error(Messages.showError);
                 });
         };
 
         // Remove all caches from db.
         $scope.removeAllItems = function() {
-            $confirm.confirm('Are you sure you want to remove all caches?')
+            Confirm.confirm('Are you sure you want to remove all caches?')
                 .then(function() {
                     $http.post('/api/v1/configuration/caches/remove/all')
                         .success(function() {
-                            $common.showInfo('All caches have been removed');
+                            Messages.showInfo('All caches have been removed');
 
                             $scope.caches = [];
 
@@ -460,18 +455,16 @@ consoleModule.controller('cachesController', [
                             $scope.backupItem = emptyCache;
                             $scope.ui.inputForm.$setPristine();
                         })
-                        .error(function(errMsg) {
-                            $common.showError(errMsg);
-                        });
+                        .error(Messages.showError);
                 });
         };
 
         $scope.resetAll = function() {
-            $confirm.confirm('Are you sure you want to undo all changes for current cache?')
+            Confirm.confirm('Are you sure you want to undo all changes for current cache?')
                 .then(function() {
                     $scope.backupItem = $scope.selectedItem ? angular.copy($scope.selectedItem) : prepareNewItem();
                     $scope.ui.inputForm.$setPristine();
                 });
         };
-    }]
-);
+    }
+]];

http://git-wip-us.apache.org/repos/asf/ignite/blob/c38b3ba2/modules/web-console/src/main/js/controllers/clusters-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/controllers/clusters-controller.js b/modules/web-console/src/main/js/controllers/clusters-controller.js
index 3277397..5f86d08 100644
--- a/modules/web-console/src/main/js/controllers/clusters-controller.js
+++ b/modules/web-console/src/main/js/controllers/clusters-controller.js
@@ -16,12 +16,10 @@
  */
 
 // Controller for Clusters screen.
-import consoleModule from 'controllers/common-module';
-
-consoleModule.controller('clustersController', [
-    '$rootScope', '$scope', '$http', '$state', '$timeout', '$common', '$confirm', '$clone', '$loading', '$cleanup', '$unsavedChangesGuard', 'igniteEventGroups', 'DemoInfo', '$table',
-    function($root, $scope, $http, $state, $timeout, $common, $confirm, $clone, $loading, $cleanup, $unsavedChangesGuard, igniteEventGroups, DemoInfo, $table) {
-        $unsavedChangesGuard.install($scope);
+export default ['clustersController', [
+    '$rootScope', '$scope', '$http', '$state', '$timeout', 'IgniteLegacyUtils', 'IgniteMessages', 'IgniteConfirm', 'IgniteClone', 'IgniteLoading', 'IgniteModelNormalizer', 'IgniteUnsavedChangesGuard', 'igniteEventGroups', 'DemoInfo', 'IgniteLegacyTable',
+    function($root, $scope, $http, $state, $timeout, LegacyUtils, Messages, Confirm, Clone, Loading, ModelNormalizer, UnsavedChangesGuard, igniteEventGroups, DemoInfo, LegacyTable) {
+        UnsavedChangesGuard.install($scope);
 
         const emptyCluster = {empty: true};
 
@@ -45,24 +43,24 @@ consoleModule.controller('clustersController', [
             'collision.JobStealing.stealingAttributes': {id: 'CAttribute', idPrefix: 'Key', searchCol: 'name', valueCol: 'key', dupObjName: 'name', group: 'collision'}
         };
 
-        const showPopoverMessage = $common.showPopoverMessage;
+        const showPopoverMessage = LegacyUtils.showPopoverMessage;
 
         $scope.tablePairValid = function(item, field, index) {
             const pairField = pairFields[field.model];
 
-            const pairValue = $table.tablePairValue(field, index);
+            const pairValue = LegacyTable.tablePairValue(field, index);
 
             if (pairField) {
                 const model = _.get(item, field.model);
 
-                if ($common.isDefined(model)) {
+                if (LegacyUtils.isDefined(model)) {
                     const idx = _.findIndex(model, (pair) => {
                         return pair[pairField.searchCol] === pairValue[pairField.valueCol];
                     });
 
                     // Found duplicate by key.
                     if (idx >= 0 && idx !== index)
-                        return showPopoverMessage($scope.ui, pairField.group, $table.tableFieldId(index, pairField.idPrefix + pairField.id), 'Attribute with such ' + pairField.dupObjName + ' already exists!');
+                        return showPopoverMessage($scope.ui, pairField.group, LegacyTable.tableFieldId(index, pairField.idPrefix + pairField.id), 'Attribute with such ' + pairField.dupObjName + ' already exists!');
                 }
             }
 
@@ -70,19 +68,19 @@ consoleModule.controller('clustersController', [
         };
 
         $scope.tableSave = function(field, index, stopEdit) {
-            if ($table.tablePairSaveVisible(field, index))
-                return $table.tablePairSave($scope.tablePairValid, $scope.backupItem, field, index, stopEdit);
+            if (LegacyTable.tablePairSaveVisible(field, index))
+                return LegacyTable.tablePairSave($scope.tablePairValid, $scope.backupItem, field, index, stopEdit);
 
             return true;
         };
 
         $scope.tableReset = (trySave) => {
-            const field = $table.tableField();
+            const field = LegacyTable.tableField();
 
-            if (trySave && $common.isDefined(field) && !$scope.tableSave(field, $table.tableEditedRowIndex(), true))
+            if (trySave && LegacyUtils.isDefined(field) && !$scope.tableSave(field, LegacyTable.tableEditedRowIndex(), true))
                 return false;
 
-            $table.tableReset();
+            LegacyTable.tableReset();
 
             return true;
         };
@@ -90,32 +88,32 @@ consoleModule.controller('clustersController', [
         $scope.tableNewItem = function(field) {
             if ($scope.tableReset(true)) {
                 if (field.type === 'failoverSpi') {
-                    if ($common.isDefined($scope.backupItem.failoverSpi))
+                    if (LegacyUtils.isDefined($scope.backupItem.failoverSpi))
                         $scope.backupItem.failoverSpi.push({});
                     else
                         $scope.backupItem.failoverSpi = {};
                 }
                 else
-                    $table.tableNewItem(field);
+                    LegacyTable.tableNewItem(field);
             }
         };
 
-        $scope.tableNewItemActive = $table.tableNewItemActive;
+        $scope.tableNewItemActive = LegacyTable.tableNewItemActive;
 
         $scope.tableStartEdit = function(item, field, index) {
             if ($scope.tableReset(true))
-                $table.tableStartEdit(item, field, index, $scope.tableSave);
+                LegacyTable.tableStartEdit(item, field, index, $scope.tableSave);
         };
 
-        $scope.tableEditing = $table.tableEditing;
+        $scope.tableEditing = LegacyTable.tableEditing;
 
         $scope.tableRemove = function(item, field, index) {
             if ($scope.tableReset(true))
-                $table.tableRemove(item, field, index);
+                LegacyTable.tableRemove(item, field, index);
         };
 
-        $scope.tablePairSave = $table.tablePairSave;
-        $scope.tablePairSaveVisible = $table.tablePairSaveVisible;
+        $scope.tablePairSave = LegacyTable.tablePairSave;
+        $scope.tablePairSaveVisible = LegacyTable.tablePairSaveVisible;
 
         $scope.attributesTbl = {
             type: 'attributes',
@@ -144,13 +142,13 @@ consoleModule.controller('clustersController', [
         // We need to initialize backupItem with empty object in order to properly used from angular directives.
         $scope.backupItem = emptyCluster;
 
-        $scope.ui = $common.formUI();
+        $scope.ui = LegacyUtils.formUI();
         $scope.ui.activePanels = [0];
         $scope.ui.topPanels = [0];
 
-        $scope.hidePopover = $common.hidePopover;
-        $scope.saveBtnTipText = $common.saveBtnTipText;
-        $scope.widthIsSufficient = $common.widthIsSufficient;
+        $scope.hidePopover = LegacyUtils.hidePopover;
+        $scope.saveBtnTipText = LegacyUtils.saveBtnTipText;
+        $scope.widthIsSufficient = LegacyUtils.widthIsSufficient;
 
         $scope.contentVisible = function() {
             const item = $scope.backupItem;
@@ -161,7 +159,7 @@ consoleModule.controller('clustersController', [
         $scope.toggleExpanded = function() {
             $scope.ui.expanded = !$scope.ui.expanded;
 
-            $common.hidePopover();
+            LegacyUtils.hidePopover();
         };
 
         $scope.discoveries = [
@@ -193,7 +191,7 @@ consoleModule.controller('clustersController', [
                 $scope.selectItem($scope.clusters[0]);
         }
 
-        $loading.start('loadingClustersScreen');
+        Loading.start('loadingClustersScreen');
 
         // When landing on the page, get clusters and show them.
         $http.post('/api/v1/configuration/clusters/list')
@@ -237,14 +235,14 @@ consoleModule.controller('clustersController', [
                 }
 
                 $scope.$watch('ui.inputForm.$valid', function(valid) {
-                    if (valid && _.isEqual(__original_value, $cleanup($scope.backupItem)))
+                    if (valid && ModelNormalizer.isEqual(__original_value, $scope.backupItem))
                         $scope.ui.inputForm.$dirty = false;
                 });
 
                 $scope.$watch('backupItem', function(val) {
                     const form = $scope.ui.inputForm;
 
-                    if (form.$pristine || (form.$valid && _.isEqual(__original_value, $cleanup(val))))
+                    if (form.$pristine || (form.$valid && ModelNormalizer.isEqual(__original_value, val)))
                         form.$setPristine();
                     else
                         form.$setDirty();
@@ -256,13 +254,11 @@ consoleModule.controller('clustersController', [
                     DemoInfo.show();
                 }
             })
-            .catch(function(errMsg) {
-                $common.showError(errMsg);
-            })
+            .catch(Messages.showError)
             .finally(function() {
                 $scope.ui.ready = true;
                 $scope.ui.inputForm.$setPristine();
-                $loading.finish('loadingClustersScreen');
+                Loading.finish('loadingClustersScreen');
             });
 
         $scope.selectItem = function(item, backup) {
@@ -288,13 +284,13 @@ consoleModule.controller('clustersController', [
 
                 $scope.backupItem = angular.merge({}, blank, $scope.backupItem);
 
-                __original_value = $cleanup($scope.backupItem);
+                __original_value = ModelNormalizer.normalize($scope.backupItem);
 
-                if ($common.getQueryVariable('new'))
+                if (LegacyUtils.getQueryVariable('new'))
                     $state.go('base.configuration.clusters');
             }
 
-            $common.confirmUnsavedChanges($scope.backupItem && $scope.ui.inputForm.$dirty, selectItem);
+            LegacyUtils.confirmUnsavedChanges($scope.backupItem && $scope.ui.inputForm.$dirty, selectItem);
         };
 
         $scope.linkId = () => $scope.backupItem._id ? $scope.backupItem._id : 'create';
@@ -316,7 +312,7 @@ consoleModule.controller('clustersController', [
 
         // Add new cluster.
         $scope.createItem = function(linkId) {
-            $timeout(() => $common.ensureActivePanel($scope.ui, 'general', 'clusterName'));
+            $timeout(() => LegacyUtils.ensureActivePanel($scope.ui, 'general', 'clusterName'));
 
             $scope.selectItem(null, prepareNewItem(linkId));
         };
@@ -333,14 +329,14 @@ consoleModule.controller('clustersController', [
         function checkCacheDatasources(item) {
             const caches = clusterCaches(item);
 
-            const checkRes = $common.checkCachesDataSources(caches);
+            const checkRes = LegacyUtils.checkCachesDataSources(caches);
 
             if (!checkRes.checked) {
                 return showPopoverMessage($scope.ui, 'general', 'caches',
                     'Found caches "' + checkRes.firstCache.name + '" and "' + checkRes.secondCache.name + '" ' +
                     'with the same data source bean name "' + checkRes.firstCache.cacheStoreFactory[checkRes.firstCache.cacheStoreFactory.kind].dataSourceBean +
-                    '" and different databases: "' + $common.cacheStoreJdbcDialectsLabel(checkRes.firstDB) + '" in "' + checkRes.firstCache.name + '" and "' +
-                    $common.cacheStoreJdbcDialectsLabel(checkRes.secondDB) + '" in "' + checkRes.secondCache.name + '"', 10000);
+                    '" and different databases: "' + LegacyUtils.cacheStoreJdbcDialectsLabel(checkRes.firstDB) + '" in "' + checkRes.firstCache.name + '" and "' +
+                    LegacyUtils.cacheStoreJdbcDialectsLabel(checkRes.secondDB) + '" in "' + checkRes.secondCache.name + '"', 10000);
             }
 
             return true;
@@ -349,7 +345,7 @@ consoleModule.controller('clustersController', [
         function checkCacheSQLSchemas(item) {
             const caches = clusterCaches(item);
 
-            const checkRes = $common.checkCacheSQLSchemas(caches);
+            const checkRes = LegacyUtils.checkCacheSQLSchemas(caches);
 
             if (!checkRes.checked) {
                 return showPopoverMessage($scope.ui, 'general', 'caches',
@@ -363,12 +359,12 @@ consoleModule.controller('clustersController', [
         function checkBinaryConfiguration(item) {
             const b = item.binaryConfiguration;
 
-            if ($common.isDefined(b)) {
+            if (LegacyUtils.isDefined(b)) {
                 if (!_.isEmpty(b.typeConfigurations)) {
                     for (let typeIx = 0; typeIx < b.typeConfigurations.length; typeIx++) {
                         const type = b.typeConfigurations[typeIx];
 
-                        if ($common.isEmptyString(type.typeName))
+                        if (LegacyUtils.isEmptyString(type.typeName))
                             return showPopoverMessage($scope.ui, 'binary', 'typeName' + typeIx, 'Type name should be specified!');
 
                         if (_.find(b.typeConfigurations, (t, ix) => ix < typeIx && t.typeName === type.typeName))
@@ -383,12 +379,12 @@ consoleModule.controller('clustersController', [
         function checkCommunicationConfiguration(item) {
             const c = item.communication;
 
-            if ($common.isDefined(c)) {
-                if ($common.isDefined(c.unacknowledgedMessagesBufferSize)) {
-                    if ($common.isDefined(c.messageQueueLimit) && c.unacknowledgedMessagesBufferSize < 5 * c.messageQueueLimit)
+            if (LegacyUtils.isDefined(c)) {
+                if (LegacyUtils.isDefined(c.unacknowledgedMessagesBufferSize)) {
+                    if (LegacyUtils.isDefined(c.messageQueueLimit) && c.unacknowledgedMessagesBufferSize < 5 * c.messageQueueLimit)
                         return showPopoverMessage($scope.ui, 'communication', 'unacknowledgedMessagesBufferSize', 'Maximum number of stored unacknowledged messages should be at least 5 * message queue limit!');
 
-                    if ($common.isDefined(c.ackSendThreshold) && c.unacknowledgedMessagesBufferSize < 5 * c.ackSendThreshold)
+                    if (LegacyUtils.isDefined(c.ackSendThreshold) && c.unacknowledgedMessagesBufferSize < 5 * c.ackSendThreshold)
                         return showPopoverMessage($scope.ui, 'communication', 'unacknowledgedMessagesBufferSize', 'Maximum number of stored unacknowledged messages should be at least 5 * ack send threshold!');
                 }
 
@@ -421,7 +417,7 @@ consoleModule.controller('clustersController', [
 
                 const sparsity = swap.maximumSparsity;
 
-                if ($common.isDefined(sparsity) && (sparsity < 0 || sparsity >= 1))
+                if (LegacyUtils.isDefined(sparsity) && (sparsity < 0 || sparsity >= 1))
                     return showPopoverMessage($scope.ui, 'swap', 'maximumSparsity', 'Maximum sparsity should be more or equal 0 and less than 1!');
 
                 const readStripesNumber = swap.readStripesNumber;
@@ -436,16 +432,16 @@ consoleModule.controller('clustersController', [
         function checkSslConfiguration(item) {
             const r = item.connector;
 
-            if ($common.isDefined(r)) {
-                if (r.sslEnabled && $common.isEmptyString(r.sslFactory))
+            if (LegacyUtils.isDefined(r)) {
+                if (r.sslEnabled && LegacyUtils.isEmptyString(r.sslFactory))
                     return showPopoverMessage($scope.ui, 'connector', 'connectorSslFactory', 'SSL factory should not be empty!');
             }
 
             if (item.sslEnabled) {
-                if (!$common.isDefined(item.sslContextFactory) || $common.isEmptyString(item.sslContextFactory.keyStoreFilePath))
+                if (!LegacyUtils.isDefined(item.sslContextFactory) || LegacyUtils.isEmptyString(item.sslContextFactory.keyStoreFilePath))
                     return showPopoverMessage($scope.ui, 'sslConfiguration', 'keyStoreFilePath', 'Key store file should not be empty!');
 
-                if ($common.isEmptyString(item.sslContextFactory.trustStoreFilePath) && _.isEmpty(item.sslContextFactory.trustManagers))
+                if (LegacyUtils.isEmptyString(item.sslContextFactory.trustStoreFilePath) && _.isEmpty(item.sslContextFactory.trustManagers))
                     return showPopoverMessage($scope.ui, 'sslConfiguration', 'sslConfiguration-title', 'Trust storage file or managers should be configured!');
             }
 
@@ -461,12 +457,12 @@ consoleModule.controller('clustersController', [
 
         // Check cluster logical consistency.
         function validate(item) {
-            $common.hidePopover();
+            LegacyUtils.hidePopover();
 
-            if ($common.isEmptyString(item.name))
+            if (LegacyUtils.isEmptyString(item.name))
                 return showPopoverMessage($scope.ui, 'general', 'clusterName', 'Cluster name should not be empty!');
 
-            if (!$common.checkFieldValidators($scope.ui))
+            if (!LegacyUtils.checkFieldValidators($scope.ui))
                 return false;
 
             if (!checkCacheSQLSchemas(item))
@@ -529,16 +525,16 @@ consoleModule.controller('clustersController', [
 
                     $scope.selectItem(item);
 
-                    $common.showInfo('Cluster "' + item.name + '" saved.');
+                    Messages.showInfo('Cluster "' + item.name + '" saved.');
                 })
-                .error((err) => $common.showError(err));
+                .error(Messages.showError);
         }
 
         // Save cluster.
         $scope.saveItem = function() {
             const item = $scope.backupItem;
 
-            const swapSpi = $common.autoClusterSwapSpiConfiguration(item, clusterCaches(item));
+            const swapSpi = LegacyUtils.autoClusterSwapSpiConfiguration(item, clusterCaches(item));
 
             if (swapSpi)
                 angular.extend(item, swapSpi);
@@ -554,7 +550,7 @@ consoleModule.controller('clustersController', [
         // Clone cluster with new name.
         $scope.cloneItem = function() {
             if (validate($scope.backupItem)) {
-                $clone.confirm($scope.backupItem.name, _clusterNames()).then(function(newName) {
+                Clone.confirm($scope.backupItem.name, _clusterNames()).then(function(newName) {
                     const item = angular.copy($scope.backupItem);
 
                     delete item._id;
@@ -569,13 +565,13 @@ consoleModule.controller('clustersController', [
         $scope.removeItem = function() {
             const selectedItem = $scope.selectedItem;
 
-            $confirm.confirm('Are you sure you want to remove cluster: "' + selectedItem.name + '"?')
+            Confirm.confirm('Are you sure you want to remove cluster: "' + selectedItem.name + '"?')
                 .then(function() {
                     const _id = selectedItem._id;
 
                     $http.post('/api/v1/configuration/clusters/remove', {_id})
                         .success(function() {
-                            $common.showInfo('Cluster has been removed: ' + selectedItem.name);
+                            Messages.showInfo('Cluster has been removed: ' + selectedItem.name);
 
                             const clusters = $scope.clusters;
 
@@ -595,19 +591,17 @@ consoleModule.controller('clustersController', [
                                 _.forEach($scope.igfss, (igfs) => _.remove(igfs.igfs.clusters, (id) => id === _id));
                             }
                         })
-                        .error(function(errMsg) {
-                            $common.showError(errMsg);
-                        });
+                        .error(Messages.showError);
                 });
         };
 
         // Remove all clusters from db.
         $scope.removeAllItems = function() {
-            $confirm.confirm('Are you sure you want to remove all clusters?')
+            Confirm.confirm('Are you sure you want to remove all clusters?')
                 .then(function() {
                     $http.post('/api/v1/configuration/clusters/remove/all')
-                        .success(function() {
-                            $common.showInfo('All clusters have been removed');
+                        .success(() => {
+                            Messages.showInfo('All clusters have been removed');
 
                             $scope.clusters = [];
 
@@ -617,18 +611,16 @@ consoleModule.controller('clustersController', [
                             $scope.backupItem = emptyCluster;
                             $scope.ui.inputForm.$setPristine();
                         })
-                        .error(function(errMsg) {
-                            $common.showError(errMsg);
-                        });
+                        .error(Messages.showError);
                 });
         };
 
         $scope.resetAll = function() {
-            $confirm.confirm('Are you sure you want to undo all changes for current cluster?')
+            Confirm.confirm('Are you sure you want to undo all changes for current cluster?')
                 .then(function() {
                     $scope.backupItem = $scope.selectedItem ? angular.copy($scope.selectedItem) : prepareNewItem();
                     $scope.ui.inputForm.$setPristine();
                 });
         };
-    }]
-);
+    }
+]];


Mime
View raw message