Skip to content

Commit

Permalink
feat: added env variable for support url
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilczaja committed May 13, 2024
1 parent f542fce commit c70a2fe
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 4 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,20 @@ please see [changelog_updates.md](docs/dev/changelog_updates.md).
- Fixed naming of EDC variable in instructions ([#195](https://github.com/sovity/authority-portal/issues/195))
- Fixed error message for already existing CaaS subdomains ([#196](https://github.com/sovity/authority-portal/issues/196))
- Removed possibility to provide a connector for oneself as a Service Partner ([#191](https://github.com/sovity/authority-portal/issues/191))
- Added an environment variable to enable configuration of the support page URL. See deployment migration notes. ([#203](https://github.com/sovity/authority-portal/issues/203))

### Known issues

### Deployment Migration Notes

- Portal Frontend
- Environment variables
```yaml
# Added
# Variable to set the support page URL
AUTHORITY_PORTAL_FRONTEND_SUPPORT_URL: https://support.mobility-dataspace.eu
```
#### Compatible Versions
- Authority Portal Backend Docker Image: `ghcr.io/sovity/authority-portal-backend:{{ version }}`
Expand Down
2 changes: 1 addition & 1 deletion authority-portal-frontend/.env.local-dev
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ AUTHORITY_PORTAL_FRONTEND_USE_FAKE_BACKEND=true
AUTHORITY_PORTAL_FRONTEND_IFRAME_URL=https://mobility-dataspa-5n9px2qi7r.live-website.com/mds-news
AUTHORITY_PORTAL_FRONTEND_PRIVACY_POLICY_URL=https://mobility-dataspace.online/privacy-policy-mds-portal/
AUTHORITY_PORTAL_FRONTEND_LEGAL_NOTICE_URL=https://mobility-dataspace.eu/legal-notice

AUTHORITY_PORTAL_FRONTEND_SUPPORT_URL=https://support.mobility-dataspace.eu
1 change: 1 addition & 0 deletions authority-portal-frontend/.env.local-e2e-dev
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ AUTHORITY_PORTAL_FRONTEND_USE_LOCAL_BACKEND=true
AUTHORITY_PORTAL_FRONTEND_IFRAME_URL=https://mobility-dataspa-5n9px2qi7r.live-website.com/mds-news
AUTHORITY_PORTAL_FRONTEND_PRIVACY_POLICY_URL=https://mobility-dataspace.online/privacy-policy-mds-portal/
AUTHORITY_PORTAL_FRONTEND_LEGAL_NOTICE_URL=https://mobility-dataspace.eu/legal-notice
AUTHORITY_PORTAL_FRONTEND_SUPPORT_URL=https://support.mobility-dataspace.eu
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
* Contributors:
* sovity GmbH - initial implementation
*/
import {Component, HostListener, OnDestroy, OnInit} from '@angular/core';
import {Component, HostListener, Inject, OnDestroy, OnInit} from '@angular/core';
import {Subject, distinctUntilChanged, takeUntil} from 'rxjs';
import {combineLatest} from 'rxjs';
import {map} from 'rxjs/operators';
import {DeploymentEnvironmentDto} from '@sovity.de/authority-portal-client';
import {GlobalStateUtils} from 'src/app/core/global-state/global-state-utils';
import {SidebarSection} from './sidebar.model';
import {APP_CONFIG, AppConfig} from "../../../../core/config/app-config";

@Component({
selector: 'app-sidebar',
Expand All @@ -27,7 +28,10 @@ export class SidebarComponent implements OnInit, OnDestroy {
sidebarSections: SidebarSection[] = [];
private ngOnDestroy$ = new Subject();

constructor(private globalStateUtils: GlobalStateUtils) {}
constructor(
@Inject(APP_CONFIG) public config: AppConfig,
private globalStateUtils: GlobalStateUtils
) {}

ngOnInit() {
this.startListeningToEnvironmentChanges();
Expand Down Expand Up @@ -166,7 +170,7 @@ export class SidebarComponent implements OnInit, OnDestroy {
{
title: 'MDS Support',
icon: 'question-mark-circle',
rLink: 'https://mobility-dataspace.online/',
rLink: this.config.supportUrl,
isExternalLink: true,
},
],
Expand Down
3 changes: 3 additions & 0 deletions authority-portal-frontend/src/app/core/config/app-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export interface AppConfig {
iframeUrl: string;
privacyPolicyUrl: string;
legalNoticeUrl: string;
supportUrl: string;
}

/**
Expand All @@ -47,6 +48,7 @@ export interface AppConfigEnv {
AUTHORITY_PORTAL_FRONTEND_IFRAME_URL: string;
AUTHORITY_PORTAL_FRONTEND_PRIVACY_POLICY_URL: string;
AUTHORITY_PORTAL_FRONTEND_LEGAL_NOTICE_URL: string;
AUTHORITY_PORTAL_FRONTEND_SUPPORT_URL: string;
}

/**
Expand All @@ -67,5 +69,6 @@ export function buildAppConfig(envVars: AppConfigEnv): AppConfig {
iframeUrl: envVars.AUTHORITY_PORTAL_FRONTEND_IFRAME_URL,
privacyPolicyUrl: envVars.AUTHORITY_PORTAL_FRONTEND_PRIVACY_POLICY_URL,
legalNoticeUrl: envVars.AUTHORITY_PORTAL_FRONTEND_LEGAL_NOTICE_URL,
supportUrl: envVars.AUTHORITY_PORTAL_FRONTEND_SUPPORT_URL,
};
}
1 change: 1 addition & 0 deletions docs/deployment-guide/goals/production/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ AUTHORITY_PORTAL_FRONTEND_INVALIDATE_SESSION_COOKIES_URL: https://[AP_FQDN]/oaut
AUTHORITY_PORTAL_FRONTEND_IFRAME_URL: https://mobility-dataspa-5n9px2qi7r.live-website.com/mds-news # MDS Dashboard iFrame URL
AUTHORITY_PORTAL_FRONTEND_LEGAL_NOTICE_URL: https://mobility-dataspace.eu/legal-notice # Authority Portal Legal Notice URL
AUTHORITY_PORTAL_FRONTEND_PRIVACY_POLICY_URL: https://mobility-dataspace.online/privacy-policy-mds-portal # MDS Privacy Policy URL
AUTHORITY_PORTAL_FRONTEND_SUPPORT_URL: https://support.mobility-dataspace.eu # Support page URL
```

## Initial Setup
Expand Down

0 comments on commit c70a2fe

Please sign in to comment.