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 Added local host to cluster.
Date Tue, 15 Dec 2015 07:02:04 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc2 81e750e66 -> c737a14ce


IGNITE-843 Added local host to cluster.


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

Branch: refs/heads/ignite-843-rc2
Commit: c737a14ce6190a7901a4caa89aa45e0dd61b049d
Parents: 81e750e
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Tue Dec 15 14:02:53 2015 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Tue Dec 15 14:02:53 2015 +0700

----------------------------------------------------------------------
 modules/control-center-web/src/main/js/db.js    |  2 +-
 .../helpers/generator/generator-properties.js   | 21 +++++++++++++++++++-
 2 files changed, 21 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c737a14c/modules/control-center-web/src/main/js/db.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/db.js b/modules/control-center-web/src/main/js/db.js
index d714f22..9b99b16 100644
--- a/modules/control-center-web/src/main/js/db.js
+++ b/modules/control-center-web/src/main/js/db.js
@@ -140,7 +140,7 @@ var CacheSchema = new Schema({
             dataSourceBean: String,
             dialect: {
                 type: String,
-                enum: ['Oracle', 'DB2', 'SQLServer', 'MySQL', 'PosgreSQL', 'H2']
+                enum: ['Generic', 'Oracle', 'DB2', 'SQLServer', 'MySQL', 'PosgreSQL', 'H2']
             }
         },
         CacheJdbcBlobStoreFactory: {

http://git-wip-us.apache.org/repos/asf/ignite/blob/c737a14c/modules/control-center-web/src/main/js/helpers/generator/generator-properties.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-properties.js
b/modules/control-center-web/src/main/js/helpers/generator/generator-properties.js
index d273eae..4ee42c3 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-properties.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-properties.js
@@ -18,6 +18,25 @@
 // Properties generation entry point.
 $generatorProperties = {};
 
+$generatorProperties.jdbcUrlTemplate = function(dialect) {
+    switch (dialect) {
+        case 'Oracle':
+            return 'jdbc:oracle:thin:@[host]:[port]:[database]';
+        case 'DB2':
+            return 'jdbc:db2://[host]:[port]/[database]';
+        case 'SQLServer':
+            return 'jdbc:sqlserver://[host]:[port][;databaseName=database]';
+        case 'MySQL':
+            return 'jdbc:mysql://[host]:[port]/[database]';
+        case 'PosgreSQL':
+            return 'jdbc:postgresql://[host]:[port]/[database]';
+        case 'H2':
+            return 'jdbc:h2:tcp://[host]/[database]';
+    }
+
+    return 'jdbc:your_database';
+};
+
 /**
  * Generate properties file with properties stubs for stores data sources.
  *
@@ -56,7 +75,7 @@ $generatorProperties.dataSourcesProperties = function (cluster, res) {
                                 break;
 
                             default:
-                                res.line(beanId + '.jdbc.url=YOUR_JDBC_URL');
+                                res.line(beanId + '.jdbc.url=' + $generatorProperties.jdbcUrlTemplate(storeFactory.dialect));
                         }
 
                         res.line(beanId + '.jdbc.username=YOUR_USER_NAME');


Mime
View raw message