Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency react-router-dom to v5.3.4 #479

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ env:
KEYCLOAK_REALM: metagrid
KEYCLOAK_CLIENT_ID: backend
DATABASE_URL: pgsql://postgres:postgres@localhost:5432/postgres
REACT_APP_ESGF_NODE_URL: https://esgf-node.llnl.gov/esg-search/search
REACT_APP_WGET_API_URL: https://greyworm1-rh7.llnl.gov/wget
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


jobs:
build:
Expand Down
5 changes: 5 additions & 0 deletions backend/config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,3 +296,8 @@
# https://github.com/adamchainz/django-cors-headers#setup
CORS_ORIGIN_ALLOW_ALL = False
CORS_ORIGIN_WHITELIST = env.list("CORS_ORIGIN_WHITELIST")


SEARCH_URL = env("REACT_APP_ESGF_NODE_URL")
WGET_URL = env("REACT_APP_WGET_API_URL")
STATUS_URL = env("REACT_APP_ESGF_NODE_STATUS_URL")
26 changes: 20 additions & 6 deletions backend/metagrid/api_proxy/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from urllib.parse import urlparse

import requests
from django.conf import settings
from django.http import HttpResponse, HttpResponseBadRequest
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_http_methods
Expand All @@ -10,9 +11,12 @@
@require_http_methods(["GET", "POST"])
@csrf_exempt
def do_search(request):

return do_request(request, "https://esgf-node.llnl.gov/esg-search/search")

esgf_host = getattr(
settings,
"REACT_APP_SEARCH_URL",
"https://esgf-node.llnl.gov/esg-search/search",
)
return do_request(request, esgf_host)

@require_http_methods(["POST"])
@csrf_exempt
Expand Down Expand Up @@ -49,9 +53,12 @@ def do_citation(request):
@require_http_methods(["GET", "POST"])
@csrf_exempt
def do_status(request):
resp = requests.get(
"https://aims4.llnl.gov/prometheus/api/v1/query?query=probe_success%7Bjob%3D%22http_2xx%22%2C+target%3D~%22.%2Athredds.%2A%22%7D"
status_url = getattr(
settings,
"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",
)
resp = requests.get(status_url)
if resp.status_code == 200: # pragma: no cover
return HttpResponse(resp.text)
else: # pragma: no cover
Expand All @@ -61,7 +68,14 @@ def do_status(request):
@require_http_methods(["GET", "POST"])
@csrf_exempt
def do_wget(request):
return do_request(request, "https://esgf-node.llnl.gov/esg-search/wget")
return do_request(
request,
getattr(
settings,
"REACT_APP_WGET_API_URL",
"https://esgf-node.llnl.gov/esg-search/wget",
),
)


def do_request(request, urlbase):
Expand Down
44 changes: 22 additions & 22 deletions frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "frontend",
"version": "1.0.7-beta",
"version": "1.0.8-beta",
"private": true,
"scripts": {
"build:local": "env-cmd -f .envs/.react react-scripts build",
Expand Down Expand Up @@ -57,57 +57,57 @@
},
"dependencies": {
"@ant-design/icons": "4.6.2",
"@babel/plugin-syntax-flow": "^7.16.7",
"@babel/plugin-transform-react-jsx": "^7.17.3",
"@babel/plugin-syntax-flow": "7.16.7",
"@babel/plugin-transform-react-jsx": "7.17.3",
"@react-keycloak/web": "3.4.0",
"antd": "4.15.1",
"autoprefixer": "^10.4.4",
"axios": "^0.26.1",
"autoprefixer": "10.4.4",
"axios": "0.26.1",
"dotenv": "8.2.0",
"env-cmd": "10.1.0",
"humps": "2.0.1",
"keycloak-js": "17.0.1",
"moment": "2.29.4",
"prop-types": "^15.8.1",
"prop-types": "15.8.1",
"query-string": "7.0.0",
"react": "17.0.2",
"react": "18.2.0",
"react-async": "10.0.1",
"react-dom": "17.0.2",
"react-dom": "18.2.0",
"react-hotjar": "2.2.1",
"react-joyride": "^2.4.0",
"react-router-dom": "5.3.3",
"react-router-dom": "5.3.4",
"react-scripts": "^5.0.1",
"typescript": "^4.6.3",
"uuid": "8.3.2"
},
"devDependencies": {
"@babel/core": "^7.17.9",
"@testing-library/dom": "^8.13.0",
"@babel/core": "7.17.9",
"@testing-library/dom": "8.13.0",
"@testing-library/jest-dom": "5.11.10",
"@testing-library/react": "11.2.6",
"@testing-library/user-event": "13.1.2",
"@types/humps": "2.0.0",
"@types/jest": "28.1.6",
"@types/jest": "28.1.8",
"@types/node": "14.14.37",
"@types/react": "17.0.3",
"@types/react-dom": "17.0.3",
"@types/react-router-dom": "5.1.7",
"@types/uuid": "8.3.4",
"@typescript-eslint/eslint-plugin": "5.30.7",
"@typescript-eslint/parser": "5.30.7",
"dayjs": "^1.11.1",
"eslint": "^8.12.0",
"dayjs": "1.11.1",
"eslint": "8.12.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.29.4",
"eslint-config-airbnb-typescript": "17.0.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jsx-a11y": "6.5.1",
"eslint-plugin-prettier": "4.0.0",
"eslint-plugin-react": "7.29.4",
"eslint-plugin-react-hooks": "4.6.0",
"msw": "0.28.1",
"postcss": "^8.4.12",
"postcss": "8.4.12",
"prettier": "2.2.1",
"setimmediate": "^1.0.5"
"setimmediate": "1.0.5"
}
}
2 changes: 1 addition & 1 deletion frontend/src/components/App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export type Props = {
searchQuery: ActiveSearchQuery;
};

const metagridVersion = '1.0.7-beta';
const metagridVersion = '1.0.8-beta';

const App: React.FC<Props> = ({ searchQuery }) => {
// Third-party tool integration
Expand Down
Loading