Skip to content

Commit ab20f74

Browse files
committed
Hotfix for missing configuration check in 2.0.7
1 parent 0e8a982 commit ab20f74

File tree

5 files changed

+27
-4
lines changed

5 files changed

+27
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "neodash",
3-
"version": "2.0.7",
3+
"version": "2.0.8",
44
"description": "NeoDash - Neo4j Dashboard Builder",
55
"neo4jDesktop": {
66
"apiVersion": "^1.2.0"

release-notes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## NeoDash 2.0.8
2+
Hotfix for missing config file in Neo4j Desktop causing startup issue.
3+
14
## NeoDash 2.0.7
25
Application functionality:
36
- Added standalone 'dashboard viewer' mode.

src/application/ApplicationThunks.tsx

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,24 @@ export const onConfirmLoadSharedDashboardThunk = () => (dispatch: any, getState:
165165

166166

167167
export const loadApplicationConfigThunk = () => async (dispatch: any, getState: any) => {
168+
var config = {
169+
ssoEnabled: false,
170+
ssoDiscoveryUrl: "http://example.com",
171+
standalone: false,
172+
standaloneProtocol: "neo4j",
173+
standaloneHost: "localhost",
174+
standalonePort: "7687",
175+
standaloneDatabase: "neo4j",
176+
standaloneDashboardName: "My Dashboard",
177+
standaloneDashboardDatabase: "dashboards"
178+
}
179+
try {
180+
config = await (await fetch("/config.json")).json();
181+
}catch (e){
182+
// Config may not be found, for example when we are in Neo4j Desktop.
183+
console.log("No config file detected. Setting to safe defaults.")
184+
}
168185
try {
169-
const config = await (await fetch("/config.json")).json();
170186
dispatch(setSSOEnabled(config['ssoEnabled'], config["ssoDiscoveryUrl"]));
171187
const state = getState();
172188
const standalone = config['standalone'];// || (state.application.shareDetails !== undefined && state.application.shareDetails.standalone);
@@ -194,6 +210,6 @@ export const loadApplicationConfigThunk = () => async (dispatch: any, getState:
194210
}
195211
} catch (e) {
196212
dispatch(setWelcomeScreenOpen(false));
197-
dispatch(createNotificationUndismissableThunk("Unable to load application configuration", "Do you have a valid config.json deployed with your application?"));
213+
dispatch(createNotificationThunk("Unable to load application configuration", "Do you have a valid config.json deployed with your application?"));
198214
}
199215
}

src/modal/AboutModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import BugReportIcon from '@material-ui/icons/BugReport';
1313
export const NeoAboutModal = ({ open, handleClose, getDebugState }) => {
1414
const app = "NeoDash - Neo4j Dashboard Builder";
1515
const email = "[email protected]";
16-
const version = "2.0.7";
16+
const version = "2.0.8";
1717

1818
const downloadDebugFile = () => {
1919
const element = document.createElement("a");

tools/push-docker-image.bash

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
docker image tag neodash nielsdejong/neodash
2+
docker image tag neodash nielsdejong/neodash:2.0.8
3+
docker push nielsdejong/neodash:latest
4+
docker push nielsdejong/neodash:2.0.8

0 commit comments

Comments
 (0)