Skip to content

Commit 0ce0f01

Browse files
committed
Added fix for inconsistent url + encryption specifications
1 parent 5955f48 commit 0ce0f01

File tree

3 files changed

+21
-12
lines changed

3 files changed

+21
-12
lines changed

release-notes.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
### NeoDash 1.1 - Multi-page & interactive Neo4j dashboard builder
2-
- Added multi-page dashboards with new dashboard file format.
3-
- Added geographical (Map) visualizations.
4-
- Added better markdown support for code fragments and lists.
5-
- Added the option to embed webpages into reports using iFrames.
6-
- Resolved bug where node labels clip out of graph visualization reports.
7-
- Improved/added documentation (hints) as part of the dashboard builder.
8-
- Improved performance of the 'Property selection' reports.
9-
- A ton of stability improvements and misc bug fixes!
10-
1+
### NeoDash 1.1.1 - Neo4j Dashboard Builder
2+
- Added dashboard sharing functionality.
3+
- Fixed unintuitive margins for bar chart reports.
4+
- Added abort button to save/load screen.
5+
- Added automatic fix for inconsistent DB url + encryption configurations.

src/NeoDash.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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 => {

src/component/NeoShareModal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import NeoTextInput from "./NeoTextInput";
1414
* The content of the modal is a large multi-line textbox for specifying a dashboard file as JSON.
1515
*/
1616
class NeoShareModal extends NeoModal {
17-
baseURL = "http://localhost:3000/";
17+
baseURL = "https://nielsdejong.nl/neodash/";
1818

1919
constructor(props) {
2020
super(props);

0 commit comments

Comments
 (0)