Skip to content
Snippets Groups Projects
Commit 88a7166e authored by François Grand's avatar François Grand
Browse files

feat: foldable log: add error/warning/info summary in title

refs #519
parent e9ddaff7
No related branches found
No related tags found
1 merge request!151Resolve "Journal de calcul repliable"
Pipeline #139609 passed
import { Component, Input } from "@angular/core";
import { LogHelper } from "app/results/log-helper";
import { ApplicationSetupService } from "app/services/app-setup.service";
import { cLog, Message } from "jalhyd";
import { cLog } from "jalhyd";
import { I18nService } from "../../services/internationalisation.service";
......@@ -33,11 +34,15 @@ export class LogComponent {
}
public get uitextTitreJournal() {
let res;
if (this.logTitle) {
return this.logTitle;
res = this.logTitle;
} else {
return this.intlService.localizeText("INFO_TITREJOURNAL");
res = this.intlService.localizeText("INFO_TITREJOURNAL");
}
const stats = cLog.messagesStats(this._log.messages);
return res + " - " + LogHelper.messagesStatsToString(stats);;
}
public get hasEntries(): boolean {
......
......@@ -47,7 +47,7 @@ export class LogHelper {
return res;
}
private resultElementStatToString(res: any): string {
public static messagesStatsToString(res: any): string {
let ret = "";
function ccat(n: number, code: MessageCode, b: string): string {
if (n > 0) {
......@@ -69,7 +69,7 @@ export class LogHelper {
public resultElementsStats(index: number): string {
const res = this.computeResultElementLogStats(index);
return this.resultElementStatToString(res);
return LogHelper.messagesStatsToString(res);
}
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment