From 59fce7022546e29388be279176ed95715c48e941 Mon Sep 17 00:00:00 2001 From: alx652 Date: Tue, 19 Nov 2024 11:42:34 -0500 Subject: [PATCH] misc edits --- README.md | 4 +- gateway/README.md | 56 ++++++++++---------- gateway/src/main/resources/application.yml | 54 ++++++++++--------- impurities/database/{MariaDB => }/ReadMe.txt | 3 +- 4 files changed, 62 insertions(+), 55 deletions(-) rename impurities/database/{MariaDB => }/ReadMe.txt (78%) diff --git a/README.md b/README.md index 8ba8a28..49c4496 100644 --- a/README.md +++ b/README.md @@ -198,7 +198,9 @@ You can run the frontend in **development mode**. # stripPrefix: false ``` -- Save `application.yml` and restart the gateway. +- Save `application.yml`. +- In your gateway terminal sesssion set `API_BASE_PATH=''`. +- Restart the gateway. Next, go to your own Angular code repo (typically `GSRSFrontend`) outside of the gsrs3-main-deployment folder. Temporarily edit the file, `src/index.html`, changing from `` to ``. Make sure you temporarily have following in `src\app\fda\config\config.json` and/or `src\app\core\config\config.json` diff --git a/gateway/README.md b/gateway/README.md index a6f6043..04a5e3d 100644 --- a/gateway/README.md +++ b/gateway/README.md @@ -49,9 +49,9 @@ zuul.host.socket-timeout-millis: 300000 Next, set the routes for other services. -For embedded Tomcat, these are shown here in the default [application.yml](./src/main/resources/application.yml) file. +A) For **embedded Tomcat**, these are shown and already set here in the default [application.yml](./src/main/resources/application.yml) file. -For single Tomcat the routes are different. The service name is included in the target path and the port is the same for all services. +B) Otherwise, for **single Tomcat** the routes are different. The service name is included in the target path and the port is the same for all services. ``` zuul: @@ -63,114 +63,116 @@ zuul: ... adverseeventpt: - path: /api/v1/adverseeventpt/** + path: ${api.base.path}/api/v1/adverseeventpt/** url: http://localhost:8080/adverse-events/api/v1/adverseeventpt serviceId: adverseeventpt adverseeventpt_alt: - path: /api/v1/adverseeventpt(**)/** + path: ${api.base.path}/api/v1/adverseeventpt(**)/** url: http://localhost:8080/adverse-events/api/v1/adverseeventpt serviceId: adverseeventpt adverseeventdme: - path: /api/v1/adverseeventdme/** + path: ${api.base.path}/api/v1/adverseeventdme/** url: http://localhost:8080/adverse-events/api/v1/adverseeventdme serviceId: adverseeventdme adverseeventdme_alt: - path: /api/v1/adverseeventdme(**)/** + path: ${api.base.path}/api/v1/adverseeventdme(**)/** url: http://localhost:8080/adverse-events/api/v1/adverseeventdme serviceId: adverseeventdme adverseeventcvm: - path: /api/v1/adverseeventcvm/** + path: ${api.base.path}/api/v1/adverseeventcvm/** url: http://localhost:8080/adverse-events/api/v1/adverseeventcvm serviceId: adverseeventcvm adverseeventcvm_alt: - path: /api/v1/adverseeventcvm(**)/** + path: ${api.base.path}/api/v1/adverseeventcvm(**)/** url: http://localhost:8080/adverse-events/api/v1/adverseeventcvm serviceId: adverseeventcvm applications_core: - path: /api/v1/applications/** + path: ${api.base.path}/api/v1/applications/** url: http://localhost:8080/applications/api/v1/applications serviceId: applications_core applications_core_alt: - path: /api/v1/applications(**)/** + path: ${api.base.path}/api/v1/applications(**)/** url: http://localhost:8080/applications/api/v1/applications serviceId: applications_core_alt applications_all: - path: /api/v1/applicationsall/** + path: ${api.base.path}/api/v1/applicationsall/** url: http://localhost:8080/applications/api/v1/applicationsall serviceId: applications_all applications_all_alt: - path: /api/v1/applicationsall(**)/** + path: ${api.base.path}/api/v1/applicationsall(**)/** url: http://localhost:8080/applications/api/v1/applicationsall serviceId: applications_all_alt applications_darrts: - path: /api/v1/applicationsdarrts/** + path: ${api.base.path}/api/v1/applicationsdarrts/** url: http://localhost:8080/applications/api/v1/applicationsdarrts serviceId: applications_darrts applications_darrts_alt: - path: /api/v1/applicationsdarrts(**)/** + path: ${api.base.path}/api/v1/applicationsdarrts(**)/** url: http://localhost:8080/applications/api/v1/applicationsdarrts serviceId: applications_darrts_alt applications_searchcount: - path: /api/v1/searchcounts/** + path: ${api.base.path}/api/v1/searchcounts/** url: http://localhost:8080/applications/api/v1/searchcounts serviceId: applications_searchcount applications_searchcount_alt: - path: /api/v1/searchcounts(**)/** + path: ${api.base.path}/api/v1/searchcounts(**)/** url: http://localhost:8080/applications/api/v1/searchcounts serviceId: applications_searchcount clinical_trials_us: - path: /api/v1/clinicaltrialsus/** + path: ${api.base.path}/api/v1/clinicaltrialsus/** url: http://localhost:8080/clinical-trials/api/v1/clinicaltrialsus serviceId: clinical_trials_us clinical_trials_us_alt: - path: /api/v1/clinicaltrialsus(**)/** + path: ${api.base.path}/api/v1/clinicaltrialsus(**)/** url: http://localhost:8080/clinical-trials/api/v1/clinicaltrialsus serviceId: clinical_trials_us clinical_trials_europe: - path: /api/v1/clinicaltrialseurope/** + path: ${api.base.path}/api/v1/clinicaltrialseurope/** url: http://localhost:8080/clinical-trials/api/v1/clinicaltrialseurope serviceId: clinical_trials_europe clinical_trials_europe_alt: - path: /api/v1/clinicaltrialseurope(**)/** + path: ${api.base.path}/api/v1/clinicaltrialseurope(**)/** url: http://localhost:8080/clinical-trials/api/v1/clinicaltrialseurope serviceId: clinical_trials_europe impurities: - path: /api/v1/impurities/** + path: ${api.base.path}/api/v1/impurities/** url: http://localhost:8080/impurities/api/v1/impurities serviceId: impurities impurities_alt: - path: /api/v1/impurities(**)/** + path: ${api.base.path}/api/v1/impurities(**)/** url: http://localhost:8080/impurities/api/v1/impurities serviceId: impurities invitropharmacology_core: - path: /api/v1/invitropharmacology/** + path: ${api.base.path}/api/v1/invitropharmacology/** url: http://localhost:8080/invitro-pharmacology/api/v1/invitropharmacology serviceId: invitropharmacology_core products_core: - path: /api/v1/products/** + path: ${api.base.path}/api/v1/products/** url: http://localhost:8080/products/api/v1/products serviceId: products_core products_core_alt: - path: /api/v1/products(**)/** + path: ${api.base.path}/api/v1/products(**)/** url: http://localhost:8080/products/api/v1/products serviceId: products_core ssg4m_core: - path: /api/v1/ssg4m/** + path: ${api.base.path}/api/v1/ssg4m/** url: http://localhost:8080/ssg4m/ssg4m serviceId: ssg4m_core ssg4m_core_alt: - path: /api/v1/ssg4m(**)/** + path: ${api.base.path}/api/v1/ssg4m(**)/** url: http://localhost:8080/ssg4m/ssg4m serviceId: ssg4m_core_alt + + ``` diff --git a/gateway/src/main/resources/application.yml b/gateway/src/main/resources/application.yml index 00bdf7a..17eb2e9 100644 --- a/gateway/src/main/resources/application.yml +++ b/gateway/src/main/resources/application.yml @@ -1,3 +1,6 @@ + +api.base.path: ${API_BASE_PATH:/ginas/app} + gsrs: gateway: server: @@ -37,27 +40,27 @@ zuul: #START adverse-events section ############################# adverseeventpt: - path: /api/v1/adverseeventpt/** + path: ${api.base.path}/api/v1/adverseeventpt/** url: http://localhost:8086/api/v1/adverseeventpt serviceId: adverseeventpt adverseeventpt_alt: - path: /api/v1/adverseeventpt(**)/** + path: ${api.base.path}/api/v1/adverseeventpt(**)/** url: http://localhost:8086/api/v1/adverseeventpt serviceId: adverseeventpt adverseeventdme: - path: /api/v1/adverseeventdme/** + path: ${api.base.path}/api/v1/adverseeventdme/** url: http://localhost:8086/api/v1/adverseeventdme serviceId: adverseeventdme adverseeventdme_alt: - path: /api/v1/adverseeventdme(**)/** + path: ${api.base.path}/api/v1/adverseeventdme(**)/** url: http://localhost:8086/api/v1/adverseeventdme serviceId: adverseeventdme adverseeventcvm: - path: /api/v1/adverseeventcvm/** + path: ${api.base.path}/api/v1/adverseeventcvm/** url: http://localhost:8086/api/v1/adverseeventcvm serviceId: adverseeventcvm adverseeventcvm_alt: - path: /api/v1/adverseeventcvm(**)/** + path: ${api.base.path}/api/v1/adverseeventcvm(**)/** url: http://localhost:8086/api/v1/adverseeventcvm serviceId: adverseeventcvm ############################# @@ -68,35 +71,35 @@ zuul: #START applications section ############################# applications_core: - path: /api/v1/applications/** + path: ${api.base.path}/api/v1/applications/** url: http://localhost:8083/api/v1/applications serviceId: applications_core applications_core_alt: - path: /api/v1/applications(**)/** + path: ${api.base.path}/api/v1/applications(**)/** url: http://localhost:8083/api/v1/applications serviceId: applications_core_alt applications_all: - path: /api/v1/applicationsall/** + path: ${api.base.path}/api/v1/applicationsall/** url: http://localhost:8083/api/v1/applicationsall serviceId: applications_all applications_all_alt: - path: /api/v1/applicationsall(**)/** + path: ${api.base.path}/api/v1/applicationsall(**)/** url: http://localhost:8083/api/v1/applicationsall serviceId: applications_all_alt applications_darrts: - path: /api/v1/applicationsdarrts/** + path: ${api.base.path}/api/v1/applicationsdarrts/** url: http://localhost:8083/api/v1/applicationsdarrts serviceId: applications_darrts applications_darrts_alt: - path: /api/v1/applicationsdarrts(**)/** + path: ${api.base.path}/api/v1/applicationsdarrts(**)/** url: http://localhost:8083/api/v1/applicationsdarrts serviceId: applications_darrts_alt applications_searchcount: - path: /api/v1/searchcounts/** + path: ${api.base.path}/api/v1/searchcounts/** url: http://localhost:8083/api/v1/searchcounts serviceId: applications_searchcount applications_searchcount_alt: - path: /api/v1/searchcounts(**)/** + path: ${api.base.path}/api/v1/searchcounts(**)/** url: http://localhost:8083/api/v1/searchcounts serviceId: applications_searchcount ############################# @@ -107,19 +110,19 @@ zuul: #START clinical-trials section ############################# clinical_trials_us: - path: /api/v1/clinicaltrialsus/** + path: ${api.base.path}/api/v1/clinicaltrialsus/** url: http://localhost:8089/api/v1/clinicaltrialsus serviceId: clinical_trials_us clinical_trials_us_alt: - path: /api/v1/clinicaltrialsus(**)/** + path: ${api.base.path}/api/v1/clinicaltrialsus(**)/** url: http://localhost:8089/api/v1/clinicaltrialsus serviceId: clinical_trials_us clinical_trials_europe: - path: /api/v1/clinicaltrialseurope/** + path: ${api.base.path}/api/v1/clinicaltrialseurope/** url: http://localhost:8089/api/v1/clinicaltrialseurope serviceId: clinical_trials_europe clinical_trials_europe_alt: - path: /api/v1/clinicaltrialseurope(**)/** + path: ${api.base.path}/api/v1/clinicaltrialseurope(**)/** url: http://localhost:8089/api/v1/clinicaltrialseurope serviceId: clinical_trials_europe ############################# @@ -130,11 +133,11 @@ zuul: #START impurities section ############################# impurities_core: - path: /api/v1/impurities/** + path: ${api.base.path}/api/v1/impurities/** url: http://localhost:8085/api/v1/impurities serviceId: impurities_core impurities_core_alt: - path: /api/v1/impurities(**)/** + path: ${api.base.path}/api/v1/impurities(**)/** url: http://localhost:8085/api/v1/impurities serviceId: impurities_core ############################# @@ -145,7 +148,7 @@ zuul: #START invitro-pharmacology section ############################# invitropharmacology_core: - path: /api/v1/invitropharmacology/** + path: ${api.base.path}/api/v1/invitropharmacology/** url: http://localhost:8090/invitro-pharmacology/api/v1/invitropharmacology serviceId: invitropharmacology_core ############################# @@ -156,11 +159,11 @@ zuul: #START products section ############################# products_core: - path: /api/v1/products/** + path: ${api.base.path}/api/v1/products/** url: http://localhost:8084/api/v1/products serviceId: products_core products_core_alt: - path: /api/v1/products(**)/** + path: ${api.base.path}/api/v1/products(**)/** url: http://localhost:8084/api/v1/products serviceId: products_core ############################# @@ -171,11 +174,11 @@ zuul: #START ssg4m section ############################# ssg4m_core: - path: /api/v1/ssg4m/** + path: ${api.base.path}/api/v1/ssg4m/** url: http://localhost:8088/ssg4m serviceId: ssg4m_core ssg4m_core_alt: - path: /api/v1/ssg4m(**)/** + path: ${api.base.path}/api/v1/ssg4m(**)/** url: http://localhost:8088/ssg4m serviceId: ssg4m_core_alt ############################# @@ -238,4 +241,3 @@ zuul.host.socket-timeout-millis: 300000 #Keeps + encoded characters encoded as + zuul.forceOriginalQueryStringEncoding: true - diff --git a/impurities/database/MariaDB/ReadMe.txt b/impurities/database/ReadMe.txt similarity index 78% rename from impurities/database/MariaDB/ReadMe.txt rename to impurities/database/ReadMe.txt index 7c0f0e7..6ae3e91 100644 --- a/impurities/database/MariaDB/ReadMe.txt +++ b/impurities/database/ReadMe.txt @@ -1,6 +1,7 @@ +impurities/database/ReadMe.txt Note: we have included a script only for MariaDB because the other database systems we have tested work fine with Hibernate to generate a database schema. With MariaDB, the Hibernate-generated SQL causes errors so we include a script that yields a useable database. -Note: this may also be the case with MySQL. +Note: this may also be the case with MySQL. \ No newline at end of file