blob: 095b4ec7bab19a76bff2375cce4cedff047377ab [file] [log] [blame]
/**
******************************************************************************
* Copyright © 2017-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;
}
}