Display Fineract version and build (#1847)
Co-authored-by: Jose Alberto Hernandez <alberto@blue-daemon.local>
This commit is contained in:
co-authored by
Jose Alberto Hernandez
parent
dd3e89f117
commit
653473bf8a
@@ -1,10 +1,11 @@
|
||||
<div fxLayout="column" id="footer" class="m-b-20">
|
||||
<mat-divider fxFlexAlign="center" class="divider"></mat-divider>
|
||||
<p fxFlexAlign="center" class="footer-content">{{ 'labels.texts.Version' | translate }} <b>{{ version }}</b> - <b>{{
|
||||
<p fxFlexAlign="center" class="footer-content">Mifos <b>{{ versions.mifos }}</b> - <b>{{
|
||||
hash }}</b></p>
|
||||
<p *ngIf="versions.fineract" fxFlexAlign="center" class="footer-content">Fineract <b>{{ versions.fineract.version }}</b></p>
|
||||
<p fxFlexAlign="center" class="footer-content" *ngIf="isBusinessDateDefined">Current Business Date: <b>{{ businessDate
|
||||
| date: 'EEEE, MMMM dd, y' }}</b></p>
|
||||
<p fxFlexAlign="center" class="footer-content"><b>{{ server }}</b></p>
|
||||
<p fxFlexAlign="center" class="footer-content" *ngIf="displayBackEndInfo"><b>{{ server }}</b></p>
|
||||
<mat-divider fxFlexAlign="center" class="divider"></mat-divider>
|
||||
<p fxFlexAlign="center" class="footer-content">{{ 'APP_NAME' | translate }} {{ 'labels.texts.by' | translate }} Mifos
|
||||
</p>
|
||||
|
||||
@@ -6,6 +6,7 @@ import { AuthenticationService } from 'app/core/authentication/authentication.se
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
import { SystemService } from 'app/system/system.service';
|
||||
import { VersionService } from 'app/system/version.service';
|
||||
|
||||
/** Environment Configuration */
|
||||
import { environment } from 'environments/environment';
|
||||
@@ -22,7 +23,9 @@ import { Subscription } from 'rxjs';
|
||||
export class FooterComponent implements OnInit, OnDestroy {
|
||||
|
||||
/** Mifos X version. */
|
||||
version: string = environment.version;
|
||||
versions: any = {
|
||||
mifos: environment.version
|
||||
};
|
||||
/** Mifos X hash */
|
||||
hash: string = environment.hash;
|
||||
server = '';
|
||||
@@ -35,11 +38,14 @@ export class FooterComponent implements OnInit, OnDestroy {
|
||||
alert$: Subscription;
|
||||
timer: any;
|
||||
|
||||
displayBackEndInfo: boolean = environment.displayBackEndInfo;
|
||||
|
||||
constructor(private systemService: SystemService,
|
||||
private settingsService: SettingsService,
|
||||
private authenticationService: AuthenticationService,
|
||||
private alertService: AlertService,
|
||||
private dateUtils: Dates) { }
|
||||
private dateUtils: Dates,
|
||||
private versionService: VersionService) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.alert$ = this.alertService.alertEvent.subscribe((alertEvent: Alert) => {
|
||||
@@ -60,6 +66,12 @@ export class FooterComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
this.getConfigurations();
|
||||
this.server = this.settingsService.server;
|
||||
this.versionService.getBackendInfo().subscribe((data: any) => {
|
||||
const regExp = /0.0.0/gi;
|
||||
this.versions.fineract = {
|
||||
version: data.git.build.replace(regExp, data.git.closest.tag.name)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
|
||||
Reference in New Issue
Block a user