You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by an...@apache.org on 2015/06/25 06:41:15 UTC
[1/4] incubator-ignite git commit: # ignite-850 WIP.
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-843 a78eee502 -> 0370ff05a
# ignite-850 WIP.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f350d120
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f350d120
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f350d120
Branch: refs/heads/ignite-843
Commit: f350d120f09f422cd1ad57ec92862ce82ab50ed3
Parents: b3abf11
Author: Andrey <an...@gridgain.com>
Authored: Wed Jun 24 09:30:22 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Wed Jun 24 09:30:22 2015 +0700
----------------------------------------------------------------------
modules/webconfig/nodejs/package.json | 5 ++++-
modules/webconfig/nodejs/routes/persistence.js | 23 +++++++++++++++++++++
2 files changed, 27 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f350d120/modules/webconfig/nodejs/package.json
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/package.json b/modules/webconfig/nodejs/package.json
index 59ff406..dd968cb 100644
--- a/modules/webconfig/nodejs/package.json
+++ b/modules/webconfig/nodejs/package.json
@@ -15,7 +15,6 @@
"cookie-parser": "~1.3.4",
"debug": "~2.1.1",
"express": "~4.12.2",
- "express-messages": "0.0.2",
"express-session": "^1.11.1",
"jade": "~1.9.2",
"less-middleware": "1.0.x",
@@ -25,6 +24,10 @@
"passport": "^0.2.1",
"passport-local": "^1.0.0",
"passport-local-mongoose": "^1.0.0",
+ "pg": "^4.4.0",
"serve-favicon": "~2.2.0"
+ },
+ "devDependencies": {
+ "supertest": "^1.0.1"
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f350d120/modules/webconfig/nodejs/routes/persistence.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/routes/persistence.js b/modules/webconfig/nodejs/routes/persistence.js
new file mode 100644
index 0000000..3234a4b
--- /dev/null
+++ b/modules/webconfig/nodejs/routes/persistence.js
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var router = require('express').Router();
+
+//
+router.post('/pg', function(req, res) {
+
+});
\ No newline at end of file
[3/4] incubator-ignite git commit: Merge remote-tracking branch
'origin/ignite-843' into ignite-843
Posted by an...@apache.org.
Merge remote-tracking branch 'origin/ignite-843' into ignite-843
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/172c0baa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/172c0baa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/172c0baa
Branch: refs/heads/ignite-843
Commit: 172c0baa9aa11439a6d6a438e08e66bf4e6594cc
Parents: 2b403d2 a78eee5
Author: Andrey <an...@gridgain.com>
Authored: Thu Jun 25 11:37:27 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Jun 25 11:37:27 2015 +0700
----------------------------------------------------------------------
modules/webconfig/nodejs/app.js | 20 ++--
.../nodejs/public/form-models/persistence.json | 11 +-
.../public/javascripts/controllers/caches.js | 18 ++--
.../javascripts/controllers/persistence.js | 43 --------
.../javascripts/controllers/persistences.js | 107 +++++++++++++++++++
modules/webconfig/nodejs/routes/persistence.js | 91 ----------------
modules/webconfig/nodejs/routes/persistences.js | 91 ++++++++++++++++
modules/webconfig/nodejs/views/persistence.jade | 6 +-
8 files changed, 230 insertions(+), 157 deletions(-)
----------------------------------------------------------------------
[4/4] incubator-ignite git commit: # ignite-843 WIP.
Posted by an...@apache.org.
# ignite-843 WIP.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/0370ff05
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/0370ff05
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/0370ff05
Branch: refs/heads/ignite-843
Commit: 0370ff05a5d1b94f9946e3eec9490bcd04c3bc95
Parents: 172c0ba
Author: Andrey <an...@gridgain.com>
Authored: Thu Jun 25 11:41:30 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Jun 25 11:41:30 2015 +0700
----------------------------------------------------------------------
modules/webconfig/nodejs/app.js | 10 ++++----
modules/webconfig/nodejs/db.js | 10 --------
modules/webconfig/nodejs/package.json | 4 ++-
.../public/javascripts/controllers/caches.js | 3 ++-
.../public/javascripts/controllers/clusters.js | 3 ++-
.../javascripts/controllers/persistences.js | 3 ++-
modules/webconfig/nodejs/routes/caches.js | 2 +-
modules/webconfig/nodejs/routes/persistences.js | 24 ++++++++++++++++++
.../webconfig/nodejs/test/routes/persistence.js | 26 ++++++++++++++++++++
9 files changed, 65 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0370ff05/modules/webconfig/nodejs/app.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/app.js b/modules/webconfig/nodejs/app.js
index de3fd06..1141b19 100644
--- a/modules/webconfig/nodejs/app.js
+++ b/modules/webconfig/nodejs/app.js
@@ -94,11 +94,11 @@ app.use('/rest/auth', authRouter);
app.use('/rest/configGenerator', configGenerator);
// Catch 404 and forward to error handler.
-//app.use(function (req, res, next) {
-// var err = new Error('Not Found');
-// err.status = 404;
-// next(err);
-//});
+app.use(function (req, res, next) {
+ var err = new Error('Not Found');
+ err.status = 404;
+ next(err);
+});
// Error handlers.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0370ff05/modules/webconfig/nodejs/db.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/db.js b/modules/webconfig/nodejs/db.js
index 1a2a5e7..4493438 100644
--- a/modules/webconfig/nodejs/db.js
+++ b/modules/webconfig/nodejs/db.js
@@ -45,13 +45,6 @@ exports.Space = mongoose.model('Space', new Schema({
}]
}));
-var DiscoveryObj = {
- className: String, enum: ['TcpDiscoveryVmIpFinder', 'TcpDiscoveryMulticastIpFinder', 'TcpDiscoveryS3IpFinder',
- 'TcpDiscoveryCloudIpFinder', 'TcpDiscoveryGoogleStorageIpFinder', 'TcpDiscoveryJdbcIpFinder',
- 'TcpDiscoverySharedFsIpFinder'],
- addresses: [String]
-};
-
var evictionPolicyType = {
kind: {type: String, enum: ['LRU', 'RND', 'FIFO', 'Sorted']},
LRU: {
@@ -154,9 +147,6 @@ var CacheSchema = new Schema({
exports.Cache = mongoose.model('Cache', CacheSchema);
-// Define discovery model.
-exports.Discovery = mongoose.model('Discovery', new Schema(DiscoveryObj));
-
// Define cluster schema.
var ClusterSchema = new Schema({
space: {type: ObjectId, ref: 'Space'},
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0370ff05/modules/webconfig/nodejs/package.json
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/package.json b/modules/webconfig/nodejs/package.json
index dd968cb..2c1d6dd 100644
--- a/modules/webconfig/nodejs/package.json
+++ b/modules/webconfig/nodejs/package.json
@@ -28,6 +28,8 @@
"serve-favicon": "~2.2.0"
},
"devDependencies": {
- "supertest": "^1.0.1"
+ "supertest": "^1.0.1",
+ "mocha": "~2.0.1",
+ "should": "~3.1.3"
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0370ff05/modules/webconfig/nodejs/public/javascripts/controllers/caches.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/public/javascripts/controllers/caches.js b/modules/webconfig/nodejs/public/javascripts/controllers/caches.js
index 0b9c330..1ae5921 100644
--- a/modules/webconfig/nodejs/public/javascripts/controllers/caches.js
+++ b/modules/webconfig/nodejs/public/javascripts/controllers/caches.js
@@ -92,7 +92,8 @@ configuratorModule.controller('cachesController', ['$scope', '$alert', '$http',
$scope.backupItem = angular.fromJson(sessionStorage.cacheBackupItem);
$scope.$watch('backupItem', function (val) {
- sessionStorage.cacheBackupItem = angular.toJson(val);
+ if (val)
+ sessionStorage.cacheBackupItem = angular.toJson(val);
}, true);
});
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0370ff05/modules/webconfig/nodejs/public/javascripts/controllers/clusters.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/public/javascripts/controllers/clusters.js b/modules/webconfig/nodejs/public/javascripts/controllers/clusters.js
index 9da81d8..fc4cdf1 100644
--- a/modules/webconfig/nodejs/public/javascripts/controllers/clusters.js
+++ b/modules/webconfig/nodejs/public/javascripts/controllers/clusters.js
@@ -111,7 +111,8 @@ configuratorModule.controller('clustersController', ['$scope', '$alert', '$http'
$scope.backupItem = angular.fromJson(sessionStorage.clusterBackupItem);
$scope.$watch('backupItem', function (val) {
- sessionStorage.clusterBackupItem = angular.toJson(val);
+ if (val)
+ sessionStorage.clusterBackupItem = angular.toJson(val);
}, true);
});
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0370ff05/modules/webconfig/nodejs/public/javascripts/controllers/persistences.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/public/javascripts/controllers/persistences.js b/modules/webconfig/nodejs/public/javascripts/controllers/persistences.js
index d1857ecc..6024073 100644
--- a/modules/webconfig/nodejs/public/javascripts/controllers/persistences.js
+++ b/modules/webconfig/nodejs/public/javascripts/controllers/persistences.js
@@ -43,7 +43,8 @@ configuratorModule.controller('persistenceController', ['$scope', '$alert', '$ht
$scope.backupItem = angular.fromJson(sessionStorage.persistenceBackupItem);
$scope.$watch('backupItem', function (val) {
- sessionStorage.persistenceBackupItem = angular.toJson(val);
+ if (val)
+ sessionStorage.persistenceBackupItem = angular.toJson(val);
}, true);
});
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0370ff05/modules/webconfig/nodejs/routes/caches.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/routes/caches.js b/modules/webconfig/nodejs/routes/caches.js
index 9018f9a..7de5d57 100644
--- a/modules/webconfig/nodejs/routes/caches.js
+++ b/modules/webconfig/nodejs/routes/caches.js
@@ -58,7 +58,7 @@ router.get('/', function(req, res) {
*/
router.post('/save', function(req, res) {
if (req.body._id)
- db.Cache.update({_id: req.body._id}, req.body, {upsert: true}, function(err, cache) {
+ db.Cache.update({_id: req.body._id}, req.body, {upsert: true}, function(err) {
if (err)
return res.status(500).send(err.message);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0370ff05/modules/webconfig/nodejs/routes/persistences.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/routes/persistences.js b/modules/webconfig/nodejs/routes/persistences.js
index 787453f..d891b04 100644
--- a/modules/webconfig/nodejs/routes/persistences.js
+++ b/modules/webconfig/nodejs/routes/persistences.js
@@ -88,4 +88,28 @@ router.post('/remove', function(req, res) {
})
});
+//
+router.post('/pg', function(req, res) {
+ var pg = require('pg');
+
+ //var connectionString = process.env.DATABASE_URL || 'postgres://localhost:5432/ggmonitor';
+
+ pg.connect(req.body.connectionString, function(err, client, done) {
+ if(err)
+ res.status(500).send(err.message);
+
+ client.query('select * from information_schema.tables', function(err, result) {
+ //call `done()` to release the client back to the pool
+ done();
+
+ if(err)
+ res.status(500).send(err.message);
+
+ console.log(result.rows[0]);
+
+ res.sendStatus(200);
+ });
+ });
+});
+
module.exports = router;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0370ff05/modules/webconfig/nodejs/test/routes/persistence.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/test/routes/persistence.js b/modules/webconfig/nodejs/test/routes/persistence.js
new file mode 100644
index 0000000..5d86d83
--- /dev/null
+++ b/modules/webconfig/nodejs/test/routes/persistence.js
@@ -0,0 +1,26 @@
+var request = require('supertest'),
+ should = require('should'),
+ express = require('express'),
+ persistenceRouter = require('../../routes/persistence');
+
+var app = express();
+
+app.use(require('body-parser').json());
+
+app.use('/rest/persistence', persistenceRouter);
+
+describe('request.persistence', function(){
+ var agent = request.agent(app);
+
+ it('should return 200', function(done){
+ agent
+ .post('/rest/persistence/pg')
+ .send({ connectionString: 'postgres://localhost:5432/ggmonitor' })
+ .end(function(err, res) {
+ if (err)
+ throw err;
+
+ done();
+ });
+ });
+});
\ No newline at end of file
[2/4] incubator-ignite git commit: Merge remote-tracking branch
'origin/ignite-843' into ignite-843
Posted by an...@apache.org.
Merge remote-tracking branch 'origin/ignite-843' into ignite-843
# Conflicts:
# modules/webconfig/nodejs/routes/persistence.js
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2b403d22
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2b403d22
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2b403d22
Branch: refs/heads/ignite-843
Commit: 2b403d22b1abff5eb4dbc750197f709143f57c5f
Parents: f350d12 9005bd1
Author: Andrey <an...@gridgain.com>
Authored: Thu Jun 25 11:06:23 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Jun 25 11:06:23 2015 +0700
----------------------------------------------------------------------
modules/webconfig/nodejs/db.js | 100 ++++++---
.../nodejs/public/form-models/caches.json | 200 +++++++++++++++---
.../nodejs/public/form-models/persistence.json | 20 +-
.../javascripts/controllers/persistence.js | 17 +-
.../webconfig/nodejs/routes/configGenerator.js | 2 +-
modules/webconfig/nodejs/routes/persistence.js | 74 ++++++-
modules/webconfig/nodejs/utils/generatorJava.js | 170 ++++++++-------
.../webconfig/nodejs/utils/generatorUtils.js | 71 ++++++-
modules/webconfig/nodejs/utils/generatorXml.js | 210 ++++++++++++++++---
modules/webconfig/nodejs/views/clusters.jade | 2 +-
.../nodejs/views/includes/controls.jade | 7 +
modules/webconfig/nodejs/views/persistence.jade | 14 +-
12 files changed, 719 insertions(+), 168 deletions(-)
----------------------------------------------------------------------