ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [28/50] [abbrv] ignite git commit: IGNITE-2840 Validation fixes
Date Mon, 28 Mar 2016 08:48:08 GMT
IGNITE-2840 Validation fixes


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

Branch: refs/heads/ignite-2875
Commit: 1e2ba1da9ff790999781ea7cd34e1d131f7d79e2
Parents: 625dcef
Author: vsisko <vsisko@gridgain.com>
Authored: Tue Mar 22 17:17:27 2016 +0700
Committer: vsisko <vsisko@gridgain.com>
Committed: Tue Mar 22 17:17:27 2016 +0700

----------------------------------------------------------------------
 .../states/configuration/clusters/deployment.jade   |  2 +-
 .../modules/states/configuration/clusters/ssl.jade  |  2 +-
 .../modules/states/configuration/clusters/swap.jade |  2 +-
 .../states/configuration/clusters/thread.jade       |  2 +-
 .../states/configuration/clusters/transactions.jade |  2 +-
 .../src/main/js/controllers/caches-controller.js    | 16 +++++++++++++---
 .../src/main/js/controllers/clusters-controller.js  | 15 ++++++++++-----
 .../src/main/js/controllers/common-module.js        |  3 +++
 8 files changed, 31 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1e2ba1da/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/deployment.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/deployment.jade
b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/deployment.jade
index a7de09a..1c8d475 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/deployment.jade
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/deployment.jade
@@ -21,7 +21,7 @@ include ../../../../../app/helpers/jade/mixins.jade
 -var form = 'deployment'
 -var enabled = 'backupItem.peerClassLoadingEnabled'
 
-form.panel.panel-default(name='#{form}' novalidate)
+form.panel.panel-default(name='deployment' novalidate)
     .panel-heading(bs-collapse-toggle ng-click='__show__ = true')
         ignite-form-panel-chevron
         label Class deployment

http://git-wip-us.apache.org/repos/asf/ignite/blob/1e2ba1da/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/ssl.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/ssl.jade
b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/ssl.jade
index f96cc4e..15a14cc 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/ssl.jade
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/ssl.jade
@@ -22,7 +22,7 @@ include ../../../../../app/helpers/jade/mixins.jade
 -var trust = model + '.trustManagers'
 -var form = 'trustManagers'
 
-form.panel.panel-default(name='#{form}' novalidate)
+form.panel.panel-default(name='sslConfiguration' novalidate)
     .panel-heading(bs-collapse-toggle ng-click='__show__ = true')
         ignite-form-panel-chevron
         label(id='sslConfiguration-title') SSL configuration

http://git-wip-us.apache.org/repos/asf/ignite/blob/1e2ba1da/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/swap.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/swap.jade
b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/swap.jade
index 015bdd9..544e8ac 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/swap.jade
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/swap.jade
@@ -20,7 +20,7 @@ include ../../../../../app/helpers/jade/mixins.jade
 -var swapModel = model + '.swapSpaceSpi'
 -var fileSwapModel = swapModel + '.FileSwapSpaceSpi'
 
-form.panel.panel-default(name='swapSpaceSpi' novalidate)
+form.panel.panel-default(name='swap' novalidate)
     .panel-heading(bs-collapse-toggle ng-click='__show__ = true')
         ignite-form-panel-chevron
         label Swap

http://git-wip-us.apache.org/repos/asf/ignite/blob/1e2ba1da/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/thread.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/thread.jade
b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/thread.jade
index 1537696..264a8330 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/thread.jade
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/thread.jade
@@ -18,7 +18,7 @@ include ../../../../../app/helpers/jade/mixins.jade
 
 -var model = 'backupItem'
 
-form.panel.panel-default(name='thread' novalidate)
+form.panel.panel-default(name='pools' novalidate)
     .panel-heading(bs-collapse-toggle ng-click='__show__ = true')
         ignite-form-panel-chevron
         label Thread pools size

http://git-wip-us.apache.org/repos/asf/ignite/blob/1e2ba1da/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/transactions.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/transactions.jade
b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/transactions.jade
index 90a2e50..570bf5b 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/transactions.jade
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/transactions.jade
@@ -18,7 +18,7 @@ include ../../../../../app/helpers/jade/mixins.jade
 
 -var model = 'backupItem.transactionConfiguration'
 
