feat(data source UI config): Popup the configuration dialogue whenever a data source is not fully configured (#3620)
This commit is contained in:
1 parent
5856ae2464
commit
adedc8c382
10 files changed
+93
-53
No files matched your search
@@ -125,6 +125,7 @@ function DataSourceWrapper(props) {
|
||||
|
||||
useEffect(() => {
|
||||
const dataSourceChangedCallback = () => {
|
||||
setIsLoading(false);
|
||||
setIsDataSourceInitialized(false);
|
||||
setDataSourcePath('');
|
||||
setDataSource(extensionManager.getActiveDataSource()[0]);
|
||||
@@ -191,7 +192,16 @@ function DataSourceWrapper(props) {
|
||||
(!isLoading && (newOffset !== previousOffset || isLocationUpdated));
|
||||
|
||||
if (isDataInvalid) {
|
||||
getData().catch(() => navigate('/notfoundserver', '_self'));
|
||||
getData().catch(() => {
|
||||
// If there is a data source configuration API, then the Worklist will popup the dialog to attempt to configure it
|
||||
// and attempt to resolve this issue.
|
||||
if (dataSource.getConfig().configurationAPI) {
|
||||
return;
|
||||
}
|
||||
|
||||
// No data source configuration API, so navigate to the not found server page.
|
||||
navigate('/notfoundserver', '_self');
|
||||
});
|
||||
}
|
||||
} catch (ex) {
|
||||
console.warn(ex);
|
||||
|
||||
Reference in new issue
Block a user