ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [09/50] incubator-ignite git commit: Merge ignite-843 into ignite-1155
Date Wed, 05 Aug 2015 01:15:00 GMT
Merge ignite-843 into ignite-1155


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

Branch: refs/heads/ignite-843
Commit: f1b035119f5d32303e34c0ee99ee9451d635836a
Parents: a40aaf6 505bae0
Author: sevdokimov <sergey.evdokimov@jetbrains.com>
Authored: Fri Jul 31 10:36:15 2015 +0300
Committer: sevdokimov <sergey.evdokimov@jetbrains.com>
Committed: Fri Jul 31 10:36:15 2015 +0300

----------------------------------------------------------------------
 modules/control-center-web/pom.xml              |  69 ++++++++
 .../src/main/js/agents/agent-manager.js         |   6 +-
 modules/control-center-web/src/main/js/app.js   |   8 +-
 .../src/main/js/controllers/common-module.js    |  44 ++++--
 .../src/main/js/controllers/models/caches.json  |  15 +-
 .../main/js/controllers/models/metadata.json    |  12 +-
 .../src/main/js/controllers/models/sql.json     |   3 +
 .../src/main/js/controllers/sql-controller.js   | 156 ++++++++++++++-----
 .../main/js/controllers/summary-controller.js   |  15 +-
 modules/control-center-web/src/main/js/db.js    |  12 ++
 .../control-center-web/src/main/js/package.json |   2 -
 .../src/main/js/routes/generator/common.js      |   4 +-
 .../src/main/js/routes/generator/java.js        | 101 ++++++------
 .../src/main/js/routes/generator/xml.js         |  93 ++++++-----
 .../src/main/js/routes/notebooks.js             | 102 ++++++++++++
 .../src/main/js/routes/sql.js                   |   4 +-
 .../src/main/js/routes/summary.js               |  19 ++-
 .../src/main/js/views/configuration/caches.jade |   2 +-
 .../src/main/js/views/includes/controls.jade    |   5 +-
 .../src/main/js/views/includes/header.jade      |   7 +-
 .../src/main/js/views/sql/sql.jade              | 112 ++++++-------
 .../src/main/js/views/templates/layout.jade     |   2 +-
 .../src/test/js/routes/agent.js                 |  94 +++++++++++
 .../datastreamer/DataStreamerImpl.java          |  22 +++
 .../datastreamer/DataStreamerUpdateJob.java     |  20 ++-
 .../TcpDiscoveryIpFinderAbstractSelfTest.java   |   2 +-
 .../gce/TcpDiscoveryGoogleStorageIpFinder.java  |  18 +++
 ...pDiscoveryGoogleStorageIpFinderSelfTest.java |  29 +++-
 modules/nodejs/src/main/js/cache.js             |  13 ++
 modules/nodejs/src/main/js/cluster-node.js      |  23 ++-
 modules/nodejs/src/main/js/ignite.js            |   5 +-
 .../http/jetty/GridJettyJsonConfig.java         |   3 +
 modules/yardstick/config/benchmark.properties   |   6 +-
 .../yardstick/IgniteBenchmarkArguments.java     |  22 +++
 .../yardstick/cache/IgnitePutAllBenchmark.java  |  67 ++++++++
 .../cache/IgnitePutAllTxBenchmark.java          |  68 ++++++++
 36 files changed, 939 insertions(+), 246 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f1b03511/modules/control-center-web/src/main/js/agents/agent-manager.js
----------------------------------------------------------------------
diff --cc modules/control-center-web/src/main/js/agents/agent-manager.js
index 423165e,10d3a56..eae04bd
--- a/modules/control-center-web/src/main/js/agents/agent-manager.js
+++ b/modules/control-center-web/src/main/js/agents/agent-manager.js
@@@ -183,80 -193,57 +183,82 @@@ Client.prototype.authResult = function(
  };
  
  /**
 - * @param {Object} msg
 + * @param {String} jdbcDriverJarPath
 + * @param {String} jdbcDriverClass
 + * @param {String} jdbcUrl
 + * @param {Object} jdbcInfo
 + * @param {Boolean} tablesOnly
 + * @param {Function} cb Callback. Take 3 arguments: {String} error, {Object} exception,
{Object} result.
   */
 -Client.prototype._handleMessage = function(msg) {
 +Client.prototype.extractMetadata = function(jdbcDriverJarPath, jdbcDriverClass, jdbcUrl,
jdbcInfo, tablesOnly, cb) {
 +    this._invokeRmtMethod('extractMetadata', arguments)
 +};
 +
 +Client.prototype._invokeRmtMethod = function(methodName, args) {
 +    var cb = null;
 +
 +    var m = argsToArray(args);
 +
 +    if (m.length > 0 && typeof m[m.length - 1] == 'function')
 +        cb = m.pop();
 +
 +    var msg = {
 +        mtdName: methodName,
 +        args: m
 +    };
 +
 +    if (cb) {
 +        var reqId = this._reqCounter++;
 +
 +        this._cbMap[reqId] = cb;
 +
 +        msg.reqId = reqId;
 +    }
 +
 +    this._ws.send(JSON.stringify(msg))
 +};
 +
 +Client.prototype._rmtAuthMessage = function(msg) {
      var self = this;
  
 -    switch (msg.type) {
 -        case 'AuthMessage':
 -            var account = db.Account.findByUsername(msg.login, function(err, account) {
 -                if (err) {
 -                    ws.send("{type: 'AuthResult', success: false}");
 +    var account = db.Account.findByUsername(msg.login, function(err, account) {
 +        if (err) {
 +            self.authResult("User not found");
 +        }
 +        else {
 +            account.authenticate(msg.password, function(err, user, res) {
 +                if (!user) {
 +                    self.authResult(res.message);
                  }
                  else {
 -                    account.authenticate(msg.password, function(err, user, res) {
 -                        if (!user) {
 -                            self._ws.send(JSON.stringify({type: 'AuthResult', success: false,
message: res.message}));
 -                        }
 -                        else {
 -                            self._ws.send("{type: 'AuthResult', success: true}");
 +                    self.authResult(null);
  
 -                            self._user = account;
 +                    self._user = account;
  
 -                            self._manager._addClient(account._id, self);
 +                    self._manager._addClient(account._id, self);
  
-                     self._ignite = new ignite.Ignite(new AgentServer(self));
+                             self._ignite = new apacheIgnite.Ignite(new AgentServer(self));
+                         }
+                     });
                  }
              });
 +        }
 +    });
 +};
  
 -            break;
 -
 -        case 'RestResult':
 -            var cb = this._cbMap[msg.requestId];
 -
 -            if (!cb)
 -                break;
 -
 -            delete this._cbMap[msg.requestId];
 +Client.prototype._rmtCallRes = function(msg) {
 +    var cb = this._cbMap[msg.reqId];
  
 -            if (!msg.executed) {
 -                cb(msg.message)
 -            }
 -            else {
 -                cb(null, msg.code, msg.message)
 -            }
 +    if (!cb) return;
  
 -            break;
 +    delete this._cbMap[msg.reqId];
  
 -        default:
 -            this._ws.close()
 -    }
 +    if (msg.error)
 +        cb(msg.error);
 +    else if (msg.ex)
 +        cb(null, ex);
 +    else
 +        cb(null, null, msg.res);
  };
  
  /**


Mime
View raw message