IGNITE-843 Minor changes to code generation.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/3040d643 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/3040d643 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/3040d643 Branch: refs/heads/ignite-1121 Commit: 3040d64355734c09b871b9dad078ff727e2e41e8 Parents: ea45ca0 Author: AKuznetsov <akuznet...@gridgain.com> Authored: Thu Jul 30 23:55:32 2015 +0700 Committer: AKuznetsov <akuznet...@gridgain.com> Committed: Thu Jul 30 23:55:32 2015 +0700 ---------------------------------------------------------------------- .../control-center-web/src/main/js/routes/generator/java.js | 6 +++--- modules/control-center-web/src/main/js/routes/summary.js | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3040d643/modules/control-center-web/src/main/js/routes/generator/java.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/routes/generator/java.js b/modules/control-center-web/src/main/js/routes/generator/java.js index d24f16c..3b969ca 100644 --- a/modules/control-center-web/src/main/js/routes/generator/java.js +++ b/modules/control-center-web/src/main/js/routes/generator/java.js @@ -37,9 +37,9 @@ function toJavaName(prefix, name) { * * @param cluster Cluster to process. * @param javaClass If 'true' then generate factory class otherwise generate code snippet. - * @param clientMode If 'true' then generate configuration for client node. + * @param clientNearConfiguration Near cache configuration for client node. */ -exports.generateClusterConfiguration = function (cluster, javaClass, clientMode) { +exports.generateClusterConfiguration = function (cluster, javaClass, clientNearConfiguration) { var res = generatorUtils.builder(); res.datasourceBeans = []; @@ -58,7 +58,7 @@ exports.generateClusterConfiguration = function (cluster, javaClass, clientMode) declareVariable(res, true, 'cfg', 'org.apache.ignite.configuration.IgniteConfiguration'); res.line(); - if (clientMode) { + if (clientNearConfiguration) { res.line('cfg.setClientMode(true);'); res.line(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3040d643/modules/control-center-web/src/main/js/routes/summary.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/routes/summary.js b/modules/control-center-web/src/main/js/routes/summary.js index c992ad9..d187700 100644 --- a/modules/control-center-web/src/main/js/routes/summary.js +++ b/modules/control-center-web/src/main/js/routes/summary.js @@ -19,6 +19,7 @@ var db = require('../db'); var router = require('express').Router(); +var generatorCommon = require('./generator/common'); var generatorXml = require('./generator/xml'); var generatorJava = require('./generator/java'); var generatorDocker = require('./generator/docker'); @@ -82,8 +83,6 @@ router.post('/download', function (req, res) { // Set the archive name. res.attachment(cluster.name + (clientNearConfiguration ? '-client' : '-server') + '-configuration.zip'); - var generatorCommon = require('./generator/common'); - // Send the file to the page output. zip.pipe(res);