Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
cassiopee
nghyd
Commits
bea206c0
Commit
bea206c0
authored
May 12, 2022
by
Grand Francois
Browse files
feat: PAB calculator: add error,warning,info count in boundary conditions select
refs
#517
parent
f0cd5234
Pipeline
#36038
passed with stages
in 16 minutes and 20 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/app/components/variable-results-selector/variable-results-selector.component.ts
View file @
bea206c0
...
@@ -3,9 +3,9 @@ import { Component, Input, OnChanges } from "@angular/core";
...
@@ -3,9 +3,9 @@ import { Component, Input, OnChanges } from "@angular/core";
import
{
I18nService
}
from
"
../../services/internationalisation.service
"
;
import
{
I18nService
}
from
"
../../services/internationalisation.service
"
;
import
{
fv
,
longestVarParam
}
from
"
../../util
"
;
import
{
fv
,
longestVarParam
}
from
"
../../util
"
;
import
{
MultiDimensionResults
}
from
"
../../results/multidimension-results
"
;
import
{
MultiDimensionResults
}
from
"
../../results/multidimension-results
"
;
import
{
PrebarrageResults
}
from
"
../../results/prebarrage-results
"
;
import
{
VariatedDetails
}
from
"
jalhyd
"
;
import
{
CalculatorType
,
PbBassin
,
PbCloison
,
Structure
,
VariatedDetails
}
from
"
jalhyd
"
;
import
{
CalculatorResults
}
from
"
../../results/calculator-results
"
;
import
{
CalculatorResults
}
from
"
../../results/calculator-results
"
;
import
{
LogHelper
}
from
"
app/results/log-helper
"
;
@
Component
({
@
Component
({
selector
:
"
variable-results-selector
"
,
selector
:
"
variable-results-selector
"
,
...
@@ -24,6 +24,9 @@ export class VariableResultsSelectorComponent implements OnChanges {
...
@@ -24,6 +24,9 @@ export class VariableResultsSelectorComponent implements OnChanges {
@
Input
()
@
Input
()
private
variatedParameters
:
VariatedDetails
[];
private
variatedParameters
:
VariatedDetails
[];
/** stats du log synthétique */
private
_logHelper
:
LogHelper
;
/** valeur en cours */
/** valeur en cours */
private
_selectedValue
=
0
;
private
_selectedValue
=
0
;
...
@@ -61,6 +64,7 @@ export class VariableResultsSelectorComponent implements OnChanges {
...
@@ -61,6 +64,7 @@ export class VariableResultsSelectorComponent implements OnChanges {
// get current variatedIndex even if component was rebuilt
// get current variatedIndex even if component was rebuilt
if
(
this
.
results
)
{
if
(
this
.
results
)
{
this
.
_selectedValue
=
this
.
results
.
variableIndex
;
this
.
_selectedValue
=
this
.
results
.
variableIndex
;
this
.
_logHelper
=
new
LogHelper
(
this
.
results
);
}
}
}
}
...
@@ -80,8 +84,17 @@ export class VariableResultsSelectorComponent implements OnChanges {
...
@@ -80,8 +84,17 @@ export class VariableResultsSelectorComponent implements OnChanges {
return
ret
;
return
ret
;
}
}
/**
* generate entry text for boundary conditions select
* @param index select option index
*/
protected
entryLabel
(
index
:
number
):
string
{
protected
entryLabel
(
index
:
number
):
string
{
return
CalculatorResults
.
variatingModalityLabel
(
this
.
varValues
,
this
.
results
,
index
);
let
res
=
CalculatorResults
.
variatingModalityLabel
(
this
.
varValues
,
this
.
results
,
index
);
const
restat
=
this
.
_logHelper
.
resultElementsStats
(
index
);
if
(
restat
.
length
>
0
)
{
res
+=
"
-
"
+
restat
;
}
return
res
;
}
}
public
get
selectedValue
():
number
{
public
get
selectedValue
():
number
{
...
...
src/locale/messages.en.json
View file @
bea206c0
...
@@ -7,6 +7,9 @@
...
@@ -7,6 +7,9 @@
"WARNING_NOTCH_SUBMERSION_GREATER_THAN_07"
:
"Notch formula is discouraged when submersion is greater than 0.7"
,
"WARNING_NOTCH_SUBMERSION_GREATER_THAN_07"
:
"Notch formula is discouraged when submersion is greater than 0.7"
,
"WARNING_SLOT_SUBMERSION_NOT_BETWEEN_07_AND_09"
:
"Slot formula is discouraged when submersion is lower than 0.7 or greater than 0.9"
,
"WARNING_SLOT_SUBMERSION_NOT_BETWEEN_07_AND_09"
:
"Slot formula is discouraged when submersion is lower than 0.7 or greater than 0.9"
,
"WARNING_WEIR_SUBMERSION_LOWER_THAN_08"
:
"Submerged weir formula is discouraged when submersion is lower than 08"
,
"WARNING_WEIR_SUBMERSION_LOWER_THAN_08"
:
"Submerged weir formula is discouraged when submersion is lower than 08"
,
"WARNING_INFO_COUNT_SHORT"
:
"%d info(s)"
,
"WARNING_WARNING_COUNT_SHORT"
:
"%d warning(s)"
,
"WARNING_ERROR_COUNT_SHORT"
:
"%d error(s)"
,
"WARNING_WARNINGS_ABSTRACT"
:
"%nb% warnings occurred during calculation"
,
"WARNING_WARNINGS_ABSTRACT"
:
"%nb% warnings occurred during calculation"
,
"WARNING_ERRORS_ABSTRACT"
:
"%nb% error occurred during calculation"
,
"WARNING_ERRORS_ABSTRACT"
:
"%nb% error occurred during calculation"
,
"WARNING_ERRORS_ABSTRACT_PLUR"
:
"%nb% errors occurred during calculation"
,
"WARNING_ERRORS_ABSTRACT_PLUR"
:
"%nb% errors occurred during calculation"
,
...
...
src/locale/messages.fr.json
View file @
bea206c0
...
@@ -7,6 +7,9 @@
...
@@ -7,6 +7,9 @@
"WARNING_NOTCH_SUBMERSION_GREATER_THAN_07"
:
"La formule de l'échancrure n'est pas conseillée pour un ennoiement supérieur à 0.7"
,
"WARNING_NOTCH_SUBMERSION_GREATER_THAN_07"
:
"La formule de l'échancrure n'est pas conseillée pour un ennoiement supérieur à 0.7"
,
"WARNING_SLOT_SUBMERSION_NOT_BETWEEN_07_AND_09"
:
"La formule de la fente n'est pas conseillée pour un ennoiement inférieur à 0.7 et supérieur à 0.9"
,
"WARNING_SLOT_SUBMERSION_NOT_BETWEEN_07_AND_09"
:
"La formule de la fente n'est pas conseillée pour un ennoiement inférieur à 0.7 et supérieur à 0.9"
,
"WARNING_WEIR_SUBMERSION_LOWER_THAN_08"
:
"La formule du seuil noyé n'est pas conseillé pour un ennoiement inférieur à 0.8"
,
"WARNING_WEIR_SUBMERSION_LOWER_THAN_08"
:
"La formule du seuil noyé n'est pas conseillé pour un ennoiement inférieur à 0.8"
,
"WARNING_INFO_COUNT_SHORT"
:
"%d info(s)"
,
"WARNING_WARNING_COUNT_SHORT"
:
"%d avertissement(s)"
,
"WARNING_ERROR_COUNT_SHORT"
:
"%d erreur(s)"
,
"WARNING_WARNINGS_ABSTRACT"
:
"%nb% avertissements rencontrés lors du calcul"
,
"WARNING_WARNINGS_ABSTRACT"
:
"%nb% avertissements rencontrés lors du calcul"
,
"WARNING_ERRORS_ABSTRACT"
:
"%nb% erreur rencontrée lors du calcul"
,
"WARNING_ERRORS_ABSTRACT"
:
"%nb% erreur rencontrée lors du calcul"
,
"WARNING_ERRORS_ABSTRACT_PLUR"
:
"%nb% erreurs rencontrées lors du calcul"
,
"WARNING_ERRORS_ABSTRACT_PLUR"
:
"%nb% erreurs rencontrées lors du calcul"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment