Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
ESAP GUI
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ASTRON SDC
ESCAPE WP5
ESAP GUI
Commits
11bac2f8
Commit
11bac2f8
authored
2 years ago
by
stelios
Committed by
Klaas Kliffen
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add initial menu to IDA / Separate DLAAS & BinderHubs
parent
ff804bbc
Loading
Loading
1 merge request
!102
Remove Skip button from Workflow selection
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/assets/Interactive.css
+8
-0
8 additions, 0 deletions
src/assets/Interactive.css
src/components/services/Interactive.js
+58
-9
58 additions, 9 deletions
src/components/services/Interactive.js
with
66 additions
and
9 deletions
src/assets/Interactive.css
+
8
−
0
View file @
11bac2f8
...
...
@@ -241,3 +241,11 @@
width
:
50%
;
margin-left
:
200px
;
}
.ida-menu-items
{
width
:
280px
;
background-color
:
white
;
color
:
black
;
height
:
40px
;
margin-bottom
:
15px
;
}
This diff is collapsed.
Click to expand it.
src/components/services/Interactive.js
+
58
−
9
View file @
11bac2f8
...
...
@@ -18,8 +18,10 @@ export default function Interactive() {
const
[
showAdvanced
,
setShowAdvanced
]
=
useState
(
false
);
const
[
showMoreButton
,
setShowMoreButton
]
=
useState
(
true
);
const
[
showDeploy
,
setShowDeploy
]
=
useState
(
false
);
const
[
showInitMenu
,
setShowInitMenu
]
=
useState
(
true
);
const
[
showNotebooks
,
setShowNotebooks
]
=
useState
(
false
);
const
[
numberOfitemsShown
,
setNumberOfitemsShown
]
=
useState
(
3
)
const
[
loading
,
setLoading
]
=
useState
(
tru
e
);
const
[
loading
,
setLoading
]
=
useState
(
fals
e
);
const
[
defaultWorkflow
]
=
"
https://github.com/ESAP-WP5/binder-empty
"
;
const
[
advSearchFilters
,
setAdvSearchFilters
]
=
useState
({
...
...
@@ -34,8 +36,8 @@ export default function Interactive() {
searchType
:
""
});
// Fetch Notebooks
/*
useEffect(() => {
axios
.get(api_host + "ida/workflows/search")
...
...
@@ -46,16 +48,16 @@ export default function Interactive() {
});
}, [api_host]);
// Fetch JHubs
useEffect(() => {
axios
.
get
(
api_host
+
"
ida/facilities/search
"
)
.get(api_host + "ida/facilities/search
?facilitytype=jupyterhub
")
.then((response) => {
setList_of_idaSystems(response.data.results);
setIdaSystemURL(response.data.results[0].url);
});
}, [api_host]);
*/
if
(
loading
)
{
return
(
...
...
@@ -64,7 +66,6 @@ export default function Interactive() {
{
!
showFacilities
?
<
div
className
=
"
workflow-div
"
>
<
h2
>
Workflows
<
/h2
>
<
/div
>
:
null
}
<
LoadingSpinner
/>
...
...
@@ -74,7 +75,9 @@ export default function Interactive() {
}
if
((
!
list_of_workflows
)
||
(
!
list_of_idaSystems
))
{
return
null
;
setList_of_idaSystems
([]);
setList_of_workflows
([]);
return
null
;
}
const
handleChange
=
event
=>
{
...
...
@@ -178,6 +181,42 @@ export default function Interactive() {
};
const
onClickNotebooks
=
e
=>
{
e
.
preventDefault
();
setShowInitMenu
(
false
);
setLoading
(
true
);
axios
.
get
(
api_host
+
"
ida/facilities/search?facilitytype=jupyterhub
"
)
.
then
((
response
)
=>
{
setList_of_idaSystems
(
response
.
data
.
results
);
setIdaSystemURL
(
response
.
data
.
results
[
0
].
url
);
});
axios
.
get
(
api_host
+
"
ida/workflows/search
"
)
.
then
((
response
)
=>
{
setList_of_workflows
(
response
.
data
.
results
);
setWorkflowURL
(
defaultWorkflow
);
setLoading
(
false
);
setShowNotebooks
(
true
);
});
};
const
onCLickLoadDLAAS
=
e
=>
{
e
.
preventDefault
();
setShowFacilities
(
true
);
setShowInitMenu
(
false
);
axios
.
get
(
api_host
+
"
ida/facilities/search?facilitytype=dlaas
"
)
.
then
((
response
)
=>
{
setList_of_idaSystems
(
response
.
data
.
results
);
setIdaSystemURL
(
response
.
data
.
results
[
0
].
url
);
});
};
const
showMore
=
e
=>
{
e
.
preventDefault
();
if
(
numberOfitemsShown
+
3
<=
list_of_workflows
.
length
)
{
...
...
@@ -197,10 +236,20 @@ export default function Interactive() {
<
h1
>
Interactive
Analysis
<
/h1
>
{
!
showFacilities
?
{
showInitMenu
?
<
div
>
<
br
/><
br
/>
<
Button
className
=
"
ida-menu-items
"
onClick
=
{
onCLickLoadDLAAS
}
>
DLAAS
<
/Button
>
<
br
/>
<
Button
className
=
"
ida-menu-items
"
onClick
=
{
onClickNotebooks
}
>
Binder
/
Jupyter
Notebooks
<
/Button
>
<
/div
>
:
null
}
{
!
showFacilities
&&
showNotebooks
?
<
div
className
=
"
workflow-div
"
>
<
h2
>
Workflow
s
<
/h2
>
<
h2
>
Notebook
s
<
/h2
>
<
Form
className
=
"
mt-5
"
>
...
...
@@ -220,7 +269,7 @@ export default function Interactive() {
:
null
}
{
showNext
?
<
Button
className
=
"
next-button
"
onClick
=
{
onClickNext
}
>
Next
<
/Button
>
<
Button
className
=
"
next-button
"
onClick
=
{
onClickNext
}
>
Next
<
/Button
>
:
null
}
<
br
/>
<
a
href
=
"
#
"
onClick
=
{
onClickAdvanced
}
>
Advanced
Search
<
/a
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment