diff --git a/src/components/services/Interactive.js b/src/components/services/Interactive.js index 00d59d047c120c0bb308624a82490291b799bec1..7bff0ee3416634b42f0d152a483a90ee02c77105 100644 --- a/src/components/services/Interactive.js +++ b/src/components/services/Interactive.js @@ -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> ); diff --git a/src/contexts/IDAContext.js b/src/contexts/IDAContext.js index 0b006f6e400dbf6b2f86e89104c43e53dabb81e6..4ad259c77d421fcb3c9d22ae7a71ba16d6ee7ad3 100644 --- a/src/contexts/IDAContext.js +++ b/src/contexts/IDAContext.js @@ -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}