| 123456789101112131415161718192021222324252627282930 |
- import { Component, OnInit } from '@angular/core';
- import { faAngleDown, faAngleRight, faChalkboard, faServer } from '@fortawesome/free-solid-svg-icons';
- import { ServerApiService } from '../../services/server-api.service';
- @Component({
- selector: 'app-home',
- templateUrl: './home-page.component.html',
- styleUrls: ['./home-page.component.scss']
- })
- export class HomePageComponent implements OnInit {
- public fa = { faAngleDown, faAngleRight, faChalkboard, faServer };
- public serverConfigs: ServerConfig[] = [];
- public grid = {
- columns: 3,
- rows: 1
- };
- constructor(private apiService: ServerApiService) {
- this.apiService.serverConfigs$.subscribe({ next: this.onServerConfigs.bind(this) });
- }
- async ngOnInit(): Promise<void> {}
- private onServerConfigs(data: ServerConfig[]) {
- this.serverConfigs = data;
- this.grid.rows = this.serverConfigs.length + 1;
- }
- }
|