-form.panel.panel-default(name='transactionConfiguration' novalidate)
+form.panel.panel-default(name='transactions' novalidate)
     .panel-heading(bs-collapse-toggle ng-click='__show__ = true')
         ignite-form-panel-chevron
         label Transactions

http://git-wip-us.apache.org/repos/asf/ignite/blob/1e2ba1da/modules/control-center-web/src/main/js/controllers/caches-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/caches-controller.js b/modules/control-center-web/src/main/js/controllers/caches-controller.js
index 055417b..208724b 100644
--- a/modules/control-center-web/src/main/js/controllers/caches-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/caches-controller.js
@@ -264,16 +264,26 @@ consoleModule.controller('cachesController', [
                 var firstError = errors[firstErrorKey][0];
                 var actualError = firstError.$error[firstErrorKey][0];
 
+                var errName = actualError.$name;
+
+                if (errName.endsWith('TextInput') || errName.endsWith('JavaClass'))
+                    errName = errName.substring(0, errName.length - 9);
+
                 var msg = 'Invalid value';
 
                 try {
-                    msg = errors[firstErrorKey][0].$errorMessages[actualError.$name][firstErrorKey];
+                    msg = errors[firstErrorKey][0].$errorMessages[errName][firstErrorKey];
                 }
                 catch(ignored) {
-                    // No-op.
+                    try {
+                        msg = form[firstError.$name].$errorMessages[errName][firstErrorKey];
+                    }
+                    catch(ignited) {
+                        // No-op.
+                    }
                 }
 
-                return showPopoverMessage($scope.ui, firstError.$name, actualError.$name,
msg);
+                return showPopoverMessage($scope.ui, firstError.$name, errName, msg);
             }
 
             if (item.memoryMode === 'OFFHEAP_VALUES' && !$common.isEmptyArray(item.domains))

http://git-wip-us.apache.org/repos/asf/ignite/blob/1e2ba1da/modules/control-center-web/src/main/js/controllers/clusters-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/clusters-controller.js b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
index ce133cf..1571d3e 100644
--- a/modules/control-center-web/src/main/js/controllers/clusters-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
@@ -257,21 +257,26 @@ consoleModule.controller('clustersController', [
                 var firstError = errors[firstErrorKey][0];
                 var actualError = firstError.$error[firstErrorKey][0];
 
+                var errName = actualError.$name;
+
+                if (errName.endsWith('TextInput') || errName.endsWith('JavaClass'))
+                    errName = errName.substring(0, errName.length - 9);
+
                 var msg = 'Invalid value!';
 
                 try {
-                    msg = errors[firstErrorKey][0].$errorMessages[actualError.$name][firstErrorKey];
+                    msg = errors[firstErrorKey][0].$errorMessages[errName][firstErrorKey];
                 }
                 catch(ignored) {
                     try {
-                        msg = form[firstError.$name].$errorMessages[actualError.$name][firstErrorKey];
+                        msg = form[firstError.$name].$errorMessages[errName][firstErrorKey];
                     }
                     catch(ignited) {
                         // No-op.
                     }
                 }
 
-                return showPopoverMessage($scope.ui, firstError.$name, actualError.$name,
msg);
+                return showPopoverMessage($scope.ui, firstError.$name, errName, msg);
             }
 
             var caches = _.filter(_.map($scope.caches, function (scopeCache) {
@@ -302,10 +307,10 @@ consoleModule.controller('clustersController', [
                         var type = b.typeConfigurations[typeIx];
 
                         if ($common.isEmptyString(type.typeName))
-                            return showPopoverMessage($scope.ui, 'binary', 'typeName' + typeIx,
'Type name should be specified!');
+                            return showPopoverMessage($scope.ui, 'binary', 'typeName' + typeIx
+ 'JavaClass', 'Type name should be specified!');
 
                         if (_.find(b.typeConfigurations, sameName))
-                            return showPopoverMessage($scope.ui, 'binary', 'typeName' + typeIx,
'Type with such name is already specified!');
+                            return showPopoverMessage($scope.ui, 'binary', 'typeName' + typeIx
+ 'JavaClass', 'Type with such name is already specified!');
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/1e2ba1da/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 d4f692d..7248757 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
@@ -607,6 +607,9 @@ consoleModule.service('$common', [
 
             var el = $('body').find('#' + id);
 
+            if (!el || el.length === 0)
+                el = $('body').find('[name="' + id + '"]');
+
             if (el && el.length > 0) {
                 var newPopover = $popover(el, {content: message});
 


Mime
View raw message