blob: 2f1464f3f513fb76be27c79000fbbda4ef1b70e3 [file] [log] [blame]
/*
******************************************************************************
* Copyright © 2018 PTA GmbH.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
*
* http://www.eclipse.org/legal/epl-v10.html
*
******************************************************************************
*/
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;
}
}