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 Minor fixes.
Date Wed, 30 Dec 2015 06:29:43 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc2 e9c9d1a3f -> d643efeff


IGNITE-843 Minor fixes.


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

Branch: refs/heads/ignite-843-rc2
Commit: d643efeffd8bf8ceedfa4ae553e7f30c7fb1cc4a
Parents: e9c9d1a
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Wed Dec 30 13:29:35 2015 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Wed Dec 30 13:29:35 2015 +0700

----------------------------------------------------------------------
 .../configuration/summary/summary.controller.js | 97 ++++++++++++--------
 .../main/js/helpers/generator/generator-java.js | 10 +-
 .../main/js/helpers/generator/generator-xml.js  | 42 ++++-----
 3 files changed, 83 insertions(+), 66 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d643efef/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
b/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
index dcbe7dd..12ade31 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
@@ -30,9 +30,11 @@ export default [
 
             $loading.finish('loading');
 
-            const idx = sessionStorage.summarySelectedId || 0;
+            if (!$common.isEmptyArray(clusters)) {
+                const idx = sessionStorage.summarySelectedId || 0;
 
-            $scope.selectItem(clusters[idx]);
+                $scope.selectItem(clusters[idx]);
+            }
         });
 
         $scope.panelExpanded = $common.panelExpanded;
@@ -47,6 +49,43 @@ export default [
             }
         };
 
+        const javaConfigFolder = {
+            type: 'folder',
+            name: 'src-config',
+            title: 'config',
+            children: [
+                { type: 'file', name: 'ClientConfigurationFactory.java' },
+                { type: 'file', name: 'ServerConfigurationFactory.java' }
+            ]
+        };
+
+        const javaStartupFolder = {
+            type: 'folder',
+            name: 'startup',
+            children: [
+                { type: 'file', name: 'ClientNodeCodeStartup.java' },
+                { type: 'file', name: 'ClientNodeSpringStartup.java' },
+                { type: 'file', name: 'ServerNodeCodeStartup.java' },
+                { type: 'file', name: 'ServerNodeSpringStartup.java' }
+            ]
+        };
+
+        const javaFolder = {
+            type: 'folder',
+            name: 'java',
+            children: [
+                {
+                    type: 'folder',
+                    name: 'src-config',
+                    title: 'config',
+                    children: [
+                        javaConfigFolder,
+                        javaStartupFolder
+                    ]
+                }
+            ]
+        };
+
         const projectStructureRoot = {
             type: 'folder',
             name: 'project.zip',
@@ -73,40 +112,7 @@ export default [
                         {
                             type: 'folder',
                             name: 'main',
-                            children: [
-                                {
-                                    type: 'folder',
-                                    name: 'java',
-                                    children: [
-                                        {
-                                            type: 'folder',
-                                            name: 'src-config',
-                                            title: 'config',
-                                            children: [
-                                                { type: 'file', name: 'ClientConfigurationFactory.java'
},
-                                                { type: 'file', name: 'ServerConfigurationFactory.java'
}
-                                            ]
-                                        },
-                                        {
-                                            type: 'folder',
-                                            name: 'pojo.model',
-                                            children: [
-                                                { type: 'file', name: 'GeneratedPojo.java'
}
-                                            ]
-                                        },
-                                        {
-                                            type: 'folder',
-                                            name: 'startup',
-                                            children: [
-                                                { type: 'file', name: 'ClientNodeCodeStartup.java'
},
-                                                { type: 'file', name: 'ClientNodeSpringStartup.java'
},
-                                                { type: 'file', name: 'ServerNodeCodeStartup.java'
},
-                                                { type: 'file', name: 'ServerNodeSpringStartup.java'
}
-                                            ]
-                                        }
-                                    ]
-                                }
-                            ]
+                            children: [javaFolder]
                         }
                     ]
                 },
@@ -117,6 +123,7 @@ export default [
         };
 
         $scope.projectStructure = [projectStructureRoot];
+
         $scope.projectStructureExpanded = [projectStructureRoot];
 
         $scope.tabsServer = { activeTab: 0 };
