Skip to content

Commit 806db32

Browse files
Merge pull request #8 from nsidc/tweaks-for-redirect-page
Tweaks for redirect page
2 parents 3a9a17d + 20c0e76 commit 806db32

File tree

3 files changed

+36
-9
lines changed

3 files changed

+36
-9
lines changed

docker-compose.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
services:
22
api:
3+
# TODO: remove this `build` option when we start supporting specific versions of images
34
build: .
45
ports:
56
- "5000:5000"
67
environment:
7-
- EARTHDATA_APP_USERNAME
8-
- EARTHDATA_APP_PASSWORD
9-
- EARTHDATA_APP_CLIENT_ID
10-
- DAT_FLASK_SECRET_KEY
8+
- EARTHDATA_APP_USERNAME=${EARTHDATA_APP_USERNAME:?EARTHDATA_APP_USERNAME
9+
must be set}
10+
- EARTHDATA_APP_PASSWORD=${EARTHDATA_APP_PASSWORD:?EARTHDATA_APP_PASSWORD
11+
must be set}
12+
- EARTHDATA_APP_CLIENT_ID=${EARTHDATA_APP_CLIENT_ID:?EARTHDATA_APP_CLIENT_ID
13+
must be set}
14+
- DAT_FLASK_SECRET_KEY=${DAT_FLASK_SECRET_KEY:?DAT_FLASK_SECRET_KEY must
15+
be set}
1116
networks:
1217
- dat
1318
dns_search: .

src/dat_backend/templates/edd_auth_callback.html.jinja

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,30 @@
22
<html>
33
<head>
44
<script>
5-
newwin = window.open("{{ redirect_uri }}", "_blank");
6-
newwin.close()
7-
window.close()
5+
window.open("{{ redirect_uri }}", "_self");
86
</script>
97
</head>
108
<body>
11-
<p><a href="{{ redirect_uri }}">Click here if you are not automatically redirected!</a></p>
9+
<div style="display: flex;">
10+
<span style="width: 50%;">
11+
<h2>Opening Earthdata Download to download your files...</h2>
12+
13+
<p>
14+
Click <strong>Open Earthdata Download </strong>
15+
in the dialog presented by your browser.
16+
If the dialog does not open automatically, click
17+
<strong> Open Earthdata Download </strong> below.
18+
You can close this window once your download begins.
19+
</p>
20+
21+
<p>
22+
Don’t have Earthdata Download installed? Go To the
23+
<a href="https://nasa.github.io/earthdata-download/" target="blank"
24+
> Downloads Page</a>.
25+
</p>
26+
27+
<p><a href="{{ redirect_uri }}">Open Earthdata Download</a></p>
28+
29+
<div style="display: flex;">
1230
</body>
1331
</html>

test/unit/test_python_script_template.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,11 @@ def test_cmr_search():
139139
"-109,37,-102,37,-102,41,-109,41,-109,37",
140140
"*A2019*",
141141
)
142-
assert len(actual) == 72
142+
# TODO: the length of the query result used to consistently be 72, but a
143+
# recent change to MODIS cloud colelctions result in the inclusion of an
144+
# `s3credentials` file. While we try to figure out what the "right" thing to
145+
# do here is, we accept either possibility.
146+
assert len(actual) == 72 or len(actual) == 73
143147

144148

145149
def test_get_speed():

0 commit comments

Comments
 (0)