Skip to content

Commit 63d9611

Browse files
committed
Cleared aims2-related links and settings from the metagrid_config template. Also updated the add search query api call to include X-CSRFToken, to mimic what is used in the add cart item api call. Hopefully this will fix the issue with adding saved searches when logged in, need to test.
1 parent 7e0d8f7 commit 63d9611

File tree

2 files changed

+24
-32
lines changed

2 files changed

+24
-32
lines changed

frontend/src/api/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,9 @@ export const addUserSearchQuery = async (
273273
.post(apiRoutes.userSearches.path, decamelizedPayload, {
274274
headers: {
275275
Authorization: `Bearer ${accessToken}`,
276+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
277+
// @ts-ignore
278+
'X-CSRFToken': getCookie('csrftoken'),
276279
},
277280
})
278281
.then((res) => res.data as Promise<RawUserSearchQuery>)

metagrid_configs/metagrid_config

+21-32
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# =====================TREAFIK CONFIG=====================
2-
DOMAIN_NAME=aims2.llnl.gov
2+
DOMAIN_NAME=
33
PUBLIC_URL=
4-
PREVIOUS_URL=metagrid
4+
PREVIOUS_URL=
55
DOMAIN_SUBDIRECTORY=metagrid-backend
66

77
# =====================BACKEND CONFIG====================
@@ -10,18 +10,18 @@ DOMAIN_SUBDIRECTORY=metagrid-backend
1010
DJANGO_SETTINGS_MODULE=config.settings.production
1111
DJANGO_SECRET_KEY=
1212
DJANGO_ADMIN_URL=
13-
DJANGO_ALLOWED_HOSTS=aims2.llnl.gov,198.128.245.179
13+
DJANGO_ALLOWED_HOSTS=
1414

1515
# Security
1616
DJANGO_SECURE_SSL_REDIRECT=False
1717

1818
# django-cors-headers
19-
CORS_ORIGIN_WHITELIST=https://localhost:3000,https://aims2.llnl.gov
19+
CORS_ORIGIN_WHITELIST=https://localhost:3000
2020

2121
# django-all-auth
22-
KEYCLOAK_URL=https://esgf-login.ceda.ac.uk/
23-
KEYCLOAK_REALM=esgf
24-
KEYCLOAK_CLIENT_ID=metagrid-react-aims2-llnl-gov
22+
KEYCLOAK_URL=
23+
KEYCLOAK_REALM=
24+
KEYCLOAK_CLIENT_ID=
2525

2626
# Django redirects
2727
# https://docs.djangoproject.com/en/4.2/ref/settings/#logout-redirect-url
@@ -44,59 +44,48 @@ POSTGRES_PASSWORD=postgres
4444

4545
# Redirect the frontend to home page when old subdirectory is used (optional)
4646

47-
REACT_APP_PREVIOUS_URL=metagrid
47+
REACT_APP_PREVIOUS_URL=
4848

4949
# MetaGrid API
5050
# https://github.com/aims-group/metagrid/tree/master/backend
51-
REACT_APP_METAGRID_API_URL=https://aims2.llnl.gov/metagrid-backend
51+
REACT_APP_METAGRID_API_URL=
5252

5353
# Authentication Method
5454
REACT_APP_AUTHENTICATION_METHOD=globus
5555

5656
# Globus
57-
REACT_APP_GLOBUS_REDIRECT=https://aims2.llnl.gov/cart/items
57+
REACT_APP_GLOBUS_REDIRECT=
5858
REACT_APP_CLIENT_ID=
59-
REACT_APP_GLOBUS_NODES=aims3.llnl.gov,esgf-data1.llnl.gov,esgf-data2.llnl.gov
59+
REACT_APP_GLOBUS_NODES=
6060

6161
# ESGF wget API
6262
# https://github.com/ESGF/esgf-wget
63-
REACT_APP_WGET_API_URL=https://esgf-node.llnl.gov/esg-search/wget
63+
REACT_APP_WGET_API_URL=
6464

6565
# ESGF Search API
6666
# https://esgf.github.io/esg-search/ESGF_Search_RESTful_API.html
67-
REACT_APP_SEARCH_URL=https://esgf-node.llnl.gov/esg-search/search
68-
REACT_APP_ESGF_SOLR_URL=https://esgf-node.llnl.gov/solr
67+
REACT_APP_SEARCH_URL=
68+
REACT_APP_ESGF_SOLR_URL=
6969

7070
# ESGF Node Status API
7171
# https://github.com/ESGF/esgf-utils/blob/master/node_status/query_prom.py
72-
REACT_APP_ESGF_NODE_STATUS_URL=https://aims4.llnl.gov/prometheus/api/v1/query?query=probe_success%7Bjob%3D%22http_2xx%22%2C+target%3D~%22.%2Athredds.%2A%22%7D
72+
REACT_APP_ESGF_NODE_STATUS_URL=
7373

7474
# Keycloak
7575
# https://github.com/keycloak/keycloak
76-
REACT_APP_KEYCLOAK_URL=https://esgf-login.ceda.ac.uk/
77-
REACT_APP_KEYCLOAK_REALM=esgf
78-
REACT_APP_KEYCLOAK_CLIENT_ID=metagrid-react-aims2-llnl-gov
76+
REACT_APP_KEYCLOAK_URL=
77+
REACT_APP_KEYCLOAK_REALM=
78+
REACT_APP_KEYCLOAK_CLIENT_ID=
7979

80-
# Django All Auth URLs
80+
# Django Auth URLs
8181
REACT_APP_DJANGO_LOGIN_URL=
8282
REACT_APP_DJANGO_LOGOUT_URL=
8383

8484
# react-hotjar
8585
# https://github.com/abdalla/react-hotjar
86-
REACT_APP_HOTJAR_ID=2079136
87-
REACT_APP_HOTJAR_SV=6
86+
REACT_APP_HOTJAR_ID=
87+
REACT_APP_HOTJAR_SV=
8888

8989
# react-ga
9090
# https://github.com/react-ga/react-ga
9191
REACT_APP_GOOGLE_ANALYTICS_TRACKING_ID=
92-
93-
# Django Auth URLs
94-
REACT_APP_DJANGO_LOGIN_URL=http://aims2.llnl.gov/metagrid-backend/login/globus/
95-
REACT_APP_DJANGO_LOGOUT_URL=http://aims2.llnl.gov/metagrid-backend/proxy/globus-logout/
96-
97-
# Authentication Method
98-
REACT_APP_AUTHENTICATION_METHOD=globus
99-
100-
# https://docs.djangoproject.com/en/4.2/ref/settings/#logout-redirect-url
101-
DJANGO_LOGIN_REDIRECT_URL=http://aims2.llnl.gov/search
102-
DJANGO_LOGOUT_REDIRECT_URL=http://aims2.llnl.gov/search

0 commit comments

Comments
 (0)