ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [02/20] ignite git commit: IGNITE-843 Minor code cleanup.
Date Wed, 24 Feb 2016 02:50:11 GMT
IGNITE-843 Minor code cleanup.


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

Branch: refs/heads/ignite-843-rc3
Commit: 99eaa65eba80d23e7a4b0b9f753128249207c027
Parents: c4c8c59
Author: vsisko <vsisko@gridgain.com>
Authored: Thu Feb 18 10:54:25 2016 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Thu Feb 18 10:54:25 2016 +0700

----------------------------------------------------------------------
 .../main/js/controllers/caches-controller.js    |  2 +-
 .../main/js/helpers/generator/generator-java.js | 21 +++++++-------------
 .../src/main/js/serve/mail.js                   |  2 +-
 3 files changed, 9 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/99eaa65e/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 4a8ee53..7709aa4 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
@@ -570,7 +570,7 @@ consoleModule.controller('cachesController', [
 
             if (item.writeBehindFlushSize === 0 && item.writeBehindFlushFrequency
=== 0)
                 return showPopoverMessage($scope.ui, 'store', 'writeBehindFlushSize',
-                    'Both \'Flush frequency\' and \'Flush size\' are not allowed as 0');
+                    'Both "Flush frequency" and "Flush size" are not allowed as 0');
 
             if (item.cacheMode !== 'LOCAL' && item.rebalanceMode !== 'NONE' &&
item.rebalanceBatchSize === 0)
                 return showPopoverMessage($scope.ui, 'rebalance', 'rebalanceBatchSize',

http://git-wip-us.apache.org/repos/asf/ignite/blob/99eaa65e/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-java.js b/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
index 4416e15..d693788 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
@@ -2067,21 +2067,14 @@ $generatorJava.javaClassCode = function (domain, key, pkg, useConstructor,
inclu
     res.line('/** {@inheritDoc} */');
     res.startBlock('@Override public String toString() {');
 
-    if (allFields.length > 0) {
-        var field = allFields[0];
-
-        res.startBlock('return \"' + type + ' [' + field.javaFieldName + '=\" + ' + field.javaFieldName
+ ' +', type);
-
-        for (fldIx = 1; fldIx < allFields.length; fldIx ++) {
-            field = allFields[fldIx];
-
-            var javaName = field.javaFieldName;
-
-            res.line('\", ' + javaName + '=\" + ' + field.javaFieldName + ' +');
-        }
-    }
+    _.forEach(allFields, function (field, idx) {
+        if (idx === 0)
+            res.startBlock('return \"' + type + ' [' + field.javaFieldName + '=\" + ' + field.javaFieldName
+ ' +', type);
+        else
+            res.line('\", ' + field.javaFieldName + '=\" + ' + field.javaFieldName + ' +');
+    });
 
-    res.line('\']\';');
+    res.line('"]";');
     res.endBlock();
     res.endBlock('}');
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/99eaa65e/modules/control-center-web/src/main/js/serve/mail.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/serve/mail.js b/modules/control-center-web/src/main/js/serve/mail.js
index 05d0fe9..0412840 100644
--- a/modules/control-center-web/src/main/js/serve/mail.js
+++ b/modules/control-center-web/src/main/js/serve/mail.js
@@ -45,7 +45,7 @@ module.exports.factory = function(nodemailer, settings) {
             };
 
             if (transporter.service === '' || transporter.auth.user === '' || transporter.auth.pass
=== '')
-                return Promise.reject('Can\'t send email because not configured SMTP server.
Please ask webmaster to setup SMTP server!');
+                return Promise.reject('Failed to send email. SMTP server is not configured
. Please ask webmaster to setup SMTP server!');
 
             const mailer = nodemailer.createTransport(transporter);
 


Mime
View raw message