@@ -134,6 +141,16 @@ export default [
             $scope.selectedItem = cluster;
 
             sessionStorage.summarySelectedId = $scope.clusters.indexOf(cluster);
+
+            javaFolder.children = [javaConfigFolder, javaStartupFolder];
+
+            _.forEach(cluster.caches, (cache) => {
+                _.forEach(cache.metadatas, (metadata) => {
+                    javaFolder.children.push({type: 'folder', name: 'test' + cluster.name,
children: [{type: 'file', name: 'test-1'}]});
+                });
+            }) ;
+
+
         };
 
         const updateTab = (cluster) => {
@@ -168,16 +185,16 @@ export default [
             zip.file(serverXml, $generatorXml.cluster(cluster));
             zip.file(clientXml, $generatorXml.cluster(cluster, clientNearCfg));
 
-            zip.file(srcPath + 'config/ServerConfigurationFactory.java', $generatorJava.cluster(cluster,
'factory', 'ServerConfigurationFactory', null));
-            zip.file(srcPath + 'config/ClientConfigurationFactory.java', $generatorJava.cluster(cluster,
'factory', 'ClientConfigurationFactory', clientNearCfg));
+            zip.file(srcPath + 'config/ServerConfigurationFactory.java', $generatorJava.cluster(cluster,
'config', 'ServerConfigurationFactory', null));
+            zip.file(srcPath + 'config/ClientConfigurationFactory.java', $generatorJava.cluster(cluster,
'config', 'ClientConfigurationFactory', clientNearCfg));
 
             zip.file(srcPath + 'startup/ServerNodeSpringStartup.java', $generatorJava.nodeStartup(cluster,
'startup', 'ServerNodeSpringStartup', '"' + serverXml + '"'));
             zip.file(srcPath + 'startup/ClientNodeSpringStartup.java', $generatorJava.nodeStartup(cluster,
'startup', 'ClientNodeSpringStartup', '"' + clientXml + '"'));
 
             zip.file(srcPath + 'startup/ServerNodeCodeStartup.java', $generatorJava.nodeStartup(cluster,
'startup', 'ServerNodeCodeStartup',
-                'ServerConfigurationFactory.createConfiguration()', 'factory.ServerConfigurationFactory'));
+                'ServerConfigurationFactory.createConfiguration()', 'config.ServerConfigurationFactory'));
             zip.file(srcPath + 'startup/ClientNodeCodeStartup.java', $generatorJava.nodeStartup(cluster,
'startup', 'ClientNodeCodeStartup',
-                'ClientConfigurationFactory.createConfiguration()', 'factory.ClientConfigurationFactory',
clientNearCfg));
+                'ClientConfigurationFactory.createConfiguration()', 'config.ClientConfigurationFactory',
clientNearCfg));
 
             zip.file('pom.xml', $generatorPom.pom(cluster, igniteVersion).asString());
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/d643efef/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 8c2786b..b68f821 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
@@ -567,7 +567,7 @@ $generatorJava.clusterBinary = function (cluster, res) {
             $generatorJava.declareVariable(res, arrVar, 'java.util.Collection', 'java.util.ArrayList',
'org.apache.ignite.binary.BinaryTypeConfiguration');
 
             _.forEach(binary.typeConfigurations, function (type) {
-                if (!$commonUtils.isDefinedAndNotEmpty(type.typeName)) {
+                if ($commonUtils.isDefinedAndNotEmpty(type.typeName)) {
                     // TODO IGNITE-2269 Replace using of separated methods for binary type
configurations to extended constructors.
                     res.line(arrVar + '.add(' + $generatorJava.binaryTypeFunctionName(type.typeName)
+ '());');
                 }
@@ -891,10 +891,10 @@ $generatorJava.clusterTime = function (cluster, res) {
     if (!res)
         res = $generatorCommon.builder();
 
-    $generatorJava.property(res, 'cfg', cluster, 'clockSyncSamples');
-    $generatorJava.property(res, 'cfg', cluster, 'clockSyncFrequency');
-    $generatorJava.property(res, 'cfg', cluster, 'timeServerPortBase');
-    $generatorJava.property(res, 'cfg', cluster, 'timeServerPortRange');
+    $generatorJava.property(res, 'cfg', cluster, 'clockSyncSamples', null, null, 8);
+    $generatorJava.property(res, 'cfg', cluster, 'clockSyncFrequency', null, null, 120000);
+    $generatorJava.property(res, 'cfg', cluster, 'timeServerPortBase', null, null, 31100);
+    $generatorJava.property(res, 'cfg', cluster, 'timeServerPortRange', null, null, 100);
 
     res.needEmptyLine = true;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/d643efef/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js b/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js
index 9d30c5c..39c9d28 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js
@@ -515,33 +515,33 @@ $generatorXml.clusterDiscovery = function (disco, res) {
         res = $generatorCommon.builder();
 
     $generatorXml.property(res, disco, 'localAddress');
-    $generatorXml.property(res, disco, 'localPort', undefined, 47500);
-    $generatorXml.property(res, disco, 'localPortRange', undefined, 100);
+    $generatorXml.property(res, disco, 'localPort', null, 47500);
+    $generatorXml.property(res, disco, 'localPortRange', null, 100);
     if ($commonUtils.isDefinedAndNotEmpty(disco.addressResolver))
         $generatorXml.beanProperty(res, disco, 'addressResolver', {className: disco.addressResolver},
true);
-    $generatorXml.property(res, disco, 'socketTimeout', undefined, 5000);
-    $generatorXml.property(res, disco, 'ackTimeout', undefined, 5000);
-    $generatorXml.property(res, disco, 'maxAckTimeout', undefined, 600000);
-    $generatorXml.property(res, disco, 'discoNetworkTimeout', 'setNetworkTimeout', 5000);
-    $generatorXml.property(res, disco, 'joinTimeout', undefined, 0);
-    $generatorXml.property(res, disco, 'threadPriority', undefined, 10);
-    $generatorXml.property(res, disco, 'heartbeatFrequency', undefined, 2000);
-    $generatorXml.property(res, disco, 'maxMissedHeartbeats', undefined, 1);
-    $generatorXml.property(res, disco, 'maxMissedClientHeartbeats', undefined, 5);
-    $generatorXml.property(res, disco, 'topHistorySize', undefined, 100);
+    $generatorXml.property(res, disco, 'socketTimeout', null, 5000);
+    $generatorXml.property(res, disco, 'ackTimeout', null, 5000);
+    $generatorXml.property(res, disco, 'maxAckTimeout', null, 600000);
+    $generatorXml.property(res, disco, 'networkTimeout', null, 5000);
+    $generatorXml.property(res, disco, 'joinTimeout', null, 0);
+    $generatorXml.property(res, disco, 'threadPriority', null, 10);
+    $generatorXml.property(res, disco, 'heartbeatFrequency', null, 2000);
+    $generatorXml.property(res, disco, 'maxMissedHeartbeats', null, 1);
+    $generatorXml.property(res, disco, 'maxMissedClientHeartbeats', null, 5);
+    $generatorXml.property(res, disco, 'topHistorySize', null, 100);
     if ($commonUtils.isDefinedAndNotEmpty(disco.listener))
         $generatorXml.beanProperty(res, disco, 'listener', {className: disco.listener}, true);
     if ($commonUtils.isDefinedAndNotEmpty(disco.dataExchange))
         $generatorXml.beanProperty(res, disco, 'dataExchange', {className: disco.dataExchange},
true);
     if ($commonUtils.isDefinedAndNotEmpty(disco.metricsProvider))
         $generatorXml.beanProperty(res, disco, 'metricsProvider', {className: disco.metricsProvider},
true);
-    $generatorXml.property(res, disco, 'reconnectCount', undefined, 10);
-    $generatorXml.property(res, disco, 'statisticsPrintFrequency', undefined, 0);
-    $generatorXml.property(res, disco, 'ipFinderCleanFrequency', undefined, 60000);
+    $generatorXml.property(res, disco, 'reconnectCount', null, 10);
+    $generatorXml.property(res, disco, 'statisticsPrintFrequency', null, 0);
+    $generatorXml.property(res, disco, 'ipFinderCleanFrequency', null, 60000);
     if ($commonUtils.isDefinedAndNotEmpty(disco.authenticator))
         $generatorXml.beanProperty(res, disco, 'authenticator', {className: disco.authenticator},
true);
-    $generatorXml.property(res, disco, 'forceServerMode', undefined, false);
-    $generatorXml.property(res, disco, 'clientReconnectDisabled', undefined, false);
+    $generatorXml.property(res, disco, 'forceServerMode', null, false);
+    $generatorXml.property(res, disco, 'clientReconnectDisabled', null, false);
 
     res.needEmptyLine = true;
 
@@ -644,10 +644,10 @@ $generatorXml.clusterTime = function (cluster, res) {
     if (!res)
         res = $generatorCommon.builder();
 
-    $generatorXml.property(res, cluster, 'clockSyncSamples');
-    $generatorXml.property(res, cluster, 'clockSyncFrequency');
-    $generatorXml.property(res, cluster, 'timeServerPortBase');
-    $generatorXml.property(res, cluster, 'timeServerPortRange');
+    $generatorXml.property(res, cluster, 'clockSyncSamples', null, 8);
+    $generatorXml.property(res, cluster, 'clockSyncFrequency', null, 120000);
+    $generatorXml.property(res, cluster, 'timeServerPortBase', null, 31100);
+    $generatorXml.property(res, cluster, 'timeServerPortRange', null, 100);
 
     res.needEmptyLine = true;
 


Mime
View raw message