@@ -155,6 +155,17 @@ class NeoDash extends React.Component {
155155 try {
156156 this . connected = false ;
157157 var url = this . connection . url ;
158+
159+ // When specifying an encrypted connection, we don't need the bolt+s / neo4j+s scheme.
160+ if ( this . connection . encryption === "on" && url . startsWith ( "bolt+s://" ) ) {
161+ url = url . replace ( "bolt+s://" , "bolt://" )
162+ this . connection . url = url ;
163+ }
164+ if ( this . connection . encryption === "on" && url . startsWith ( "neo4j+s://" ) ) {
165+ url = url . replace ( "neo4j+s://" , "neo4j://" )
166+ this . connection . url = url ;
167+ }
168+
158169 if ( ! ( url . startsWith ( "bolt://" ) || url . startsWith ( "bolt+routing://" ) || url . startsWith ( "neo4j://" ) ) ) {
159170 url = "neo4j://" + url ;
160171 }
@@ -390,10 +401,12 @@ class NeoDash extends React.Component {
390401 // this.createExternalDashboardLoadPopupModal()
391402 let parsedJson = this . parseJson ( data ) ;
392403 this . state . json = data ;
404+ this . externalLoaded = true ;
393405 // this.buildJSONFromReportsState();
394406 // console.log(this.state.connectionToLoad)
395407 if ( this . state . connectionToLoad ) {
396408 this . connection = this . state . connectionToLoad ;
409+ console . log ( this . connection )
397410 if ( this . connection . password ) {
398411 this . confirmation = true ;
399412 this . connect ( ) ;
@@ -407,7 +420,8 @@ class NeoDash extends React.Component {
407420 } )
408421 this . stateChanged ( { label : "OpenConnectionModal" } )
409422 var select = document . getElementById ( 'root' ) ;
410- select . removeChild ( select . childNodes . item ( 9 ) ) ;
423+ // TODO - remove duplicate modal
424+ // select.removeChild(select.childNodes.item(9));
411425
412426
413427 } ) . catch ( error => {
0 commit comments