-
Notifications
You must be signed in to change notification settings - Fork 100
Expand file tree
/
Copy pathapp.component.ts
More file actions
51 lines (47 loc) · 1.49 KB
/
app.component.ts
File metadata and controls
51 lines (47 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* Copyright (c) 2025 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. - initial API and implementation
*
*/
import { Component, OnInit, inject } from '@angular/core';
import { DashboardAppComponent, EdcConfig } from '@eclipse-edc/dashboard-core';
import { HttpClient } from '@angular/common/http';
import { firstValueFrom } from 'rxjs';
import { AppConfig } from '../../projects/dashboard-core/src/lib/models/app-config';
@Component({
selector: 'app-root',
standalone: true,
templateUrl: './app.component.html',
imports: [DashboardAppComponent],
styleUrl: './app.component.css',
})
export class AppComponent implements OnInit {
private readonly http = inject(HttpClient);
protected readonly themes = [
'light',
'dark',
'dim',
'aqua',
'nord',
'synthwave',
'forest',
'dracula',
'night',
'coffee',
'emerald',
];
edcConfigs?: Promise<EdcConfig[]>;
appConfig?: Promise<AppConfig>;
ngOnInit() {
this.edcConfigs = firstValueFrom(this.http.get<EdcConfig[]>('config/edc-connector-config.json'));
this.appConfig = firstValueFrom(this.http.get<AppConfig>('config/app-config.json'));
}
}