Skip to content

Commit

Permalink
fix: change positioning, add subtitle, add app-config variables
Browse files Browse the repository at this point in the history
  • Loading branch information
illfixit committed Nov 6, 2023
1 parent 0311cc8 commit 5eaed3f
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 35 deletions.
6 changes: 6 additions & 0 deletions src/app/core/config/app-config-properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,10 @@ export const AppConfigProperties = {
* Whether to use the fake backend (local development).
*/
useFakeBackend: 'EDC_UI_USE_FAKE_BACKEND',

/**
* Only for Enterprise Edition.
* Enables Marketing for other Enterprise Edition Variants.
*/
showEeBasicMarketing: 'EDC_UI_SHOW_EE_BASIC_MARKETING',
};
4 changes: 4 additions & 0 deletions src/app/core/config/app-config.builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ export class AppConfigBuilder {
// Other EDC Backend Endpoints
catalogUrls: vars[AppConfigProperties.catalogUrls] ?? '',
useFakeBackend: vars[AppConfigProperties.useFakeBackend] === 'true',

// Enterprise Edition
showEeBasicMarketing:
vars[AppConfigProperties.showEeBasicMarketing] === 'true',
};
}
}
3 changes: 3 additions & 0 deletions src/app/core/config/app-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,7 @@ export interface AppConfig {
// Other EDC Backend Endpoints
catalogUrls: string;
useFakeBackend: boolean;

// Enterprise Edition
showEeBasicMarketing: boolean;
}
5 changes: 4 additions & 1 deletion src/app/core/config/profiles/edc-ui-feature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ export type EdcUiFeature =
| 'open-source-marketing'

// Enterprise Edition specific attribute to view limits enforced on consuming contract agreements
| 'connector-limits';
| 'connector-limits'

// Enterprise Edition specific flag to enable marketing for other Enterprise Edition variants in basic connectors
| 'mds-ee-basic-marketing';
6 changes: 5 additions & 1 deletion src/app/core/config/profiles/edc-ui-profile-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ export const EDC_UI_PROFILE_DATA = inferEdcUiProfileType({
'mds-hosted-by-sovity': {
...MDS_THEME,
routes: 'connector-ui',
features: new Set(['mds-fields', ...ENTERPRISE_EDITION_FEATURES]),
features: new Set([
'mds-fields',
'mds-ee-basic-marketing',
...ENTERPRISE_EDITION_FEATURES,
]),
},
broker: {
...MDS_THEME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,44 @@
</mat-form-field>
</mat-card>

<mat-card
*ngIf="
('mds-ee-basic-marketing' | isActiveFeature) &&
config.showEeBasicMarketing
">
<mat-card-title
><span class="flex flex-row items-center"
>Provided by
<img
class="h-6 ml-2 mt-1"
src="/assets/images/sovity_logo.svg"
alt="sovity logo" /></span
></mat-card-title>
<mat-card-subtitle>Basic Edition EDC</mat-card-subtitle>

<div class="flex flex-row h-fit">
<div>
<p class="text-justify mx-2">
This Basic version is provided by sovity to enable your first steps
in Mobility Data Space.
</p>
<p class="text-justify mx-2">
Please contact us in case you would like to use additional features
and advanced services.
</p>
</div>
</div>
<div class="flex flex-row !space-x-[10px]">
<a
color="secondary"
href="https://sovity.de/en/contact/"
mat-stroked-button
target="_blank">
Contact us
</a>
</div>
</mat-card>

<mat-card *ngIf="'open-source-marketing' | isActiveFeature">
<mat-card-title>Get Managed EDC</mat-card-title>
<mat-card-subtitle>Connector-as-a-Service</mat-card-subtitle>
Expand Down Expand Up @@ -201,36 +239,5 @@
</ul>
</div>
</mat-card>
<mat-card *ngIf="'open-source-marketing' | isActiveFeature">
<mat-card-title
><span class="flex flex-row items-center"
>Provided by
<img
class="h-6 ml-2"
src="/assets/images/sovity_logo.svg"
alt="sovity logo" /></span
></mat-card-title>
<div class="flex flex-row h-fit">
<div>
<p class="text-justify mx-2">
This Basic version is provided by sovity to enable your first steps
in Mobility Data Space.
</p>
<p class="text-justify mx-2">
Please contact us in case you would like to use additional features
and advanced services.
</p>
</div>
</div>
<div class="flex flex-row !space-x-[10px]">
<a
color="secondary"
href="https://sovity.de/en/contact/"
mat-stroked-button
target="_blank">
Contact us
</a>
</div>
</mat-card>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {Component, OnDestroy, OnInit} from '@angular/core';
import {Component, Inject, OnDestroy, OnInit} from '@angular/core';
import {BehaviorSubject, Subject} from 'rxjs';
import {switchMap, takeUntil} from 'rxjs/operators';
import {APP_CONFIG, AppConfig} from 'src/app/core/config/app-config';
import {ConnectorInfoPropertyGridGroupBuilder} from '../../../../core/services/connector-info-property-grid-group-builder';
import {DashboardPageData, defaultDashboardData} from './dashboard-page-data';
import {DashboardPageDataService} from './dashboard-page-data.service';
Expand All @@ -14,7 +15,10 @@ export class DashboardPageComponent implements OnInit, OnDestroy {
data: DashboardPageData = defaultDashboardData();
private refresh$ = new BehaviorSubject(true);

constructor(private dashboardDataService: DashboardPageDataService) {}
constructor(
@Inject(APP_CONFIG) public config: AppConfig,
private dashboardDataService: DashboardPageDataService,
) {}

ngOnInit() {
this.refresh$
Expand Down

0 comments on commit 5eaed3f

Please sign in to comment.