From d1a1f85c8ade24a7a0e4d02f690aa702d5f7c2e0 Mon Sep 17 00:00:00 2001
From: verena <9377970+vpchung@users.noreply.github.com>
Date: Fri, 13 Oct 2023 18:14:45 +0000
Subject: [PATCH 1/2] update config + env file for oc app
---
apps/openchallenges/app/.env.example | 3 ++-
apps/openchallenges/app/src/config/config.json | 3 ++-
apps/openchallenges/app/src/config/config.json.template | 1 +
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/apps/openchallenges/app/.env.example b/apps/openchallenges/app/.env.example
index 3b54606740..7ab7f36cb7 100644
--- a/apps/openchallenges/app/.env.example
+++ b/apps/openchallenges/app/.env.example
@@ -3,4 +3,5 @@ CSR_API_URL="http://localhost:8082/api/v1"
DATA_UPDATED_ON="2023-09-26"
ENVIRONMENT="production"
GOOGLE_TAG_MANAGER_ID=""
-SSR_API_URL="http://openchallenges-api-gateway:8082/api/v1"
\ No newline at end of file
+SSR_API_URL="http://openchallenges-api-gateway:8082/api/v1"
+API_DOCS_URL="http://localhost:8000/api-docs"
\ No newline at end of file
diff --git a/apps/openchallenges/app/src/config/config.json b/apps/openchallenges/app/src/config/config.json
index 9d0bcfce43..fd6985fe14 100644
--- a/apps/openchallenges/app/src/config/config.json
+++ b/apps/openchallenges/app/src/config/config.json
@@ -4,5 +4,6 @@
"dataUpdatedOn": "yyyy-mm-dd",
"environment": "development",
"googleTagManagerId": "",
- "ssrApiUrl": "http://openchallenges-api-gateway:8082/api/v1"
+ "ssrApiUrl": "http://openchallenges-api-gateway:8082/api/v1",
+ "apiDocsUrl": "http://localhost:8000/api-docs"
}
diff --git a/apps/openchallenges/app/src/config/config.json.template b/apps/openchallenges/app/src/config/config.json.template
index ed0ef8af98..9e543c351f 100644
--- a/apps/openchallenges/app/src/config/config.json.template
+++ b/apps/openchallenges/app/src/config/config.json.template
@@ -5,4 +5,5 @@
"environment": "${ENVIRONMENT}",
"googleTagManagerId": "${GOOGLE_TAG_MANAGER_ID}",
"ssrApiUrl": "${SSR_API_URL}"
+ "apiDocsUrl": "${API_DOCS_URL}"
}
\ No newline at end of file
From d47ae4503fbfa6352688a3d59f8bfa43b1ac0193 Mon Sep 17 00:00:00 2001
From: verena <9377970+vpchung@users.noreply.github.com>
Date: Fri, 13 Oct 2023 18:15:38 +0000
Subject: [PATCH 2/2] update footer params in html and ts scripts
---
libs/openchallenges/about/src/lib/about.component.html | 1 +
libs/openchallenges/about/src/lib/about.component.ts | 2 ++
.../challenge-search/src/lib/challenge-search.component.html | 1 +
.../challenge-search/src/lib/challenge-search.component.ts | 2 ++
libs/openchallenges/challenge/src/lib/challenge.component.html | 1 +
libs/openchallenges/challenge/src/lib/challenge.component.ts | 2 ++
libs/openchallenges/config/src/lib/app.config.ts | 1 +
libs/openchallenges/home/src/lib/home.component.html | 1 +
libs/openchallenges/home/src/lib/home.component.ts | 2 ++
libs/openchallenges/not-found/src/lib/not-found.component.html | 1 +
libs/openchallenges/not-found/src/lib/not-found.component.ts | 2 ++
.../org-profile/src/lib/org-profile.component.html | 1 +
.../openchallenges/org-profile/src/lib/org-profile.component.ts | 2 ++
.../openchallenges/org-search/src/lib/org-search.component.html | 1 +
libs/openchallenges/org-search/src/lib/org-search.component.ts | 2 ++
libs/openchallenges/team/src/lib/team.component.html | 1 +
libs/openchallenges/team/src/lib/team.component.ts | 2 ++
libs/openchallenges/ui/src/lib/footer/footer.component.html | 2 +-
libs/openchallenges/ui/src/lib/footer/footer.component.ts | 1 +
19 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/libs/openchallenges/about/src/lib/about.component.html b/libs/openchallenges/about/src/lib/about.component.html
index 3a2b227e48..2808807cf1 100644
--- a/libs/openchallenges/about/src/lib/about.component.html
+++ b/libs/openchallenges/about/src/lib/about.component.html
@@ -127,4 +127,5 @@
Promote discoverability and reusability
[dataUpdatedOn]="dataUpdatedOn"
[privacyPolicyUrl]="privacyPolicyUrl"
[termsOfUseUrl]="termsOfUseUrl"
+ [apiDocsUrl]="apiDocsUrl"
/>
diff --git a/libs/openchallenges/about/src/lib/about.component.ts b/libs/openchallenges/about/src/lib/about.component.ts
index 3fca76606e..3016dc1284 100644
--- a/libs/openchallenges/about/src/lib/about.component.ts
+++ b/libs/openchallenges/about/src/lib/about.component.ts
@@ -17,6 +17,7 @@ export class AboutComponent {
public dataUpdatedOn: string;
public privacyPolicyUrl: string;
public termsOfUseUrl: string;
+ public apiDocsUrl: string;
constructor(
private readonly configService: ConfigService,
@@ -27,6 +28,7 @@ export class AboutComponent {
this.dataUpdatedOn = this.configService.config.dataUpdatedOn;
this.privacyPolicyUrl = this.configService.config.privacyPolicyUrl;
this.termsOfUseUrl = this.configService.config.termsOfUseUrl;
+ this.apiDocsUrl = this.configService.config.apiDocsUrl;
this.seoService.setData(getSeoData(), this.renderer2);
}
}
diff --git a/libs/openchallenges/challenge-search/src/lib/challenge-search.component.html b/libs/openchallenges/challenge-search/src/lib/challenge-search.component.html
index 00d0bdbfd9..53b92dd7ad 100644
--- a/libs/openchallenges/challenge-search/src/lib/challenge-search.component.html
+++ b/libs/openchallenges/challenge-search/src/lib/challenge-search.component.html
@@ -186,4 +186,5 @@ Results ({{ searchResultsCount }})
[dataUpdatedOn]="dataUpdatedOn"
[privacyPolicyUrl]="privacyPolicyUrl"
[termsOfUseUrl]="termsOfUseUrl"
+ [apiDocsUrl]="apiDocsUrl"
/>
diff --git a/libs/openchallenges/challenge-search/src/lib/challenge-search.component.ts b/libs/openchallenges/challenge-search/src/lib/challenge-search.component.ts
index 4d0202a428..3258f9bc92 100644
--- a/libs/openchallenges/challenge-search/src/lib/challenge-search.component.ts
+++ b/libs/openchallenges/challenge-search/src/lib/challenge-search.component.ts
@@ -120,6 +120,7 @@ export class ChallengeSearchComponent
public dataUpdatedOn: string;
public privacyPolicyUrl: string;
public termsOfUseUrl: string;
+ public apiDocsUrl: string;
datePipe: DatePipe = new DatePipe('en-US');
private query: BehaviorSubject =
@@ -205,6 +206,7 @@ export class ChallengeSearchComponent
this.dataUpdatedOn = this.configService.config.dataUpdatedOn;
this.privacyPolicyUrl = this.configService.config.privacyPolicyUrl;
this.termsOfUseUrl = this.configService.config.termsOfUseUrl;
+ this.apiDocsUrl = this.configService.config.apiDocsUrl;
this.seoService.setData(getSeoData(), this.renderer2);
}
diff --git a/libs/openchallenges/challenge/src/lib/challenge.component.html b/libs/openchallenges/challenge/src/lib/challenge.component.html
index eda8be8ae9..e245cf2c53 100644
--- a/libs/openchallenges/challenge/src/lib/challenge.component.html
+++ b/libs/openchallenges/challenge/src/lib/challenge.component.html
@@ -88,4 +88,5 @@
[dataUpdatedOn]="dataUpdatedOn"
[privacyPolicyUrl]="privacyPolicyUrl"
[termsOfUseUrl]="termsOfUseUrl"
+ [apiDocsUrl]="apiDocsUrl"
/>
diff --git a/libs/openchallenges/challenge/src/lib/challenge.component.ts b/libs/openchallenges/challenge/src/lib/challenge.component.ts
index c82ae0b6ca..94fddbd6e7 100644
--- a/libs/openchallenges/challenge/src/lib/challenge.component.ts
+++ b/libs/openchallenges/challenge/src/lib/challenge.component.ts
@@ -65,6 +65,7 @@ export class ChallengeComponent implements OnInit {
public dataUpdatedOn: string;
public privacyPolicyUrl: string;
public termsOfUseUrl: string;
+ public apiDocsUrl: string;
challenge$!: Observable;
loggedIn = false;
@@ -88,6 +89,7 @@ export class ChallengeComponent implements OnInit {
this.dataUpdatedOn = this.configService.config.dataUpdatedOn;
this.privacyPolicyUrl = this.configService.config.privacyPolicyUrl;
this.termsOfUseUrl = this.configService.config.termsOfUseUrl;
+ this.apiDocsUrl = this.configService.config.apiDocsUrl;
}
ngOnInit(): void {
diff --git a/libs/openchallenges/config/src/lib/app.config.ts b/libs/openchallenges/config/src/lib/app.config.ts
index 0a43b02e21..8cbe9a3c51 100644
--- a/libs/openchallenges/config/src/lib/app.config.ts
+++ b/libs/openchallenges/config/src/lib/app.config.ts
@@ -19,6 +19,7 @@ export interface AppConfig {
privacyPolicyUrl: string;
ssrApiUrl: string;
termsOfUseUrl: string;
+ apiDocsUrl: string;
}
export const EMPTY_APP_CONFIG = {} as AppConfig;
diff --git a/libs/openchallenges/home/src/lib/home.component.html b/libs/openchallenges/home/src/lib/home.component.html
index 4c15301430..d3f24c6ad2 100644
--- a/libs/openchallenges/home/src/lib/home.component.html
+++ b/libs/openchallenges/home/src/lib/home.component.html
@@ -28,4 +28,5 @@
[dataUpdatedOn]="dataUpdatedOn"
[privacyPolicyUrl]="privacyPolicyUrl"
[termsOfUseUrl]="termsOfUseUrl"
+ [apiDocsUrl]="apiDocsUrl"
/>
diff --git a/libs/openchallenges/home/src/lib/home.component.ts b/libs/openchallenges/home/src/lib/home.component.ts
index 0ae44b7fd8..a9e41e66bf 100644
--- a/libs/openchallenges/home/src/lib/home.component.ts
+++ b/libs/openchallenges/home/src/lib/home.component.ts
@@ -42,6 +42,7 @@ export class HomeComponent {
public dataUpdatedOn: string;
public privacyPolicyUrl: string;
public termsOfUseUrl: string;
+ public apiDocsUrl: string;
constructor(
private readonly configService: ConfigService,
@@ -52,6 +53,7 @@ export class HomeComponent {
this.dataUpdatedOn = this.configService.config.dataUpdatedOn;
this.privacyPolicyUrl = this.configService.config.privacyPolicyUrl;
this.termsOfUseUrl = this.configService.config.termsOfUseUrl;
+ this.apiDocsUrl = this.configService.config.apiDocsUrl;
this.seoService.setData(getSeoData(), this.renderer2);
}
}
diff --git a/libs/openchallenges/not-found/src/lib/not-found.component.html b/libs/openchallenges/not-found/src/lib/not-found.component.html
index e2e10bb903..aa54a6e1df 100644
--- a/libs/openchallenges/not-found/src/lib/not-found.component.html
+++ b/libs/openchallenges/not-found/src/lib/not-found.component.html
@@ -20,4 +20,5 @@ Page Not Found
[dataUpdatedOn]="dataUpdatedOn"
[privacyPolicyUrl]="privacyPolicyUrl"
[termsOfUseUrl]="termsOfUseUrl"
+ [apiDocsUrl]="apiDocsUrl"
/>
diff --git a/libs/openchallenges/not-found/src/lib/not-found.component.ts b/libs/openchallenges/not-found/src/lib/not-found.component.ts
index ed68f7f633..14ae0d625f 100644
--- a/libs/openchallenges/not-found/src/lib/not-found.component.ts
+++ b/libs/openchallenges/not-found/src/lib/not-found.component.ts
@@ -24,11 +24,13 @@ export class NotFoundComponent {
public dataUpdatedOn: string;
public privacyPolicyUrl: string;
public termsOfUseUrl: string;
+ public apiDocsUrl: string;
constructor(private readonly configService: ConfigService) {
this.appVersion = this.configService.config.appVersion;
this.dataUpdatedOn = this.configService.config.dataUpdatedOn;
this.privacyPolicyUrl = this.configService.config.privacyPolicyUrl;
this.termsOfUseUrl = this.configService.config.termsOfUseUrl;
+ this.apiDocsUrl = this.configService.config.apiDocsUrl;
}
}
diff --git a/libs/openchallenges/org-profile/src/lib/org-profile.component.html b/libs/openchallenges/org-profile/src/lib/org-profile.component.html
index 2b8a0d6316..c75bdc75af 100644
--- a/libs/openchallenges/org-profile/src/lib/org-profile.component.html
+++ b/libs/openchallenges/org-profile/src/lib/org-profile.component.html
@@ -71,4 +71,5 @@
[dataUpdatedOn]="dataUpdatedOn"
[privacyPolicyUrl]="privacyPolicyUrl"
[termsOfUseUrl]="termsOfUseUrl"
+ [apiDocsUrl]="apiDocsUrl"
/>
diff --git a/libs/openchallenges/org-profile/src/lib/org-profile.component.ts b/libs/openchallenges/org-profile/src/lib/org-profile.component.ts
index aaf0548e9b..0f71544a1f 100644
--- a/libs/openchallenges/org-profile/src/lib/org-profile.component.ts
+++ b/libs/openchallenges/org-profile/src/lib/org-profile.component.ts
@@ -72,6 +72,7 @@ export class OrgProfileComponent implements OnInit {
public dataUpdatedOn: string;
public privacyPolicyUrl: string;
public termsOfUseUrl: string;
+ public apiDocsUrl: string;
organization$!: Observable;
organizationAvatar$!: Observable;
@@ -95,6 +96,7 @@ export class OrgProfileComponent implements OnInit {
this.dataUpdatedOn = this.configService.config.dataUpdatedOn;
this.privacyPolicyUrl = this.configService.config.privacyPolicyUrl;
this.termsOfUseUrl = this.configService.config.termsOfUseUrl;
+ this.apiDocsUrl = this.configService.config.apiDocsUrl;
}
ngOnInit(): void {
diff --git a/libs/openchallenges/org-search/src/lib/org-search.component.html b/libs/openchallenges/org-search/src/lib/org-search.component.html
index ba5419f3d9..16fc7335cb 100644
--- a/libs/openchallenges/org-search/src/lib/org-search.component.html
+++ b/libs/openchallenges/org-search/src/lib/org-search.component.html
@@ -83,4 +83,5 @@ Results ({{ searchResultsCount }})
[dataUpdatedOn]="dataUpdatedOn"
[privacyPolicyUrl]="privacyPolicyUrl"
[termsOfUseUrl]="termsOfUseUrl"
+ [apiDocsUrl]="apiDocsUrl"
/>
diff --git a/libs/openchallenges/org-search/src/lib/org-search.component.ts b/libs/openchallenges/org-search/src/lib/org-search.component.ts
index b95f093138..7ab1b5aa8d 100644
--- a/libs/openchallenges/org-search/src/lib/org-search.component.ts
+++ b/libs/openchallenges/org-search/src/lib/org-search.component.ts
@@ -93,6 +93,7 @@ export class OrgSearchComponent implements OnInit, AfterContentInit, OnDestroy {
public dataUpdatedOn: string;
public privacyPolicyUrl: string;
public termsOfUseUrl: string;
+ public apiDocsUrl: string;
private query: BehaviorSubject =
new BehaviorSubject({});
@@ -143,6 +144,7 @@ export class OrgSearchComponent implements OnInit, AfterContentInit, OnDestroy {
this.dataUpdatedOn = this.configService.config.dataUpdatedOn;
this.privacyPolicyUrl = this.configService.config.privacyPolicyUrl;
this.termsOfUseUrl = this.configService.config.termsOfUseUrl;
+ this.apiDocsUrl = this.configService.config.apiDocsUrl;
this.seoService.setData(getSeoData(), this.renderer2);
}
diff --git a/libs/openchallenges/team/src/lib/team.component.html b/libs/openchallenges/team/src/lib/team.component.html
index 2334870073..6ccf6a647f 100644
--- a/libs/openchallenges/team/src/lib/team.component.html
+++ b/libs/openchallenges/team/src/lib/team.component.html
@@ -82,4 +82,5 @@ Jake Albrecht
[dataUpdatedOn]="dataUpdatedOn"
[privacyPolicyUrl]="privacyPolicyUrl"
[termsOfUseUrl]="termsOfUseUrl"
+ [apiDocsUrl]="apiDocsUrl"
/>
diff --git a/libs/openchallenges/team/src/lib/team.component.ts b/libs/openchallenges/team/src/lib/team.component.ts
index 97518ed185..7b6cc0a338 100644
--- a/libs/openchallenges/team/src/lib/team.component.ts
+++ b/libs/openchallenges/team/src/lib/team.component.ts
@@ -23,6 +23,7 @@ export class TeamComponent implements OnInit {
public dataUpdatedOn: string;
public privacyPolicyUrl: string;
public termsOfUseUrl: string;
+ public apiDocsUrl: string;
public logo$: Observable | undefined;
public thomas$: Observable | undefined;
public rong$: Observable | undefined;
@@ -40,6 +41,7 @@ export class TeamComponent implements OnInit {
this.dataUpdatedOn = this.configService.config.dataUpdatedOn;
this.privacyPolicyUrl = this.configService.config.privacyPolicyUrl;
this.termsOfUseUrl = this.configService.config.termsOfUseUrl;
+ this.apiDocsUrl = this.configService.config.apiDocsUrl;
this.seoService.setData(getSeoData(), this.renderer2);
}
diff --git a/libs/openchallenges/ui/src/lib/footer/footer.component.html b/libs/openchallenges/ui/src/lib/footer/footer.component.html
index 3a67ff4bb4..80b8125131 100644
--- a/libs/openchallenges/ui/src/lib/footer/footer.component.html
+++ b/libs/openchallenges/ui/src/lib/footer/footer.component.html
@@ -11,7 +11,7 @@
Meet Our Team