feat(Mode): Ability to overwrite mode configuration and small improvements (#3580)

This commit is contained in:
Igor Octaviano authored and GitHub committed 2023-08-08 10:05:20 -04:00
1 parent 58d38495f0
commit 0493a0d587
9 files changed
+77 -11

No files matched your search

@@ -50,13 +50,16 @@ function ViewerLayout({
// dataSourceIdx === -1
// ? undefined
// : `datasources=${pathname.substring(dataSourceIdx + 1)}`;
// Todo: Handle parameters in a better way.
const query = new URLSearchParams(window.location.search);
const configUrl = query.get('configUrl');
const dataSourceName = pathname.substring(dataSourceIdx + 1);
const existingDataSource = extensionManager.getDataSources(dataSourceName);
const searchQuery = new URLSearchParams();
if (dataSourceIdx !== -1) {
if (dataSourceIdx !== -1 && existingDataSource) {
searchQuery.append('datasources', pathname.substring(dataSourceIdx + 1));
}
@@ -66,7 +69,7 @@ function ViewerLayout({
navigate({
pathname: '/',
search: decodeURIComponent(searchQuery.toString()),
search: decodeURIComponent(searchQuery.toString())
});
};