ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject ignite git commit: IGNITE-843 WIP spinners.
Date Wed, 16 Sep 2015 08:04:08 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843 7f57f7c90 -> 6ebf43a39


IGNITE-843 WIP spinners.


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

Branch: refs/heads/ignite-843
Commit: 6ebf43a39faea42f01dbbb55d6d13a9d0e97f519
Parents: 7f57f7c
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Wed Sep 16 15:03:59 2015 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Wed Sep 16 15:03:59 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/common-module.js    |  2 +-
 .../main/js/controllers/metadata-controller.js  | 41 ++++++++------------
 .../main/js/controllers/models/metadata.json    |  1 +
 .../js/views/configuration/metadata-load.jade   |  2 +-
 .../src/main/js/views/includes/controls.jade    |  2 +-
 .../src/main/js/views/templates/layout.jade     |  4 +-
 6 files changed, 23 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebf43a3/modules/control-center-web/src/main/js/controllers/common-module.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/common-module.js b/modules/control-center-web/src/main/js/controllers/common-module.js
index f88089b..34da990 100644
--- a/modules/control-center-web/src/main/js/controllers/common-module.js
+++ b/modules/control-center-web/src/main/js/controllers/common-module.js
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-var controlCenterModule = angular.module('ignite-web-control-center', ['ngAnimate', 'smart-table',
'mgcrea.ngStrap', 'ui.ace', 'ngSanitize', 'treeControl', 'unsavedChanges', 'angularSpinner']);
+var controlCenterModule = angular.module('ignite-web-control-center', ['ngAnimate', 'smart-table',
'mgcrea.ngStrap', 'ui.ace', 'ngSanitize', 'treeControl', 'unsavedChanges', 'darthwade.loading']);
 
 // Modal popup configuration.
 controlCenterModule.config(function ($modalProvider) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebf43a3/modules/control-center-web/src/main/js/controllers/metadata-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/metadata-controller.js b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
index 6a68afc..6bd5197 100644
--- a/modules/control-center-web/src/main/js/controllers/metadata-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
@@ -17,8 +17,8 @@
 
 // Controller for Metadata screen.
 controlCenterModule.controller('metadataController', [
-        '$scope', '$controller', '$http', '$modal', '$common', '$timeout', '$focus', '$confirm',
'$copy', '$table', '$preview', '$stepConfirm', 'usSpinnerService',
-        function ($scope, $controller, $http, $modal, $common, $timeout, $focus, $confirm,
$copy, $table, $preview, $stepConfirm, usSpinnerService) {
+        '$scope', '$controller', '$http', '$modal', '$common', '$timeout', '$focus', '$confirm',
'$copy', '$table', '$preview', '$stepConfirm', '$loading',
+        function ($scope, $controller, $http, $modal, $common, $timeout, $focus, $confirm,
$copy, $table, $preview, $stepConfirm, $loading) {
             // Initialize the super class and extend it.
             angular.extend(this, $controller('save-remove', {$scope: $scope}));
 
@@ -275,38 +275,36 @@ controlCenterModule.controller('metadataController', [
                     });
             };
 
-            function _startSpin() {
-                usSpinnerService.spin('load-spinner');
+            function _startLoadMetadata() {
+                $loading.start('metadataLoading');
             }
 
-            function _stopSpin() {
-                usSpinnerService.stop('load-spinner');
+            function _stopLoadMetadata() {
+                $loading.finish('metadataLoading');
             }
 
             function _loadSchemas() {
-                _startSpin();
+                _startLoadMetadata();
 
                 $http.post('/agent/schemas', $scope.preset)
                     .success(function (schemas) {
                         $scope.loadMeta.schemas = _.map(schemas, function (schema) { return
{use: false, name: schema}});
                         $scope.loadMeta.action = 'schemas';
-                        $scope.loadMeta.info = INFO_SELECT_SCHEMAS;
-
-                        _stopSpin();
                     })
                     .error(function (errMsg) {
-                        _stopSpin();
-
                         $common.showError(errMsg);
+                    })
+                    .finally(function() {
+                        $scope.loadMeta.info = INFO_SELECT_SCHEMAS;
+
+                        _stopLoadMetadata();
                     });
             }
 
             function _loadMetadata() {
-                _startSpin();
+                _startLoadMetadata();
 
                 $scope.loadMeta.allTablesSelected = false;
-                $scope.loadMeta.info = INFO_SELECT_TABLES;
-
                 $scope.preset.schemas = [];
 
                 _.forEach($scope.loadMeta.schemas, function (schema) {
@@ -319,22 +317,17 @@ controlCenterModule.controller('metadataController', [
                         $scope.loadMeta.tables = tables;
                         $scope.loadMeta.action = 'tables';
                         $scope.loadMeta.button = 'Save';
-
-                        _stopSpin();
                     })
                     .error(function (errMsg) {
                         $common.showError(errMsg);
+                    })
+                    .finally(function() {
+                        $scope.loadMeta.info = INFO_SELECT_TABLES;
 
-                        _stopSpin();
+                        _stopLoadMetadata();
                     });
             }
 
-            function toProperCase(name) {
-                var properName = name.toLocaleLowerCase();
-
-                return properName.charAt(0).toLocaleUpperCase() + properName.slice(1)
-            }
-
             function toJavaClassName(name) {
                 var len = name.length;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebf43a3/modules/control-center-web/src/main/js/controllers/models/metadata.json
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/models/metadata.json b/modules/control-center-web/src/main/js/controllers/models/metadata.json
index ace5def..aa43910 100644
--- a/modules/control-center-web/src/main/js/controllers/models/metadata.json
+++ b/modules/control-center-web/src/main/js/controllers/models/metadata.json
@@ -253,6 +253,7 @@
       "id": "password",
       "type": "password",
       "model": "password",
+      "onEnter": "loadMetadataNext()",
       "tip": [
         "Password for connecting to database.",
         "Note, password would not be saved."

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebf43a3/modules/control-center-web/src/main/js/views/configuration/metadata-load.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/metadata-load.jade
b/modules/control-center-web/src/main/js/views/configuration/metadata-load.jade
index d29098d..9834520 100644
--- a/modules/control-center-web/src/main/js/views/configuration/metadata-load.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/metadata-load.jade
@@ -21,7 +21,7 @@ mixin chk(mdl, change, tip)
 
 .modal.center(role='dialog')
     .modal-dialog
-        .modal-content(us-spinner spinner-key='load-spinner')
+        .modal-content(dw-loading='metadataLoading' dw-loading-options='{text: ""}')
             #errors-container.modal-header.header
                 button.close(type='button' ng-click='$hide()' aria-hidden='true') &times;
                 h4.modal-title Load metadata from database

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebf43a3/modules/control-center-web/src/main/js/views/includes/controls.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/includes/controls.jade b/modules/control-center-web/src/main/js/views/includes/controls.jade
index ee4fa88..fef320c 100644
--- a/modules/control-center-web/src/main/js/views/includes/controls.jade
+++ b/modules/control-center-web/src/main/js/views/includes/controls.jade
@@ -290,7 +290,7 @@ mixin form-row-custom(lblClasses, fieldClasses, dataSource)
             div(class=fieldClasses)
                 +tipField('field.tip')
                 .input-tip
-                    input.form-control(id='{{::field.id}}' type='password' placeholder='{{::field.placeholder}}')&attributes(fieldCommon)
+                    input.form-control(id='{{::field.id}}' type='password' placeholder='{{::field.placeholder}}'
on-enter='{{::field.onEnter}}')&attributes(fieldCommon)
         div(ng-switch-when='number' ng-hide=fieldHide)
             label(class=lblClasses ng-class=fieldRequiredClass) {{::field.label}}:
             div(class=fieldClasses)

http://git-wip-us.apache.org/repos/asf/ignite/blob/6ebf43a3/modules/control-center-web/src/main/js/views/templates/layout.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/templates/layout.jade b/modules/control-center-web/src/main/js/views/templates/layout.jade
index ff963a1..90c50f6 100644
--- a/modules/control-center-web/src/main/js/views/templates/layout.jade
+++ b/modules/control-center-web/src/main/js/views/templates/layout.jade
@@ -28,7 +28,7 @@ html(ng-app='ignite-web-control-center' ng-init='user = #{JSON.stringify(user)};
             link(rel='stylesheet', href='//cdnjs.cloudflare.com/ajax/libs/angular-motion/0.4.2/angular-motion.min.css')
             link(rel='stylesheet', href='//cdn.rawgit.com/wix/angular-tree-control/master/css/tree-control.css')
             link(rel='stylesheet', href='//cdn.rawgit.com/wix/angular-tree-control/master/css/tree-control-attribute.css')
-
+            link(rel='stylesheet'  href='//rawgithub.com/darthwade/angular-loading/master/angular-loading.css')
             link(rel='stylesheet', href='/stylesheets/style.css')
 
         block scripts
@@ -56,7 +56,7 @@ html(ng-app='ignite-web-control-center' ng-init='user = #{JSON.stringify(user)};
             script(src='//cdn.rawgit.com/facultymatt/angular-unsavedChanges/develop/dist/unsavedChanges.min.js')
 
             script(src='//cdnjs.cloudflare.com/ajax/libs/spin.js/2.3.2/spin.min.js')
-            script(src='//cdnjs.cloudflare.com/ajax/libs/angular-spinner/0.7.0/angular-spinner.min.js')
+            script(src='//rawgithub.com/darthwade/angular-loading/master/angular-loading.min.js')
 
             script(src='/common-module.js')
             script(src='/data-structures.js')


Mime
View raw message