From baf4bfb7627f62ad6ac97338d340a4ff346800e8 Mon Sep 17 00:00:00 2001 From: Lucas Hrabovsky Date: Wed, 20 Jul 2016 13:52:12 -0400 Subject: [PATCH 1/4] INT-1650: Fix TypeError: Property 'ssh_tunnel_port' must be of type number MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The form default view is `’’` which is false-y so we were trying to set an empty string as a number. --- src/app/connect/connect-form-view.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app/connect/connect-form-view.js b/src/app/connect/connect-form-view.js index 4fd35de936a..02a2b805253 100644 --- a/src/app/connect/connect-form-view.js +++ b/src/app/connect/connect-form-view.js @@ -68,9 +68,7 @@ var ConnectFormView = FormView.extend({ // fill in all default fields obj.hostname = obj.hostname.toLowerCase() || 'localhost'; obj.port = parseInt(obj.port || 27017, 10); - if (obj.ssh_tunnel_port) { - obj.ssh_tunnel_port = parseInt(obj.ssh_tunnel_port, 10); - } + obj.ssh_tunnel_port = parseInt(obj.ssh_tunnel_port || 22, 10); // make a friendly connection name // this.makeFriendlyName(obj); From 83616744d23fdd5f6651aa5e277046306c69860c Mon Sep 17 00:00:00 2001 From: Lucas Hrabovsky Date: Tue, 26 Jul 2016 13:33:21 -0400 Subject: [PATCH 2/4] :arrow_up: mongodb-connection-model@5.0.0 https://github.com/mongodb-js/connection-model/pull/87 - All logic in one place for easier DX and release management - Refactor `connect()` so if you specify ssh tunnel options, it all just works. - New `status` events to enable live updating status bars @rueckstiess would like to implement. - This will be an `npm version major` and subsequent major of data-service. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0a926e83298..39139edec1e 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,7 @@ "marked": "^0.3.5", "moment": "^2.10.6", "mongodb-collection-model": "^0.2.3", - "mongodb-connection-model": "^4.3.0", + "mongodb-connection-model": "^5.0.0", "mongodb-data-service": "^0.3.0", "mongodb-database-model": "^0.1.2", "mongodb-explain-plan-model": "^0.2.0", From 6a918eed64a09c1d3bbf17c255937081e931eb9a Mon Sep 17 00:00:00 2001 From: Lucas Hrabovsky Date: Tue, 26 Jul 2016 17:49:34 -0400 Subject: [PATCH 3/4] :arrow_up: mongodb-data-service@1.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 39139edec1e..f105c9d72d8 100644 --- a/package.json +++ b/package.json @@ -122,7 +122,7 @@ "moment": "^2.10.6", "mongodb-collection-model": "^0.2.3", "mongodb-connection-model": "^5.0.0", - "mongodb-data-service": "^0.3.0", + "mongodb-data-service": "^1.0.0", "mongodb-database-model": "^0.1.2", "mongodb-explain-plan-model": "^0.2.0", "mongodb-extended-json": "^1.6.0", From e01725a86ee2ea2a83a6b12108fc34dea18c4b7c Mon Sep 17 00:00:00 2001 From: Lucas Hrabovsky Date: Wed, 27 Jul 2016 10:07:27 -0400 Subject: [PATCH 4/4] data-service@1.0.0 uses standard node.js style event names --- src/app/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/index.js b/src/app/index.js index afbbe1154de..81e1f0b513d 100644 --- a/src/app/index.js +++ b/src/app/index.js @@ -398,8 +398,8 @@ app.extend({ var DataService = require('mongodb-data-service'); app.dataService = new DataService(state.connection) - .on(DataService.Events.Readable, state.onClientReady.bind(state)) - .on(DataService.Events.Error, state.onFatalError.bind(state, 'create client')); + .on('readable', state.onClientReady.bind(state)) + .on('error', state.onFatalError.bind(state, 'create client')); app.dataService.connect(function() { ApplicationStore.dataService = app.dataService;