diff --git a/ogWebconsole/src/app/components/global-status/global-status.component.html b/ogWebconsole/src/app/components/global-status/global-status.component.html index 552b703..d185adb 100644 --- a/ogWebconsole/src/app/components/global-status/global-status.component.html +++ b/ogWebconsole/src/app/components/global-status/global-status.component.html @@ -40,7 +40,16 @@ - Content 3 + +
+ +
+
+ diff --git a/ogWebconsole/src/app/components/global-status/global-status.component.ts b/ogWebconsole/src/app/components/global-status/global-status.component.ts index cd17fd2..7b8b6eb 100644 --- a/ogWebconsole/src/app/components/global-status/global-status.component.ts +++ b/ogWebconsole/src/app/components/global-status/global-status.component.ts @@ -20,6 +20,8 @@ export class GlobalStatusComponent implements OnInit { domain: ['#df200d', '#26a700'] }; view: [number, number] = [400, 220]; + repositoriesUrl: string; + repositories: any[] = []; ogBootApiUrl: string; ogBootDiskUsage: any = {}; @@ -40,6 +42,7 @@ export class GlobalStatusComponent implements OnInit { this.baseUrl = this.configService.apiUrl; this.ogBootApiUrl = `${this.baseUrl}/og-boot/status`; this.dhcpApiUrl = `${this.baseUrl}/og-dhcp/status`; + this.repositoriesUrl = `${this.baseUrl}/image-repositories`; } ngOnInit(): void { @@ -91,6 +94,20 @@ export class GlobalStatusComponent implements OnInit { }); } + loadRepositories(): void { + this.loading = true; + this.http.get(`${this.repositoriesUrl}?page=1&itemsPerPage=10`).subscribe( + data => { + this.repositories = data['hydra:member']; + this.loading = false; + }, + error => { + console.error('Error fetching repositories', error); + this.loading = false; + } + ); + } + loadOgBootStatus(): void { this.isDhcp = false; this.loadStatus(this.ogBootApiUrl, this.ogBootDiskUsage, this.ogBootServicesStatus, this.ogBootDiskUsageChartData, this.installedOgLives, this.isDhcp);