Skip to content
Snippets Groups Projects
Commit 2d9f9518 authored by John Swinbank's avatar John Swinbank
Browse files

Use “IDA system” rather than “JupyterHub”

These services are not all JupyterHub systems. Indeed, at time of writing the
only service we've actually configured in esap-api-gateway is MyBinder, which
isn't a JupyterHub at all. Calling them “jhub” or similar is going to cause
confusion.
parent 14db5620
No related branches found
No related tags found
2 merge requests!42Don't provide default URLs for IDA services,!41Don't provide default URLs for IDA services
......@@ -5,7 +5,7 @@ import { GlobalContext } from "../../contexts/GlobalContext";
export default function Interactive() {
const { jhubURL, setJhubURL, jnotebookURL, setJnotebookURL, batchsystemsURL, setBatchsystemsURL, list_of_jnotebooks, setList_of_jnotebooks, list_of_jhubs, setList_of_jhubs} = useContext(IDAContext);
const { idaSystemURL, setIdaSystemURL, jnotebookURL, setJnotebookURL, batchsystemsURL, setBatchsystemsURL, list_of_jnotebooks, setList_of_jnotebooks, list_of_idaSystems, setList_of_idaSystems} = useContext(IDAContext);
const { api_host } = useContext(GlobalContext);
let list_of_batchsystems = [
......@@ -13,7 +13,7 @@ export default function Interactive() {
{"name" : "CTA DIRAC", "url" : "https://ccdcta-web.in2p3.fr/DIRAC/"},
]
if ((!list_of_jnotebooks) || (!list_of_jhubs) || (!list_of_batchsystems)) {
if ((!list_of_jnotebooks) || (!list_of_idaSystems) || (!list_of_batchsystems)) {
return null
}
......@@ -33,18 +33,18 @@ export default function Interactive() {
</Form>
<Form className="mt-5">
<Form.Group controlId="jhub" onChange={
(event) => setJhubURL(list_of_jhubs.find((item) => item.name === event.target.value).url)
(event) => setIdaSystemURL(list_of_idaSystems.find((item) => item.name === event.target.value).url)
}>
<Form.Label>
<h3>Select ESCAPE JupyterHub Services</h3>
<h3>Select ESCAPE Interactive Data Analysis Services</h3>
</Form.Label>
<Form.Control className="mt-1" as="select">
{list_of_jhubs.map((option) => <option>{option.name}</option>)}
{list_of_idaSystems.map((option) => <option>{option.name}</option>)}
</Form.Control>
</Form.Group>
</Form>
<Button href={api_host + "ida/deploy?facility=" + jhubURL + "&workflow=" + jnotebookURL} target="_blank">Deploy</Button>
<Button href={api_host + "ida/deploy?facility=" + idaSystemURL + "&workflow=" + jnotebookURL} target="_blank">Deploy</Button>
</Container>
);
......
......@@ -7,11 +7,11 @@ export const IDAContext = createContext();
export function IDAContextProvider({ children }) {
const { api_host } = useContext(GlobalContext);
const [jhubURL, setJhubURL] = useState();
const [idaSystemURL, setIdaSystemURL] = useState();
const [jnotebookURL, setJnotebookURL] = useState();
const [batchsystemsURL, setBatchsystemsURL] = useState("https://dirac.egi.eu");
const [list_of_jnotebooks, setList_of_jnotebooks] = useState();
const [list_of_jhubs, setList_of_jhubs] = useState();
const [list_of_idaSystems, setList_of_idaSystems] = useState();
// Fetch Notebooks
useEffect(() => {
......@@ -29,8 +29,8 @@ export function IDAContextProvider({ children }) {
axios
.get(api_host + "ida/facilities/search")
.then((response) => {
setList_of_jhubs(response.data.results);
setJhubURL(response.data.results[0].url);
setList_of_idaSystems(response.data.results);
setIdaSystemURL(response.data.results[0].url);
});
}, [api_host]);
......@@ -38,16 +38,16 @@ export function IDAContextProvider({ children }) {
return (
<IDAContext.Provider
value={{
jhubURL,
setJhubURL,
idaSystemURL,
setIdaSystemURL,
jnotebookURL,
setJnotebookURL,
batchsystemsURL,
setBatchsystemsURL,
list_of_jnotebooks,
setList_of_jnotebooks,
list_of_jhubs,
setList_of_jhubs
list_of_idaSystems,
setList_of_idaSystems
}}
>
{children}
......
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