Skip to content

Commit 77bb403

Browse files
committed
COMPASS-86: Backport Atlas fixes
1 parent 42e08c6 commit 77bb403

File tree

4 files changed

+19
-4
lines changed

4 files changed

+19
-4
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@
122122
"moment": "^2.10.6",
123123
"mongodb": "^2.2.8",
124124
"mongodb-collection-model": "^0.2.3",
125-
"mongodb-connection-model": "5.1.0",
126-
"mongodb-data-service": "1.7.0",
125+
"mongodb-connection-model": "^6.1.0",
126+
"mongodb-data-service": "^1.8.0",
127127
"mongodb-database-model": "^0.1.2",
128128
"mongodb-explain-plan-model": "^0.2.0",
129129
"mongodb-extended-json": "^1.7.0",

src/app/connect/connect-form-view.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,14 @@ var ConnectFormView = FormView.extend({
7575

7676
return obj;
7777
},
78+
events: {
79+
'blur [name="hostname"]': 'blurHostname'
80+
},
81+
blurHostname: function(e) {
82+
if (e.target.value.match(/mongodb.net$/i)) {
83+
this.setValue('ssl', 'UNVALIDATED');
84+
}
85+
},
7886
/**
7987
* These are the default form fields that are always present in the connect dialog. Auth and
8088
* SSL fields are added/removed dynamically, depending on whether the options are expanded or

src/app/connect/index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,11 @@ var ConnectView = View.extend({
294294
// don't use "Local" as favorite name, keep field empty
295295
this.connection.name = '';
296296
this.updateForm();
297+
// @note: durran: This fixes not being able to save a new favorite
298+
// from a collection that was auto-filled from the clipboard. Needed
299+
// to be instantiated as new before saving otherwise it would get an
300+
// error saying 'url' needed to be defined.
301+
this.connection = null;
297302
},
298303

299304
/**
@@ -415,7 +420,9 @@ var ConnectView = View.extend({
415420
this.connection.name = '';
416421
if (this.connection.last_used === null) {
417422
this.connection.destroy();
418-
this.connections.deactivateAll();
423+
// this.connections.deactivateAll();
424+
// @note: durran: This is raising an error that the method is not found.
425+
// Removing doesn't seem to break anything. What was the intention?
419426
this.createNewConnection();
420427
} else {
421428
this.connection.save(null);

src/app/connect/ssl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ var NONE = {
2121

2222
var UNVALIDATED = {
2323
_id: 'UNVALIDATED',
24-
title: 'Unvalidated',
24+
title: 'Unvalidated/Atlas Deployment',
2525
description: 'Use SSL but do not perform any validation of'
2626
+ ' the certificate chain... which is basically pointless.',
2727
// @todo (imlucas) Fix `app.isFeatureEnabled` is not a function.

0 commit comments

Comments
 (0)