From 958107eed8ec4bfb8297f8858fbcd7321af561a3 Mon Sep 17 00:00:00 2001 From: Ross Cruickshank Date: Wed, 16 Sep 2020 22:03:15 +0100 Subject: [PATCH] allow selecting replica-set change config dialog to allow direct, replica and atlas-style clustering, with ability to addoptional connect parameters connect parameters enable access to IBM Cloud Databases for MongoDB, including ssl/tls support. --- storage/mongodb/66-mongodb.html | 73 ++++++++++++++++++++++++++------- 1 file changed, 58 insertions(+), 15 deletions(-) diff --git a/storage/mongodb/66-mongodb.html b/storage/mongodb/66-mongodb.html index 05179a75..c3dbaadc 100644 --- a/storage/mongodb/66-mongodb.html +++ b/storage/mongodb/66-mongodb.html @@ -6,18 +6,24 @@ -
- - +
+ +
+ +
+ + +
+
-
- - -
@@ -43,7 +49,8 @@ color: "rgb(218, 196, 180)", defaults: { hostname: {value: "127.0.0.1", required: true}, - clustered: {value: true, required: true}, + topology: {value: "direct", required: true}, + connectOptions: {value: "", required: false}, port: {value: 27017, required: true}, db: {value: "", required: true}, name: {value: ""} @@ -56,19 +63,55 @@ return this.name || this.db + "@" + this.hostname; }, oneditprepare: function() { - $("#node-config-input-clustered").on("change",function () { - if ( $("#node-config-input-clustered").is(":checked") ) { - $(".node-config-input-port").hide(); - $(".node-config-clusterVersion").show(); - } else { + $("#node-config-input-topology").on("change", function() { + var topology = $("#node-config-input-topology option:selected").val(); + if (topology === "direct") { $(".node-config-input-port").show(); - $(".node-config-clusterVersion").hide(); + } else { + $(".node-config-input-port").hide(); } - }) + }); }, }); +