Display Fineract version and build (#1847)

Co-authored-by: Jose Alberto Hernandez <alberto@blue-daemon.local>
This commit is contained in:
José Alberto Hernández
2023-08-23 20:55:59 -06:00
committed by GitHub
co-authored by Jose Alberto Hernandez
parent dd3e89f117
commit 653473bf8a
12 changed files with 83 additions and 32 deletions
+14 -2
View File
@@ -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() {