Skip to content
Snippets Groups Projects
Commit c93e508e authored by francois.grand's avatar francois.grand
Browse files

#77 correction d'un bug d'affichage du journal de calcul

- ajout de la traduction pour le code ERROR_DICHO_CONVERGE
parent de2b9f91
No related branches found
No related tags found
1 merge request!15Resolve "faire les modifications nécessaires prendre en compte le ticket cassiopee/jalhyd#46 (Gestion de la session dans la lib)"
...@@ -95,9 +95,9 @@ export class FixedVarResultsComponent implements DoCheck { ...@@ -95,9 +95,9 @@ export class FixedVarResultsComponent implements DoCheck {
this._doUpdate = false; this._doUpdate = false;
if (this._fixedResults != undefined) if (this._fixedResults != undefined)
this._doUpdate = this._fixedResults.hasResults; this._doUpdate = this._fixedResults.hasResults || this._fixedResults.hasLog;
if (this._varResults != undefined) if (this._varResults != undefined)
this._doUpdate = this._doUpdate || this._varResults.hasResults; this._doUpdate = this._doUpdate || this._varResults.hasResults || this._varResults.hasLog;
} }
public ngDoCheck() { public ngDoCheck() {
...@@ -105,12 +105,22 @@ export class FixedVarResultsComponent implements DoCheck { ...@@ -105,12 +105,22 @@ export class FixedVarResultsComponent implements DoCheck {
this._doUpdate = !this.updateResults(); this._doUpdate = !this.updateResults();
} }
private mergeLog(result: Result, log: cLog) {
if (result && result.hasLog) {
if (result.hasGlobalLog)
log.addLog(result.globalLog);
else
log.addLog(result.log);
}
}
private get mergedGlobalLogs(): cLog { private get mergedGlobalLogs(): cLog {
const res = new cLog(); const res = new cLog();
if (this._fixedResults && this._fixedResults.log) if (this._fixedResults)
res.addLog(this._fixedResults.log); this.mergeLog(this._fixedResults.result, res);
if (this._varResults && this._varResults.log)
res.addLog(this._varResults.log); if (this._varResults)
this.mergeLog(this._varResults.result, res);
return res; return res;
} }
......
...@@ -44,6 +44,12 @@ export abstract class CalculatedParamResults extends CalculatorResults { ...@@ -44,6 +44,12 @@ export abstract class CalculatedParamResults extends CalculatorResults {
return this._result.ok; return this._result.ok;
} }
public get hasLog(): boolean {
if (this._result == undefined)
return false;
return this._result.hasLog;
}
public get log(): cLog { public get log(): cLog {
return this._result && this._result.log; // return x == undefined ? undefined : x.y return this._result && this._result.log; // return x == undefined ? undefined : x.y
} }
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
"ERROR_DICHO_NULL_STEP": "Dichotomy (initial interval search): invalid null step", "ERROR_DICHO_NULL_STEP": "Dichotomy (initial interval search): invalid null step",
"ERROR_DICHO_INVALID_STEP_GROWTH": "Dichotomy (initial interval search): invalid null step growth", "ERROR_DICHO_INVALID_STEP_GROWTH": "Dichotomy (initial interval search): invalid null step growth",
"ERROR_DICHO_FUNCTION_VARIATION": "unable to determinate function direction of variation", "ERROR_DICHO_FUNCTION_VARIATION": "unable to determinate function direction of variation",
"ERROR_DICHO_CONVERGE": "Dichotomy could not converge",
"ERROR_NEWTON_DERIVEE_NULLE": "Null function derivative in Newton computation", "ERROR_NEWTON_DERIVEE_NULLE": "Null function derivative in Newton computation",
"ERROR_PARAMDOMAIN_INTERVAL_BOUNDS": "invalid %minValue%/%maxValue% min/max boundaries for 'interval' parameter definition domain", "ERROR_PARAMDOMAIN_INTERVAL_BOUNDS": "invalid %minValue%/%maxValue% min/max boundaries for 'interval' parameter definition domain",
"ERROR_PARAMDEF_CALC_UNDEFINED": "calculability of '%symbol%' parameter is undefined", "ERROR_PARAMDEF_CALC_UNDEFINED": "calculability of '%symbol%' parameter is undefined",
...@@ -81,4 +82,4 @@ ...@@ -81,4 +82,4 @@
"INFO_PABDIM_TITRE": "Pool pass: dimensions", "INFO_PABDIM_TITRE": "Pool pass: dimensions",
"INFO_PABPUISS_TITRE": "Pool pass: dissipated power", "INFO_PABPUISS_TITRE": "Pool pass: dissipated power",
"INFO_OUVRAGEPARAL_TITRE": "Parallel structures" "INFO_OUVRAGEPARAL_TITRE": "Parallel structures"
} }
\ No newline at end of file
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
"ERROR_DICHO_NULL_STEP": "Dichotomie : le pas pour la recherche de l'intervalle de départ ne devrait pas être nul", "ERROR_DICHO_NULL_STEP": "Dichotomie : le pas pour la recherche de l'intervalle de départ ne devrait pas être nul",
"ERROR_DICHO_INVALID_STEP_GROWTH": "Dichotomie : l'augmentation du pas pour la recherche de l'intervalle de départ est incorrecte (=0)", "ERROR_DICHO_INVALID_STEP_GROWTH": "Dichotomie : l'augmentation du pas pour la recherche de l'intervalle de départ est incorrecte (=0)",
"ERROR_DICHO_FUNCTION_VARIATION": "Dichotomie : impossible de determiner le sens de variation de la fonction", "ERROR_DICHO_FUNCTION_VARIATION": "Dichotomie : impossible de determiner le sens de variation de la fonction",
"ERROR_DICHO_CONVERGE": "La dichotomie n'a pas pu converger",
"ERROR_NEWTON_DERIVEE_NULLE": "Dérivée nulle dans un calcul par la méthode de Newton", "ERROR_NEWTON_DERIVEE_NULLE": "Dérivée nulle dans un calcul par la méthode de Newton",
"ERROR_PARAMDOMAIN_INTERVAL_BOUNDS": "Les bornes (%minValue%/%maxValue%) de l'intervalle sont incorrectes", "ERROR_PARAMDOMAIN_INTERVAL_BOUNDS": "Les bornes (%minValue%/%maxValue%) de l'intervalle sont incorrectes",
"ERROR_PARAMDEF_CALC_UNDEFINED": "La calculabilité du paramètre %symbol% n'est pas définie", "ERROR_PARAMDEF_CALC_UNDEFINED": "La calculabilité du paramètre %symbol% n'est pas définie",
......
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