Skip to content
Snippets Groups Projects
Commit 15e078d1 authored by Nico Vermaas's avatar Nico Vermaas
Browse files

bugfix: "Clicking 'Query this Dataset` often shows the IVOA query"

(Jira ticket SDC-230)
parent 862ca8f1
No related branches found
No related tags found
1 merge request!28bugfix: "Clicking 'Query this Dataset` often shows the IVOA query"
Pipeline #14794 passed
......@@ -20,7 +20,7 @@ export default function QueryCatalogs() {
const { uri } = useParams();
console.log("uri:", uri);
console.log("default conf:", defaultConf);
//alert("QueryCatalogs() : "+config.query_schema.name)
// set ConfigName for archive
useEffect(() => {
switch (uri) {
......@@ -50,10 +50,12 @@ export default function QueryCatalogs() {
}
return () => {
// nv: why is this needed?
//alert('cleaned up')
console.log("cleaned up");
queryMap.clear();
setFormData();
//setConfigName(defaultConf);
setConfigName(defaultConf);
};
}, [uri]);
......@@ -120,6 +122,7 @@ export default function QueryCatalogs() {
</div>
))}
</div>
{description}
</div>
);
......
......@@ -46,7 +46,9 @@ export function QueryContextProvider({ children }) {
});
setConfig(config);
});
}, [api_host, configName, dplevel, collection]);
}, [api_host, configName]);
//}, [api_host, configName, dplevel, collection]);
console.log("config: ", { config });
return (
......
......@@ -23,6 +23,9 @@ export default function Routes() {
if (!navbar) return null;
// nv: if no jhubURL can be loaded then whole website should be blank? Isn't that overkill? commented it out for now
// if (!jhubURL) return null;
return (
<Router basename={navbar.frontend_basename}>
......@@ -46,6 +49,10 @@ export default function Routes() {
<Route exact path="/logout" component={handleLogout} />
<Route exact path="/error" component={handleError} />
<Route exact path="/archives/:uri" component={ArchiveDetails} />
<Route exact path={["/query", "/archives/:uri/query"]}>
<QueryCatalogs />
</Route>
<Route exact path="/archives/ivoa/query">
<IVOAContextProvider>
<QueryIVOARegistry />
......@@ -65,7 +72,7 @@ export default function Routes() {
</Switch>
<footer><small>esap-gui version 2 jul 2021 - 11:00</small></footer>
<footer><small>esap-gui version 2 jul 2021 - 14:00</small></footer>
</Router>
);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment