Skip to content
GitLab
Explore
Sign in
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
87f26607
Commit
87f26607
authored
3 years ago
by
Nico Vermaas
Browse files
Options
Downloads
Patches
Plain Diff
give an alert when ESAP-API could not be reached
parent
0ddc3917
No related branches found
Branches containing commit
No related tags found
1 merge request
!36
Dev nico
Pipeline
#15141
passed
3 years ago
Stage: build
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/contexts/GlobalContext.js
+1
-1
1 addition, 1 deletion
src/contexts/GlobalContext.js
src/contexts/QueryContext.js
+7
-2
7 additions, 2 deletions
src/contexts/QueryContext.js
src/routes/Routes.js
+1
-1
1 addition, 1 deletion
src/routes/Routes.js
with
9 additions
and
4 deletions
src/contexts/GlobalContext.js
+
1
−
1
View file @
87f26607
...
...
@@ -23,7 +23,7 @@ function setProfileState(api_host,
})
.
catch
((
error
)
=>
{
alert
(
error
)
// when the token is no longer valid, getting with credentials will fail
// mark the user as being logged out
localStorage
.
removeItem
(
'
esap_logged_in
'
)
...
...
This diff is collapsed.
Click to expand it.
src/contexts/QueryContext.js
+
7
−
2
View file @
87f26607
import
React
,
{
createContext
,
useState
,
useEffect
,
useContext
}
from
"
react
"
;
import
{
Alert
}
from
"
react-bootstrap
"
;
import
axios
from
"
axios
"
;
import
useMap
from
"
../hooks/useMap
"
;
import
{
GlobalContext
}
from
"
./GlobalContext
"
;
...
...
@@ -10,7 +11,7 @@ export function QueryContextProvider({ children }) {
const
queryMap
=
useMap
();
const
[
formData
,
setFormData
]
=
useState
();
const
[
page
,
setPage
]
=
useState
(
1
);
const
[
url
,
setURL
]
=
useState
(
"
https://uilennest.net/astrobase/data/191231001/3836665.fits
"
);
const
[
url
,
setURL
]
=
useState
(
""
);
const
[
dplevel
,
setDPLevel
]
=
useState
();
const
[
collection
,
setCollection
]
=
useState
();
const
[
config
,
setConfig
]
=
useState
();
...
...
@@ -45,7 +46,11 @@ export function QueryContextProvider({ children }) {
return
null
;
});
setConfig
(
config
);
});
})
.
catch
((
error
)
=>
{
let
description
=
"
. Configuration not loaded. Is ESAP-API online?
"
+
api_host
alert
(
error
.
toString
()
+
description
)
});
},
[
api_host
,
configName
]);
//}, [api_host, configName, dplevel, collection]);
...
...
This diff is collapsed.
Click to expand it.
src/routes/Routes.js
+
1
−
1
View file @
87f26607
...
...
@@ -72,7 +72,7 @@ export default function Routes() {
<
/Switch
>
<
footer
><
small
>
esap
-
gui
version
1
2
jul
2021
-
11
:
00
<
/small></
footer
>
<
footer
><
small
>
esap
-
gui
version
1
3
jul
2021
-
8
:
00
<
/small></
footer
>
<
/Router
>
);
}
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