| import { Component, OnInit } from '@angular/core'; |
| import { VersionInfo } from '../../model/version-info'; |
| import { VersionInfoService } from '../../services/version-info.service'; |
| import { Globals } from '../../common/globals'; |
| |
| @Component({ |
| selector: 'app-version-info', |
| templateUrl: './version-info.component.html', |
| styleUrls: ['./version-info.component.css'], |
| }) |
| export class VersionInfoComponent implements OnInit { |
| currVersion: VersionInfo = { |
| frontendVersion: '?', |
| backendVersion: '?', |
| dbVersion: '?' |
| }; |
| |
| constructor( private _btbService: VersionInfoService ) { } |
| |
| ngOnInit() { |
| this._btbService.loadBackendServerInfo().subscribe( vinfo => this.setVersionInfo( vinfo ), |
| error => console.log(error) ); |
| } |
| |
| private setVersionInfo( vinfo: VersionInfo ) { |
| this.currVersion = vinfo; |
| this.currVersion.frontendVersion = Globals.FRONTEND_VERSION; |
| } |
| |
| } |