Skip to content

Commit

Permalink
Cleared aims2-related links and settings from the metagrid_config tem…
Browse files Browse the repository at this point in the history
…plate. 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.
  • Loading branch information
downiec committed Apr 30, 2024
1 parent 7e0d8f7 commit 63d9611
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 32 deletions.
3 changes: 3 additions & 0 deletions frontend/src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,9 @@ export const addUserSearchQuery = async (
.post(apiRoutes.userSearches.path, decamelizedPayload, {
headers: {
Authorization: `Bearer ${accessToken}`,
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
'X-CSRFToken': getCookie('csrftoken'),
},
})
.then((res) => res.data as Promise<RawUserSearchQuery>)
Expand Down
53 changes: 21 additions & 32 deletions metagrid_configs/metagrid_config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# =====================TREAFIK CONFIG=====================
DOMAIN_NAME=aims2.llnl.gov
DOMAIN_NAME=
PUBLIC_URL=
PREVIOUS_URL=metagrid
PREVIOUS_URL=
DOMAIN_SUBDIRECTORY=metagrid-backend

# =====================BACKEND CONFIG====================
Expand All @@ -10,18 +10,18 @@ DOMAIN_SUBDIRECTORY=metagrid-backend
DJANGO_SETTINGS_MODULE=config.settings.production
DJANGO_SECRET_KEY=
DJANGO_ADMIN_URL=
DJANGO_ALLOWED_HOSTS=aims2.llnl.gov,198.128.245.179
DJANGO_ALLOWED_HOSTS=

# Security
DJANGO_SECURE_SSL_REDIRECT=False

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

# django-all-auth
KEYCLOAK_URL=https://esgf-login.ceda.ac.uk/
KEYCLOAK_REALM=esgf
KEYCLOAK_CLIENT_ID=metagrid-react-aims2-llnl-gov
KEYCLOAK_URL=
KEYCLOAK_REALM=
KEYCLOAK_CLIENT_ID=

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

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

REACT_APP_PREVIOUS_URL=metagrid
REACT_APP_PREVIOUS_URL=

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

# Authentication Method
REACT_APP_AUTHENTICATION_METHOD=globus

# Globus
REACT_APP_GLOBUS_REDIRECT=https://aims2.llnl.gov/cart/items
REACT_APP_GLOBUS_REDIRECT=
REACT_APP_CLIENT_ID=
REACT_APP_GLOBUS_NODES=aims3.llnl.gov,esgf-data1.llnl.gov,esgf-data2.llnl.gov
REACT_APP_GLOBUS_NODES=

# ESGF wget API
# https://github.com/ESGF/esgf-wget
REACT_APP_WGET_API_URL=https://esgf-node.llnl.gov/esg-search/wget
REACT_APP_WGET_API_URL=

# ESGF Search API
# https://esgf.github.io/esg-search/ESGF_Search_RESTful_API.html
REACT_APP_SEARCH_URL=https://esgf-node.llnl.gov/esg-search/search
REACT_APP_ESGF_SOLR_URL=https://esgf-node.llnl.gov/solr
REACT_APP_SEARCH_URL=
REACT_APP_ESGF_SOLR_URL=

# ESGF Node Status API
# https://github.com/ESGF/esgf-utils/blob/master/node_status/query_prom.py
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
REACT_APP_ESGF_NODE_STATUS_URL=

# Keycloak
# https://github.com/keycloak/keycloak
REACT_APP_KEYCLOAK_URL=https://esgf-login.ceda.ac.uk/
REACT_APP_KEYCLOAK_REALM=esgf
REACT_APP_KEYCLOAK_CLIENT_ID=metagrid-react-aims2-llnl-gov
REACT_APP_KEYCLOAK_URL=
REACT_APP_KEYCLOAK_REALM=
REACT_APP_KEYCLOAK_CLIENT_ID=

# Django All Auth URLs
# Django Auth URLs
REACT_APP_DJANGO_LOGIN_URL=
REACT_APP_DJANGO_LOGOUT_URL=

# react-hotjar
# https://github.com/abdalla/react-hotjar
REACT_APP_HOTJAR_ID=2079136
REACT_APP_HOTJAR_SV=6
REACT_APP_HOTJAR_ID=
REACT_APP_HOTJAR_SV=

# react-ga
# https://github.com/react-ga/react-ga
REACT_APP_GOOGLE_ANALYTICS_TRACKING_ID=

# Django Auth URLs
REACT_APP_DJANGO_LOGIN_URL=http://aims2.llnl.gov/metagrid-backend/login/globus/
REACT_APP_DJANGO_LOGOUT_URL=http://aims2.llnl.gov/metagrid-backend/proxy/globus-logout/

# Authentication Method
REACT_APP_AUTHENTICATION_METHOD=globus

# https://docs.djangoproject.com/en/4.2/ref/settings/#logout-redirect-url
DJANGO_LOGIN_REDIRECT_URL=http://aims2.llnl.gov/search
DJANGO_LOGOUT_REDIRECT_URL=http://aims2.llnl.gov/search

0 comments on commit 63d9611

Please sign in to comment.