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-7391 Web Console: Fixed code generation.
Date Fri, 12 Jan 2018 09:12:56 GMT
Repository: ignite
Updated Branches:
  refs/heads/master eeebfca0b -> fe874760e


IGNITE-7391 Web Console: Fixed code generation.


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

Branch: refs/heads/master
Commit: fe874760e433844d9788fd57e6dc9ecce20c62d6
Parents: eeebfca
Author: Vasiliy Sisko <vsisko@gridgain.com>
Authored: Fri Jan 12 16:12:46 2018 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Fri Jan 12 16:12:46 2018 +0700

----------------------------------------------------------------------
 .../configuration/generator/JavaTransformer.service.js    | 10 +++++-----
 .../configuration/generator/SpringTransformer.service.js  | 10 +++++-----
 .../states/configuration/summary/summary.worker.js        |  8 ++++----
 3 files changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/fe874760/modules/web-console/frontend/app/modules/configuration/generator/JavaTransformer.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/configuration/generator/JavaTransformer.service.js
b/modules/web-console/frontend/app/modules/configuration/generator/JavaTransformer.service.js
index 74b3fc6..a8d6d2d 100644
--- a/modules/web-console/frontend/app/modules/configuration/generator/JavaTransformer.service.js
+++ b/modules/web-console/frontend/app/modules/configuration/generator/JavaTransformer.service.js
@@ -886,13 +886,15 @@ export default class IgniteJavaTransformer extends AbstractTransformer
{
      * Build Java startup class with configuration.
      *
      * @param {Bean} cfg
-     * @param available Function to check target version of generated source to appropriate
for generation.
+     * @param {Object} targetVer Version of Ignite for generated project.
      * @param pkg Package name.
      * @param {String} clsName Class name for generate factory class otherwise generate code
snippet.
      * @param {Array.<Object>} clientNearCaches Is client node.
      * @returns {StringBuilder}
      */
-    static igniteConfiguration(cfg, available, pkg, clsName, clientNearCaches) {
+    static igniteConfiguration(cfg, targetVer, pkg, clsName, clientNearCaches) {
+        const available = versionService.since.bind(versionService, targetVer.ignite);
+
         const sb = new StringBuilder();
 
         sb.append(`package ${pkg};`);
@@ -1048,9 +1050,7 @@ export default class IgniteJavaTransformer extends AbstractTransformer
{
         const clientNearCaches = client ? _.filter(cluster.caches, (cache) =>
             cache.cacheMode === 'PARTITIONED' && _.get(cache, 'clientNearConfiguration.enabled'))
: [];
 
-        const available = versionService.since.bind(versionService, targetVer.ignite);
-
-        return this.igniteConfiguration(cfg, available, pkg, clsName, clientNearCaches);
+        return this.igniteConfiguration(cfg, targetVer, pkg, clsName, clientNearCaches);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/fe874760/modules/web-console/frontend/app/modules/configuration/generator/SpringTransformer.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/configuration/generator/SpringTransformer.service.js
b/modules/web-console/frontend/app/modules/configuration/generator/SpringTransformer.service.js
index 9e35e5d..a4b616c 100644
--- a/modules/web-console/frontend/app/modules/configuration/generator/SpringTransformer.service.js
+++ b/modules/web-console/frontend/app/modules/configuration/generator/SpringTransformer.service.js
@@ -255,11 +255,13 @@ export default class IgniteSpringTransformer extends AbstractTransformer
{
      * Build final XML.
      *
      * @param {Bean} cfg Ignite configuration.
-     * @param available Function to check target version of generated source to appropriate
for generation.
+     * @param {Object} targetVer Version of Ignite for generated project.
      * @param {Boolean} clientNearCaches
      * @returns {StringBuilder}
      */
-    static igniteConfiguration(cfg, available, clientNearCaches) {
+    static igniteConfiguration(cfg, targetVer, clientNearCaches) {
+        const available = versionService.since.bind(versionService, targetVer.ignite);
+
         const sb = new StringBuilder();
 
         // 0. Add header.
@@ -326,8 +328,6 @@ export default class IgniteSpringTransformer extends AbstractTransformer
{
         const clientNearCaches = client ? _.filter(cluster.caches, (cache) =>
             cache.cacheMode === 'PARTITIONED' && _.get(cache, 'clientNearConfiguration.enabled'))
: [];
 
-        const available = versionService.since.bind(versionService, targetVer.ignite);
-
-        return this.igniteConfiguration(cfg, available, clientNearCaches);
+        return this.igniteConfiguration(cfg, targetVer, clientNearCaches);
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/fe874760/modules/web-console/frontend/app/modules/states/configuration/summary/summary.worker.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/summary/summary.worker.js
b/modules/web-console/frontend/app/modules/states/configuration/summary/summary.worker.js
index 11f19ee..1939906 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/summary/summary.worker.js
+++ b/modules/web-console/frontend/app/modules/states/configuration/summary/summary.worker.js
@@ -90,13 +90,13 @@ onmessage = function(e) {
     if (cluster.discovery.kind === 'Kubernetes')
         zip.file(`${metaPath}/ignite-service.yaml`, kubernetesConfig(cluster));
 
-    zip.file(`${metaPath}/${serverXml}`, spring.igniteConfiguration(cfg).asString());
-    zip.file(`${metaPath}/${clientXml}`, spring.igniteConfiguration(clientCfg, clientNearCaches).asString());
+    zip.file(`${metaPath}/${serverXml}`, spring.igniteConfiguration(cfg, targetVer).asString());
+    zip.file(`${metaPath}/${clientXml}`, spring.igniteConfiguration(clientCfg, targetVer,
clientNearCaches).asString());
 
     const cfgPath = `${srcPath}/config`;
 
-    zip.file(`${cfgPath}/ServerConfigurationFactory.java`, java.igniteConfiguration(cfg,
'config', 'ServerConfigurationFactory').asString());
-    zip.file(`${cfgPath}/ClientConfigurationFactory.java`, java.igniteConfiguration(clientCfg,
'config', 'ClientConfigurationFactory', clientNearCaches).asString());
+    zip.file(`${cfgPath}/ServerConfigurationFactory.java`, java.igniteConfiguration(cfg,
targetVer, 'config', 'ServerConfigurationFactory').asString());
+    zip.file(`${cfgPath}/ClientConfigurationFactory.java`, java.igniteConfiguration(clientCfg,
targetVer, 'config', 'ClientConfigurationFactory', clientNearCaches).asString());
 
     if (java.isDemoConfigured(cluster, demo)) {
         zip.file(`${srcPath}/demo/DemoStartup.java`, java.nodeStartup(cluster, 'demo.DemoStartup',


Mime
View raw message