ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject incubator-ignite git commit: # IGNITE-843 Minor changes in generator.
Date Mon, 29 Jun 2015 09:25:08 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 8049b8c74 -> 44c115781


# IGNITE-843 Minor changes in generator.


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

Branch: refs/heads/ignite-843
Commit: 44c1157817b50bd43251ad817497b18768d556ad
Parents: 8049b8c
Author: sevdokimov <sergey.evdokimov@jetbrains.com>
Authored: Mon Jun 29 12:24:59 2015 +0300
Committer: sevdokimov <sergey.evdokimov@jetbrains.com>
Committed: Mon Jun 29 12:24:59 2015 +0300

----------------------------------------------------------------------
 .../nodejs/public/javascripts/controllers/summary.js     |  4 ++--
 modules/webconfig/nodejs/utils/generatorJava.js          |  3 +++
 modules/webconfig/nodejs/utils/generatorUtils.js         | 11 ++++++++---
 modules/webconfig/nodejs/utils/generatorXml.js           |  5 +++--
 modules/webconfig/nodejs/views/summary.jade              |  8 ++------
 5 files changed, 18 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44c11578/modules/webconfig/nodejs/public/javascripts/controllers/summary.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/public/javascripts/controllers/summary.js b/modules/webconfig/nodejs/public/javascripts/controllers/summary.js
index 15406f4..5f38051 100644
--- a/modules/webconfig/nodejs/public/javascripts/controllers/summary.js
+++ b/modules/webconfig/nodejs/public/javascripts/controllers/summary.js
@@ -40,10 +40,10 @@ configuratorModule.controller('clustersList', ['$scope', '$http', function
($sco
             .success(
             function (data) {
                 if (lang == 'java') {
-                    $("<pre class='brush:java' />").text(data).appendTo($('#javaResult').empty());
+                    $("<pre class='brush:java' />").text(data).appendTo($('#javaResultDiv').empty());
                 }
                 else if (lang == 'xml') {
-                    $("<pre class='brush:xml' />").text(data).appendTo($('#xmlResult').empty());
+                    $("<pre class='brush:xml' />").text(data).appendTo($('#xmlResultDiv').empty());
                 }
 
                 SyntaxHighlighter.highlight();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44c11578/modules/webconfig/nodejs/utils/generatorJava.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/utils/generatorJava.js b/modules/webconfig/nodejs/utils/generatorJava.js
index f050079..223f85f 100644
--- a/modules/webconfig/nodejs/utils/generatorJava.js
+++ b/modules/webconfig/nodejs/utils/generatorJava.js
@@ -21,6 +21,9 @@ exports.generateClusterConfiguration = function(cluster, generateJavaClass)
{
     var res = generatorUtils.builder();
 
     if (generateJavaClass) {
+        res.line('/**');
+        res.line(' * ' + generatorUtils.mainComment());
+        res.line(' */');
         res.startBlock('public class ConfigurationFactory {');
         res.line();
         res.startBlock('public IgniteConfiguration createConfiguration() {');

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44c11578/modules/webconfig/nodejs/utils/generatorUtils.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/utils/generatorUtils.js b/modules/webconfig/nodejs/utils/generatorUtils.js
index 80f612a..82df5bb 100644
--- a/modules/webconfig/nodejs/utils/generatorUtils.js
+++ b/modules/webconfig/nodejs/utils/generatorUtils.js
@@ -15,7 +15,10 @@
  * limitations under the License.
  */
 
-exports.mainComment = 'This configuration was generated by automatically by Ignite ($date)';
+exports.mainComment = function() {
+    return 'This configuration was generated by automatically by Ignite (' 
+        + formatDate(new Date()) + ')';
+};
 
 function addLeadingZero(numberStr, minSize) {
     if (typeof (numberStr) != 'string')
@@ -28,14 +31,16 @@ function addLeadingZero(numberStr, minSize) {
     return numberStr;
 }
 
-exports.formatDate = function (date) {
+exports.formatDate = formatDate;
+
+function formatDate(date) {
     var dd = addLeadingZero(date.getDate(), 2);
     var mm = addLeadingZero(date.getMonth() + 1, 2);
     
     var yyyy = date.getFullYear();
 
     return mm + '/' + dd + '/' + yyyy + ' ' + addLeadingZero(date.getHours(), 2) + ':' +
addLeadingZero(date.getMinutes(), 2);
-};
+}
 
 exports.builder = function () {
     var res = [];

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44c11578/modules/webconfig/nodejs/utils/generatorXml.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/utils/generatorXml.js b/modules/webconfig/nodejs/utils/generatorXml.js
index d82ff60..ae7ffbc 100644
--- a/modules/webconfig/nodejs/utils/generatorXml.js
+++ b/modules/webconfig/nodejs/utils/generatorXml.js
@@ -24,9 +24,10 @@ exports.generateClusterConfiguration = function(cluster) {
     res.push('' +
         '<?xml version="1.0" encoding="UTF-8"?>\n' +
         '\n' +
-        '<!-- ' + (generatorUtils.mainComment.replace('$date', generatorUtils.formatDate(new
Date()))) + ' -->\n' +    
+        '<!-- ' + generatorUtils.mainComment() + ' -->\n' +    
         '<beans xmlns="http://www.springframework.org/schema/beans"\n' +
-        '       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"\n'
+
+        '       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\n' +
+        '       xmlns:util="http://www.springframework.org/schema/util"\n' +
         '       xsi:schemaLocation="http://www.springframework.org/schema/beans\n' +
         '                           http://www.springframework.org/schema/beans/spring-beans.xsd\n'
+
         '                           http://www.springframework.org/schema/util\n' +

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44c11578/modules/webconfig/nodejs/views/summary.jade
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/views/summary.jade b/modules/webconfig/nodejs/views/summary.jade
index 7cf6b57..ffa4db4 100644
--- a/modules/webconfig/nodejs/views/summary.jade
+++ b/modules/webconfig/nodejs/views/summary.jade
@@ -57,9 +57,7 @@ block content
 
                 div(style='padding-top: 10px')        
                     #xmlResult(ng-show="cfgLang == 'xml'")
-                        .panel.panel-default
-                            .panel-body
-                                #xmlResult
+                        #xmlResultDiv
                 
                     #javaResult(ng-show="cfgLang == 'java'")
                         div(style="padding-bottom: 10px")
@@ -67,9 +65,7 @@ block content
                                 input(type='checkbox', ng-model="generateJavaClass")
                                 | generate java class.
                         
-                        .panel.panel-default
-                            .panel-body
-                                #javaResult
+                        #javaResultDiv
                     
                     #dockerResult(ng-show="cfgLang == 'docker'")
                         p


Mime
View raw message