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

Merge branch 'issue/98-skip-button' into 'master'

[IDA] Added skip button & default empty Binder project

See merge request astron-sdc/esap-gui!85
parents 279c5969 812d4624
No related branches found
No related tags found
1 merge request!85[IDA] Added skip button & default empty Binder project
Pipeline #25847 passed
...@@ -156,13 +156,22 @@ ...@@ -156,13 +156,22 @@
} }
.next-button { .next-button {
margin-left:100px; margin-left:20px;
margin-top:20px; margin-top:20px;
width:180px; width:180px;
height:40px; height:40px;
float:right; float:right;
} }
.skip-button {
margin-left:20px;
margin-top:20px;
width:180px;
height:40px;
float:right;
}
.back-button { .back-button {
margin-right:30px; margin-right:30px;
width:50px; width:50px;
......
...@@ -13,12 +13,13 @@ export default function Interactive() { ...@@ -13,12 +13,13 @@ export default function Interactive() {
const [searchTerm, setSearchTerm] = React.useState(""); const [searchTerm, setSearchTerm] = React.useState("");
const [showFacilities, setShowFacilities] = React.useState(false); const [showFacilities, setShowFacilities] = React.useState(false);
const [showNext, setShowNext] = React.useState(false); const [showNext, setShowNext] = React.useState(false);
const [showSkip, setShowSkip] = React.useState(true);
const [showBack, setShowBack] = React.useState(false); const [showBack, setShowBack] = React.useState(false);
const [showMoreButton, setShowMoreButton] = React.useState(true); const [showMoreButton, setShowMoreButton] = React.useState(true);
const [showDeploy, setShowDeploy] = React.useState(false); const [showDeploy, setShowDeploy] = React.useState(false);
const [numberOfitemsShown, setNumberOfitemsShown] = React.useState(3) const [numberOfitemsShown, setNumberOfitemsShown] = React.useState(3)
const [loading, setLoading] = React.useState(true); const [loading, setLoading] = React.useState(true);
const [defaultWorkflow] = ["https://github.com/ESAP-WP5/binder-empty"];
// Fetch Notebooks // Fetch Notebooks
useEffect(() => { useEffect(() => {
...@@ -27,7 +28,7 @@ export default function Interactive() { ...@@ -27,7 +28,7 @@ export default function Interactive() {
.then((response) => { .then((response) => {
console.log(response); console.log(response);
setList_of_workflows(response.data.results); setList_of_workflows(response.data.results);
setWorkflowURL(response.data.results[0].url); setWorkflowURL(defaultWorkflow);
setLoading(false); setLoading(false);
}); });
}, [api_host]); }, [api_host]);
...@@ -101,18 +102,20 @@ export default function Interactive() { ...@@ -101,18 +102,20 @@ export default function Interactive() {
const setWorkflow = event => { const setWorkflow = event => {
setWorkflowURL(event.target.value); setWorkflowURL(event.target.value);
setShowNext(true) setShowNext(true)
setShowSkip(false)
}; };
const setFacility = event => { const setFacility = event => {
setIdaSystemURL(event.target.value); setIdaSystemURL(event.target.value);
setShowDeploy(true) setShowDeploy(true);
}; };
const onClickNext = e => { const onClickNext = e => {
e.preventDefault(); e.preventDefault();
setSearchTerm("") setSearchTerm("");
setShowFacilities(true); setShowFacilities(true);
setShowBack(true) setShowBack(true);
}; };
const onClickBack = e => { const onClickBack = e => {
...@@ -123,6 +126,8 @@ export default function Interactive() { ...@@ -123,6 +126,8 @@ export default function Interactive() {
setShowBack(true) setShowBack(true)
setNumberOfitemsShown(3); setNumberOfitemsShown(3);
setShowMoreButton(true); setShowMoreButton(true);
setShowSkip(true);
setWorkflowURL(defaultWorkflow);
}; };
...@@ -161,6 +166,9 @@ export default function Interactive() { ...@@ -161,6 +166,9 @@ export default function Interactive() {
onChange={handleChange} onChange={handleChange}
/> />
{ showSkip ?
<Button className="skip-button" onClick={onClickNext}>Skip</Button>
: null }
{ showNext ? { showNext ?
<Button className="next-button" onClick={onClickNext}>Next</Button> <Button className="next-button" onClick={onClickNext}>Next</Button>
......
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