Rename $loading service to IgniteLoading.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a2b99995 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a2b99995 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a2b99995 Branch: refs/heads/ignite-3262 Commit: a2b99995e1a9a309978c3807e010b315c0932d31 Parents: 34311d8 Author: Alexey Kuznetsov <[email protected]> Authored: Thu Jun 30 17:27:19 2016 +0700 Committer: Alexey Kuznetsov <[email protected]> Committed: Thu Jun 30 17:27:19 2016 +0700 ---------------------------------------------------------------------- .../js/app/modules/loading/loading.directive.js | 4 ++-- .../js/app/modules/loading/loading.service.js | 2 +- .../configuration/summary/summary.controller.js | 8 +++---- .../main/js/controllers/caches-controller.js | 8 +++---- .../main/js/controllers/clusters-controller.js | 8 +++---- .../main/js/controllers/domains-controller.js | 24 ++++++++++---------- .../src/main/js/controllers/igfs-controller.js | 8 +++---- .../src/main/js/controllers/sql-controller.js | 14 ++++++------ 8 files changed, 38 insertions(+), 38 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/a2b99995/modules/web-console/src/main/js/app/modules/loading/loading.directive.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/loading/loading.directive.js b/modules/web-console/src/main/js/app/modules/loading/loading.directive.js index 06e66b1..064b4c2 100644 --- a/modules/web-console/src/main/js/app/modules/loading/loading.directive.js +++ b/modules/web-console/src/main/js/app/modules/loading/loading.directive.js @@ -18,7 +18,7 @@ import templateUrl from './loading.jade'; import './loading.css'; -export default ['igniteLoading', ['$loading', '$templateCache', '$compile', ($loading, $templateCache, $compile) => { +export default ['igniteLoading', ['IgniteLoading', '$templateCache', '$compile', (Loading, $templateCache, $compile) => { const link = (scope, element) => { const compiledTemplate = $compile($templateCache.get(templateUrl)); @@ -30,7 +30,7 @@ export default ['igniteLoading', ['$loading', '$templateCache', '$compile', ($lo if (!scope.loading) { scope.loading = loading; - $loading.add(scope.key || 'defaultSpinnerKey', scope.loading); + Loading.add(scope.key || 'defaultSpinnerKey', scope.loading); element.append(scope.loading); } }; http://git-wip-us.apache.org/repos/asf/ignite/blob/a2b99995/modules/web-console/src/main/js/app/modules/loading/loading.service.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/loading/loading.service.js b/modules/web-console/src/main/js/app/modules/loading/loading.service.js index 0664884..ec31c1a 100644 --- a/modules/web-console/src/main/js/app/modules/loading/loading.service.js +++ b/modules/web-console/src/main/js/app/modules/loading/loading.service.js @@ -15,7 +15,7 @@ * limitations under the License. */ -export default ['$loading', ['$timeout', ($timeout) => { +export default ['IgniteLoading', ['$timeout', ($timeout) => { const _overlays = {}; const start = (key) => { http://git-wip-us.apache.org/repos/asf/ignite/blob/a2b99995/modules/web-console/src/main/js/app/modules/states/configuration/summary/summary.controller.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/app/modules/states/configuration/summary/summary.controller.js b/modules/web-console/src/main/js/app/modules/states/configuration/summary/summary.controller.js index d9faf6c..1b19e3a 100644 --- a/modules/web-console/src/main/js/app/modules/states/configuration/summary/summary.controller.js +++ b/modules/web-console/src/main/js/app/modules/states/configuration/summary/summary.controller.js @@ -20,13 +20,13 @@ import JSZip from 'jszip'; import saver from 'file-saver'; export default [ - '$rootScope', '$scope', '$http', 'IgniteLegacyUtils', '$loading', '$filter', 'ConfigurationSummaryResource', 'JavaTypes', 'IgniteVersion', 'GeneratorDocker', 'GeneratorPom', - function($root, $scope, $http, LegacyUtils, $loading, $filter, Resource, JavaTypes, IgniteVersion, docker, pom) { + '$rootScope', '$scope', '$http', 'IgniteLegacyUtils', 'IgniteLoading', '$filter', 'ConfigurationSummaryResource', 'JavaTypes', 'IgniteVersion', 'GeneratorDocker', 'GeneratorPom', + function($root, $scope, $http, LegacyUtils, Loading, $filter, Resource, JavaTypes, IgniteVersion, docker, pom) { const ctrl = this; $scope.ui = { ready: false }; - $loading.start('summaryPage'); + Loading.start('summaryPage'); Resource.read().then(({clusters}) => { $scope.clusters = clusters; @@ -39,7 +39,7 @@ export default [ return { _id, name }; }); - $loading.finish('summaryPage'); + Loading.finish('summaryPage'); $scope.ui.ready = true; http://git-wip-us.apache.org/repos/asf/ignite/blob/a2b99995/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 62b6bd3..acd65a2 100644 --- a/modules/web-console/src/main/js/controllers/caches-controller.js +++ b/modules/web-console/src/main/js/controllers/caches-controller.js @@ -17,8 +17,8 @@ // Controller for Caches screen. export default ['cachesController', [ - '$scope', '$http', '$state', '$filter', '$timeout', 'IgniteLegacyUtils', 'IgniteMessages', 'IgniteConfirm', 'IgniteClone', '$loading', 'IgniteModelNormalizer', 'IgniteUnsavedChangesGuard', - function($scope, $http, $state, $filter, $timeout, LegacyUtils, Messages, Confirm, Clone, $loading, ModelNormalizer, UnsavedChangesGuard) { + '$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}; @@ -77,7 +77,7 @@ export default ['cachesController', [ }, []); } - $loading.start('loadingCachesScreen'); + Loading.start('loadingCachesScreen'); // When landing on the page, get caches and show them. $http.post('/api/v1/configuration/caches/list') @@ -146,7 +146,7 @@ export default ['cachesController', [ .finally(function() { $scope.ui.ready = true; $scope.ui.inputForm.$setPristine(); - $loading.finish('loadingCachesScreen'); + Loading.finish('loadingCachesScreen'); }); $scope.selectItem = function(item, backup) { http://git-wip-us.apache.org/repos/asf/ignite/blob/a2b99995/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 a80a782..5f86d08 100644 --- a/modules/web-console/src/main/js/controllers/clusters-controller.js +++ b/modules/web-console/src/main/js/controllers/clusters-controller.js @@ -17,8 +17,8 @@ // Controller for Clusters screen. export default ['clustersController', [ - '$rootScope', '$scope', '$http', '$state', '$timeout', 'IgniteLegacyUtils', 'IgniteMessages', 'IgniteConfirm', 'IgniteClone', '$loading', 'IgniteModelNormalizer', 'IgniteUnsavedChangesGuard', 'igniteEventGroups', 'DemoInfo', 'IgniteLegacyTable', - function($root, $scope, $http, $state, $timeout, LegacyUtils, Messages, Confirm, Clone, $loading, ModelNormalizer, UnsavedChangesGuard, igniteEventGroups, DemoInfo, LegacyTable) { + '$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}; @@ -191,7 +191,7 @@ export default ['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') @@ -258,7 +258,7 @@ export default ['clustersController', [ .finally(function() { $scope.ui.ready = true; $scope.ui.inputForm.$setPristine(); - $loading.finish('loadingClustersScreen'); + Loading.finish('loadingClustersScreen'); }); $scope.selectItem = function(item, backup) { http://git-wip-us.apache.org/repos/asf/ignite/blob/a2b99995/modules/web-console/src/main/js/controllers/domains-controller.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/controllers/domains-controller.js b/modules/web-console/src/main/js/controllers/domains-controller.js index a4bcf68..eb2f9d0 100644 --- a/modules/web-console/src/main/js/controllers/domains-controller.js +++ b/modules/web-console/src/main/js/controllers/domains-controller.js @@ -17,8 +17,8 @@ // Controller for Domain model screen. export default ['domainsController', [ - '$rootScope', '$scope', '$http', '$state', '$filter', '$timeout', '$modal', 'IgniteLegacyUtils', 'IgniteMessages', 'IgniteFocus', 'IgniteConfirm', 'IgniteConfirmBatch', 'IgniteClone', '$loading', 'IgniteModelNormalizer', 'IgniteUnsavedChangesGuard', 'IgniteAgentMonitor', 'IgniteLegacyTable', - function($root, $scope, $http, $state, $filter, $timeout, $modal, LegacyUtils, Messages, Focus, Confirm, ConfirmBatch, Clone, $loading, ModelNormalizer, UnsavedChangesGuard, IgniteAgentMonitor, LegacyTable) { + '$rootScope', '$scope', '$http', '$state', '$filter', '$timeout', '$modal', 'IgniteLegacyUtils', 'IgniteMessages', 'IgniteFocus', 'IgniteConfirm', 'IgniteConfirmBatch', 'IgniteClone', 'IgniteLoading', 'IgniteModelNormalizer', 'IgniteUnsavedChangesGuard', 'IgniteAgentMonitor', 'IgniteLegacyTable', + function($root, $scope, $http, $state, $filter, $timeout, $modal, LegacyUtils, Messages, Focus, Confirm, ConfirmBatch, Clone, Loading, ModelNormalizer, UnsavedChangesGuard, IgniteAgentMonitor, LegacyTable) { UnsavedChangesGuard.install($scope); const emptyDomain = {empty: true}; @@ -410,7 +410,7 @@ export default ['domainsController', [ } // Get available JDBC drivers via agent. - $loading.start('importDomainFromDb'); + Loading.start('importDomainFromDb'); $scope.jdbcDriverJars = []; $scope.ui.selectedJdbcDriverJar = {}; @@ -451,7 +451,7 @@ export default ['domainsController', [ .finally(function() { $scope.importDomain.info = INFO_CONNECT_TO_DB; - $loading.finish('importDomainFromDb'); + Loading.finish('importDomainFromDb'); }); }); }); @@ -464,7 +464,7 @@ export default ['domainsController', [ IgniteAgentMonitor.awaitAgent() .then(function() { $scope.importDomain.loadingOptions = LOADING_SCHEMAS; - $loading.start('importDomainFromDb'); + Loading.start('importDomainFromDb'); if ($root.IgniteDemoMode) return IgniteAgentMonitor.schemas($scope.demoConnection); @@ -488,7 +488,7 @@ export default ['domainsController', [ $scope.importDomain.info = INFO_SELECT_SCHEMAS; }) .catch(Messages.showError) - .finally(() => $loading.finish('importDomainFromDb')); + .finally(() => Loading.finish('importDomainFromDb')); } const DFLT_PARTITIONED_CACHE = { @@ -588,7 +588,7 @@ export default ['domainsController', [ IgniteAgentMonitor.awaitAgent() .then(function() { $scope.importDomain.loadingOptions = LOADING_TABLES; - $loading.start('importDomainFromDb'); + Loading.start('importDomainFromDb'); $scope.importDomain.allTablesSelected = false; @@ -625,7 +625,7 @@ export default ['domainsController', [ $scope.importDomain.info = INFO_SELECT_TABLES; }) .catch(Messages.showError) - .finally(() => $loading.finish('importDomainFromDb')); + .finally(() => Loading.finish('importDomainFromDb')); } $scope.applyDefaults = function() { @@ -674,7 +674,7 @@ export default ['domainsController', [ function _saveBatch(batch) { if (batch && batch.length > 0) { $scope.importDomain.loadingOptions = SAVING_DOMAINS; - $loading.start('importDomainFromDb'); + Loading.start('importDomainFromDb'); $http.post('/api/v1/configuration/domains/save/batch', batch) .success(function(savedBatch) { @@ -715,7 +715,7 @@ export default ['domainsController', [ }) .error(Messages.showError) .finally(() => { - $loading.finish('importDomainFromDb'); + Loading.finish('importDomainFromDb'); importDomainModal.hide(); }); @@ -1055,7 +1055,7 @@ export default ['domainsController', [ $scope.importCommon = {}; // When landing on the page, get domain models and show them. - $loading.start('loadingDomainModelsScreen'); + Loading.start('loadingDomainModelsScreen'); $http.post('/api/v1/configuration/domains/list') .success(function(data) { @@ -1126,7 +1126,7 @@ export default ['domainsController', [ $scope.ui.ready = true; $scope.ui.inputForm.$setPristine(); - $loading.finish('loadingDomainModelsScreen'); + Loading.finish('loadingDomainModelsScreen'); }); const clearFormDefaults = (ngFormCtrl) => { http://git-wip-us.apache.org/repos/asf/ignite/blob/a2b99995/modules/web-console/src/main/js/controllers/igfs-controller.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/controllers/igfs-controller.js b/modules/web-console/src/main/js/controllers/igfs-controller.js index ff80a75..5f5f0bb 100644 --- a/modules/web-console/src/main/js/controllers/igfs-controller.js +++ b/modules/web-console/src/main/js/controllers/igfs-controller.js @@ -17,8 +17,8 @@ // Controller for IGFS screen. export default ['igfsController', [ - '$scope', '$http', '$state', '$filter', '$timeout', 'IgniteLegacyUtils', 'IgniteMessages', 'IgniteConfirm', 'IgniteClone', '$loading', 'IgniteModelNormalizer', 'IgniteUnsavedChangesGuard', 'IgniteLegacyTable', - function($scope, $http, $state, $filter, $timeout, LegacyUtils, Messages, Confirm, Clone, $loading, ModelNormalizer, UnsavedChangesGuard, LegacyTable) { + '$scope', '$http', '$state', '$filter', '$timeout', 'IgniteLegacyUtils', 'IgniteMessages', 'IgniteConfirm', 'IgniteClone', 'IgniteLoading', 'IgniteModelNormalizer', 'IgniteUnsavedChangesGuard', 'IgniteLegacyTable', + function($scope, $http, $state, $filter, $timeout, LegacyUtils, Messages, Confirm, Clone, Loading, ModelNormalizer, UnsavedChangesGuard, LegacyTable) { UnsavedChangesGuard.install($scope); const emptyIgfs = {empty: true}; @@ -132,7 +132,7 @@ export default ['igfsController', [ $scope.selectItem($scope.igfss[0]); } - $loading.start('loadingIgfsScreen'); + Loading.start('loadingIgfsScreen'); // When landing on the page, get IGFSs and show them. $http.post('/api/v1/configuration/igfs/list') @@ -197,7 +197,7 @@ export default ['igfsController', [ .finally(function() { $scope.ui.ready = true; $scope.ui.inputForm.$setPristine(); - $loading.finish('loadingIgfsScreen'); + Loading.finish('loadingIgfsScreen'); }); $scope.selectItem = function(item, backup) { http://git-wip-us.apache.org/repos/asf/ignite/blob/a2b99995/modules/web-console/src/main/js/controllers/sql-controller.js ---------------------------------------------------------------------- diff --git a/modules/web-console/src/main/js/controllers/sql-controller.js b/modules/web-console/src/main/js/controllers/sql-controller.js index b2e314a..7a851c3 100644 --- a/modules/web-console/src/main/js/controllers/sql-controller.js +++ b/modules/web-console/src/main/js/controllers/sql-controller.js @@ -17,8 +17,8 @@ // Controller for SQL notebook screen. export default ['sqlController', [ - '$rootScope', '$scope', '$http', '$q', '$timeout', '$interval', '$animate', '$location', '$anchorScroll', '$state', '$modal', '$popover', '$loading', 'IgniteLegacyUtils', 'IgniteMessages', 'IgniteConfirm', 'IgniteAgentMonitor', 'IgniteChartColors', 'QueryNotebooks', 'uiGridConstants', 'uiGridExporterConstants', - function($root, $scope, $http, $q, $timeout, $interval, $animate, $location, $anchorScroll, $state, $modal, $popover, $loading, LegacyUtils, Messages, Confirm, agentMonitor, IgniteChartColors, QueryNotebooks, uiGridConstants, uiGridExporterConstants) { + '$rootScope', '$scope', '$http', '$q', '$timeout', '$interval', '$animate', '$location', '$anchorScroll', '$state', '$modal', '$popover', 'IgniteLoading', 'IgniteLegacyUtils', 'IgniteMessages', 'IgniteConfirm', 'IgniteAgentMonitor', 'IgniteChartColors', 'QueryNotebooks', 'uiGridConstants', 'uiGridExporterConstants', + function($root, $scope, $http, $q, $timeout, $interval, $animate, $location, $anchorScroll, $state, $modal, $popover, Loading, LegacyUtils, Messages, Confirm, agentMonitor, IgniteChartColors, QueryNotebooks, uiGridConstants, uiGridExporterConstants) { let stopTopology = null; const _tryStopRefresh = function(paragraph) { @@ -767,7 +767,7 @@ export default ['sqlController', [ }); const _startTopologyRefresh = () => { - $loading.start('sqlLoading'); + Loading.start('sqlLoading'); agentMonitor.awaitAgent() .then(_updateTopology) @@ -775,7 +775,7 @@ export default ['sqlController', [ if ($root.IgniteDemoMode) _.forEach($scope.notebook.paragraphs, $scope.execute); - $loading.finish('sqlLoading'); + Loading.finish('sqlLoading'); stopTopology = $interval(_updateTopology, 5000, 0, false); }); @@ -821,7 +821,7 @@ export default ['sqlController', [ .catch(() => { $scope.notebookLoadFailed = true; - $loading.finish('sqlLoading'); + Loading.finish('sqlLoading'); }); $scope.renameNotebook = function(name) { @@ -1537,7 +1537,7 @@ export default ['sqlController', [ }; $scope.importMetadata = function() { - $loading.start('loadingCacheMetadata'); + Loading.start('loadingCacheMetadata'); $scope.metadata = []; @@ -1560,7 +1560,7 @@ export default ['sqlController', [ }), 'name'); }) .catch(Messages.showError) - .finally(() => $loading.finish('loadingCacheMetadata')); + .finally(() => Loading.finish('loadingCacheMetadata')); }; $scope.showResultQuery = function(paragraph) {
