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

fixing some bugs (and introducting new ones)

parent 32979d3c
No related branches found
No related tags found
1 merge request!24fixing some bugs (and introducting new ones)
Pipeline #14540 passed
...@@ -6,14 +6,6 @@ import { NavLink } from "react-router-dom"; ...@@ -6,14 +6,6 @@ import { NavLink } from "react-router-dom";
export default function ArchiveCard({ archive }) { export default function ArchiveCard({ archive }) {
return ( return (
<Card> <Card>
<Button
className="mt-3"
as={NavLink}
variant="outline-primary"
to={`/archives/${archive.uri}`}
>
Visit {archive.name} Archives
</Button>
<Card.Body> <Card.Body>
<Card.Title className="h2">{archive.name}</Card.Title> <Card.Title className="h2">{archive.name}</Card.Title>
...@@ -38,7 +30,14 @@ export default function ArchiveCard({ archive }) { ...@@ -38,7 +30,14 @@ export default function ArchiveCard({ archive }) {
</Row> </Row>
</Container> */} </Container> */}
<Button
className="mt-3"
as={NavLink}
variant="outline-primary"
to={`/archives/${archive.uri}`}
>
Visit {archive.name} Archives
</Button>
</Card.Body> </Card.Body>
</Card> </Card>
); );
......
...@@ -7,7 +7,6 @@ import LoadingSpinner from "../LoadingSpinner"; ...@@ -7,7 +7,6 @@ import LoadingSpinner from "../LoadingSpinner";
import Paginate from "../Paginate"; import Paginate from "../Paginate";
import HandlePreview from "./HandlePreview"; import HandlePreview from "./HandlePreview";
import Preview from "./Preview"; import Preview from "./Preview";
import SaveBasketButton from "../basket/SaveBasketButton";
import AddToBasket from "../basket/AddToBasketCheckBox"; import AddToBasket from "../basket/AddToBasketCheckBox";
function SAMPBasketItem(record){ function SAMPBasketItem(record){
...@@ -70,7 +69,7 @@ export default function ASTRONVOResults({ catalog }) { ...@@ -70,7 +69,7 @@ export default function ASTRONVOResults({ catalog }) {
numAdjacent={3} numAdjacent={3}
numPages={numPages} numPages={numPages}
/> />
<SaveBasketButton />
<Table className="mt-3" responsive> <Table className="mt-3" responsive>
<thead> <thead>
<tr className="bg-light"> <tr className="bg-light">
......
...@@ -42,20 +42,27 @@ export default function QueryCatalogs() { ...@@ -42,20 +42,27 @@ export default function QueryCatalogs() {
case "lofar": case "lofar":
setConfigName("lofar"); setConfigName("lofar");
break; break;
case "ivoa":
setConfigName("esap_ivoa");
break;
default: default:
break; break;
} }
return () => { return () => {
console.log("cleaned up"); console.log("cleaned up");
queryMap.clear(); queryMap.clear();
setFormData(); setFormData();
setConfigName(defaultConf); //setConfigName(defaultConf);
}; };
}, [uri]); }, [uri]);
useEffect(() => { useEffect(() => {
console.log(config.query_schema); console.log(config.query_schema);
if (!formData) return; if (!formData) {
return;
}
queryMap.clear(); queryMap.clear();
const gui = config.query_schema.name; const gui = config.query_schema.name;
const queries = parseQueryForm(gui, formData); const queries = parseQueryForm(gui, formData);
......
...@@ -27,6 +27,7 @@ export function QueryContextProvider({ children }) { ...@@ -27,6 +27,7 @@ export function QueryContextProvider({ children }) {
axios axios
.get(api_host + "query/configuration" + configNameString) .get(api_host + "query/configuration" + configNameString)
.then((response) => { .then((response) => {
//alert(configNameString)
let config = response.data["configuration"]; let config = response.data["configuration"];
let props = config.query_schema.properties; let props = config.query_schema.properties;
console.log("config props: ", props); console.log("config props: ", props);
...@@ -63,6 +64,7 @@ export function QueryContextProvider({ children }) { ...@@ -63,6 +64,7 @@ export function QueryContextProvider({ children }) {
collection, collection,
setCollection, setCollection,
config, config,
configName,
setConfigName, setConfigName,
defaultConf, defaultConf,
ds9, ds9,
......
...@@ -64,7 +64,7 @@ export default function Routes() { ...@@ -64,7 +64,7 @@ export default function Routes() {
</Switch> </Switch>
<footer><small>esap-gui version 22 jun 2021 - 13:00</small></footer> <footer><small>esap-gui version 28 jun 2021 - 15:00</small></footer>
</Router> </Router>
); );
} }
...@@ -16,35 +16,35 @@ import { ...@@ -16,35 +16,35 @@ import {
export const getShoppingIcon = (type) => { export const getShoppingIcon = (type) => {
let icon = undefined let icon = undefined
let color = "darkgreen" let color = "darkgreen"
let size = 'md' let size = 'sm'
if (type === 'cart') { if (type === 'cart') {
icon = faShoppingCart icon = faShoppingCart
size = "md" size = "sm"
color = "white" color = "white"
} }
if (type === 'cart_dark_large') { if (type === 'cart_dark_large') {
icon = faShoppingCart icon = faShoppingCart
size = "md" size = "sm"
color = "blue" color = "blue"
} }
if (type === 'must_save_cart') { if (type === 'must_save_cart') {
icon = faShoppingCart icon = faShoppingCart
size = "md" size = "sm"
color = "red" color = "red"
} }
if (type === 'save_cart') { if (type === 'save_cart') {
icon = faCartArrowDown icon = faCartArrowDown
size = "md" size = "sm"
color = "white" color = "white"
} }
if (type === 'plus_cart') { if (type === 'plus_cart') {
icon = faCartPlus icon = faCartPlus
size = "md" size = "sm"
color = "white" color = "white"
} }
...@@ -54,7 +54,7 @@ export const getShoppingIcon = (type) => { ...@@ -54,7 +54,7 @@ export const getShoppingIcon = (type) => {
export const getThumbnailIcon = () => { export const getThumbnailIcon = () => {
let icon = faImage let icon = faImage
let color = "white" let color = "white"
let size = 'md' let size = 'sm'
return <FontAwesomeIcon size={size} icon={icon} color={color}/> return <FontAwesomeIcon size={size} icon={icon} color={color}/>
} }
...@@ -62,7 +62,7 @@ export const getThumbnailIcon = () => { ...@@ -62,7 +62,7 @@ export const getThumbnailIcon = () => {
export const getQueryIcon = () => { export const getQueryIcon = () => {
let icon = faSearchPlus let icon = faSearchPlus
let color = "white" let color = "white"
let size = 'md' let size = 'sm'
return <FontAwesomeIcon size={size} icon={icon} color={color}/> return <FontAwesomeIcon size={size} icon={icon} color={color}/>
} }
...@@ -70,7 +70,7 @@ export const getQueryIcon = () => { ...@@ -70,7 +70,7 @@ export const getQueryIcon = () => {
export const getTrashIcon = (color) => { export const getTrashIcon = (color) => {
let icon = faTrashAlt let icon = faTrashAlt
//let color = "white" //let color = "white"
let size = 'md' let size = 'sm'
return <FontAwesomeIcon size={size} icon={icon} color={color}/> return <FontAwesomeIcon size={size} icon={icon} color={color}/>
} }
......
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