Skip to content

Commit 3f173ce

Browse files
committed
Fixed issue where dashboard database was not set correctly for share links without credentials
1 parent 3b71740 commit 3f173ce

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/application/ApplicationThunks.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,9 @@ export const createConnectionThunk =
8787
'ERR - connect to DB',
8888
database,
8989
'',
90-
`Error while trying to establish connection to Neo4j DB in ${
91-
neodashMode
92-
} mode at ${
93-
Date(Date.now()).substring(0, 33)}`
90+
`Error while trying to establish connection to Neo4j DB in ${neodashMode} mode at ${Date(
91+
Date.now()
92+
).substring(0, 33)}`
9493
)
9594
);
9695
}
@@ -113,11 +112,10 @@ export const createConnectionThunk =
113112
'INF - connect to DB',
114113
database,
115114
'',
116-
`${username
117-
} established connection to Neo4j DB in ${
118-
neodashMode
119-
} mode at ${
120-
Date(Date.now()).substring(0, 33)}`
115+
`${username} established connection to Neo4j DB in ${neodashMode} mode at ${Date(Date.now()).substring(
116+
0,
117+
33
118+
)}`
121119
)
122120
);
123121
}
@@ -261,12 +259,12 @@ export const handleSharedDashboardsThunk = () => (dispatch: any) => {
261259
const skipConfirmation = urlParams.get('skipConfirmation') == 'Yes';
262260

263261
const dashboardDatabase = urlParams.get('dashboardDatabase');
262+
dispatch(setStandaloneDashboardDatabase(dashboardDatabase));
264263
if (urlParams.get('credentials')) {
265264
const connection = decodeURIComponent(urlParams.get('credentials'));
266265
const protocol = connection.split('://')[0];
267266
const username = connection.split('://')[1].split(':')[0];
268267
const password = connection.split('://')[1].split(':')[1].split('@')[0];
269-
270268
const database = connection.split('@')[1].split(':')[0];
271269
const url = connection.split('@')[1].split(':')[1];
272270
const port = connection.split('@')[1].split(':')[2];

0 commit comments

Comments
 (0)