| 12345678910111213141516171819202122232425262728293031 |
- import { Component, OnInit } from '@angular/core';
- import { faAngleDown, faAngleRight, faChalkboard, faChartBar, faServer, faTheaterMasks } 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'],
- host: { class: 'd-flex flex-column h-100 overflow-auto' }
- })
- export class HomePageComponent implements OnInit {
- public fa = { faAngleDown, faAngleRight, faChalkboard, faChartBar, faServer, faTheaterMasks };
- 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;
- }
- }
|