diff --git a/CHANGELOG.md b/CHANGELOG.md index db0ee4e803a09bc0014096b0d5e15be5e309541f..a648ec2f0d0c3afdd8da781058abcabe724e9404 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Historique des versions -### 4.15.1 - 2022-06-28 +### 4.15.1 - 2022-07-04 #### Nouvelles fonctionnalités @@ -17,6 +17,7 @@ #### Correction de bogues * Liens inaccessibles pour certains modules ([jalhyd#289](https://gitlab.irstea.fr/cassiopee/jalhyd/-/issues/289), [nghyd#547](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/547)) +* Plantage du calcul sur modules liés ([jalhyd#286](https://gitlab.irstea.fr/cassiopee/jalhyd/-/issues/286)) * PréBarrages: les champs ne sont pas vides à la création du module ([jalhyd#310](https://gitlab.irstea.fr/cassiopee/jalhyd/-/issues/310), [nghyd#546](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/546)) * L'annulation de la saisie du mode "Varier" mémorise les valeurs non valides ([nghyd#545](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/545)) * PréBarrages: les changements de couleur du schéma ne sont pas instantanées ([nghyd#544](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/544)) @@ -26,9 +27,12 @@ * PAR Calage et Simulation: répétition des paramètres dans le résultat ([nghyd#535](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/535)) * PAB nombre: mauvaise colonne de résultat ([jalhyd#304](https://gitlab.irstea.fr/cassiopee/jalhyd/-/issues/304), [nghyd#534](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/534)) * MacroRugo complexe: le graphique des vitesses moyennes entre les blocs ne s'affiche pas ([nghyd#533](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/533)) -* Cote amont/aval de bief: le bouton "détail d'une section hydraulique" ne fonctionne pas toujours ([nghyd#504](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/504)) +* Cote amont/aval de bief: le bouton "détail d'une section hydraulique" ne fonctionne pas toujours ([nghyd#504](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/504), [jalhyd#311](https://gitlab.irstea.fr/cassiopee/jalhyd/-/issues/311)) * PréBarrages: les valeurs erronées ne sont pas conservées ([nghyd#501](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/501)) * Solveur multimodule: le choix du paramètre recherché n'est pas maintenu à l'écran ([nghyd#486](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/486)) +* Log : améliorer la synthèse de journal ([jalhyd#308](https://gitlab.irstea.fr/cassiopee/jalhyd/-/issues/308)) +* Les liens erronés sont remplacés par d'autres liens ([nghyd#551](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/551)) +* PAB: Lancement du calcul possible avec des champs invalides ([nghyd#552](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/552), [jalhyd#317](https://gitlab.irstea.fr/cassiopee/jalhyd/-/issues/317)) #### Changements internes diff --git a/docs/en/index.md b/docs/en/index.md index a2c16d9bb817ce7a1bbbdb93e7a081c978d8329e..dc47b88878b026522d12ee6bb6387784429bf754 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -23,8 +23,10 @@ Download [documentation in PDF format](https://cassiopee.g-eau.fr/assets/docs/pd Download [illustrated quick start guide (in french) in PDF format](https://cassiopee.g-eau.fr/assets/docs/pdf/cassiopee_notice_illustree_fr.pdf) -## Contact and bug reporting +## Support and bug reports -To report a bug in the application, please use the "Report a issue" link in the main menu of the application or write directly to bug@cassiopee.g-eau.fr. +To be kept informed of Cassiopée news or to benefit from the Cassiopée users' support network, subscribe to the Cassiopée users' mailing list: https://groupes.renater.fr/sympa/subscribe/cassiopee-users + +To report a bug in the application, please use the "Report an issue" link in the main menu of the application or write directly to bug@cassiopee.g-eau.fr. For questions concerning the design of fish crossing structures for upstream (basin, retarder, macro-roughness) and downstream migrations, please contact Sylvain Richard, pole OFB-IMFT Écohydraulique, sylvain.richard@imft.fr. diff --git a/docs/en/mentions_legales.md b/docs/en/mentions_legales.md index e0c693201e789a93b659e46bee63f25cf395356a..3aef772b20e1b69622511a0066c0f72c04e86e3b 100644 --- a/docs/en/mentions_legales.md +++ b/docs/en/mentions_legales.md @@ -49,11 +49,11 @@ If you notice an error or omission in the tools and content of Cassiopée, pleas #### Data collected by Cassiopée -The cassiopee.g-eau.fr site does not collect any personal data about the user except the IP address of the machine used to connect to the site. +The cassiopee.g-eau.fr site does not collect any personal data about the user except the IP address of the machine used to connect to the site and the calculation modules used by the user and the number of calculation run. The data and calculations carried out by Cassiopée are entirely carried out on the user's machine and are not transmitted to the server or any other third party. -Submitting a bug report via the "Report a problem" feature invites the user to send by email the content of his current work session to the Cassiopée development team. The user can choose not to transmit his session by deleting the text of the email below the line `--- Status of the current session - do not modify the text below ---`. The email address provided by the user to the development team will not be shared with third parties or used for any purpose other than to contact the user in connection with the reported problem. +Submitting a bug report via the "Report an issue" feature invites the user to send by email the content of his current work session to the Cassiopée development team. The user can choose not to transmit his session by deleting the text of the email below the line `--- Status of the current session - do not modify the text below ---`. The email address provided by the user to the development team will not be shared with third parties or used for any purpose other than to contact the user in connection with the reported problem. #### Data stored on the user's terminal diff --git a/docs/fr/index.md b/docs/fr/index.md index 8f1083c3b52f3c22fa5a159d9dd18b678c555ae5..5621a48ad75c4c2a12069f7d7fbe785ef16614b0 100644 --- a/docs/fr/index.md +++ b/docs/fr/index.md @@ -23,7 +23,9 @@ Télécharger [la documentation au format PDF](https://cassiopee.g-eau.fr/assets Télécharger [le guide de prise en main illustrée au format PDF](https://cassiopee.g-eau.fr/assets/docs/pdf/cassiopee_notice_illustree_fr.pdf) -## Contact et signalement de bug +## Assistance et signalement de bug + +Pour être tenu au courant de l'actualité de Cassiopée et bénéficier du réseau d'entraide des utilisateurs de Cassiopée, inscrivez-vous à la liste de diffusion des utilisateurs de Cassiopée : https://groupes.renater.fr/sympa/subscribe/cassiopee-users Pour signaler un bug de l'application, prière d'utiliser le lien "Signaler un problème" présent dans le menu principal de l'application ou écrire directement à bug@cassiopee.g-eau.fr diff --git a/docs/fr/mentions_legales.md b/docs/fr/mentions_legales.md index d73b7d36cda3005f3b23b3db1950d5ebcc60c81d..f6795c5eb4124c7e2218cc31a7a309e6ba99e9cc 100644 --- a/docs/fr/mentions_legales.md +++ b/docs/fr/mentions_legales.md @@ -53,7 +53,7 @@ Si vous constatiez une erreur ou une omission dans les outils et contenus de Cas ### Données recueillies par Cassiopée -Le site cassiopee.g-eau.fr ne recueille aucune donnée personnelle sur l'utilisateur hormis l'adresse IP de la machine utilisée pour se connecter sur le site. +Le site cassiopee.g-eau.fr ne recueille aucune donnée personnelle sur l'utilisateur hormis l'adresse IP de la machine utilisée pour se connecter sur le site, les modules de calcul utilisés ainsi que le nombre de calcul lancés. Les données et les calculs effectués par Cassiopée sont entièrement réalisés sur la machine de l'utilisateur et ne sont transmis ni à l'hébergeur, ni à aucun autre tiers. diff --git a/e2e/reset-param-mode.e2e-spec.ts b/e2e/reset-param-mode.e2e-spec.ts index c4b7548394bbfc131bd31f03bf1ac399085cfab6..b6a294b72b6b920c7c407a53416f8c6746da89a1 100644 --- a/e2e/reset-param-mode.e2e-spec.ts +++ b/e2e/reset-param-mode.e2e-spec.ts @@ -13,12 +13,12 @@ describe("ngHyd - check parameter mode is set to its previous value - ", () => { listPage = new ListPage(); }); - it("when min/max/list values dialog is cancelled", async () => { + it("when min/max/list values dialog is cancelled on 'fish ladder: fall' calculator", async () => { // start page await listPage.navigateTo(); await browser.sleep(500); - // open PAB chute + // open 'PAB fall' calculator await listPage.clickMenuEntryForCalcType(12); await browser.sleep(500); @@ -37,10 +37,47 @@ describe("ngHyd - check parameter mode is set to its previous value - ", () => { await cancelbtn.click(); await browser.sleep(200); - // check Z1 var toggle is disabled + // check Z1 var toggle is not checked expect(await z1varbtn.getAttribute("ng-reflect-checked")).toBe("false"); - // check Z1 calc toggle is enabled + // check Z1 calc toggle is checked + expect(await z1calcbtn.getAttribute("ng-reflect-checked")).toBe("true"); + }); + + it("when min/max/list values dialog is cancelled on 'fish ladder' calculator", async () => { + // start page + await listPage.navigateTo(); + await browser.sleep(500); + + // open PAB calculator + await listPage.clickMenuEntryForCalcType(15); + await browser.sleep(500); + + // "fixed" radio on Q parameter + const qfixbtn = element(by.id("mat-button-toggle-1")); + await browser.sleep(50); + + // "var" radio on Z1 parameter + const z1varbtn = element(by.id("mat-button-toggle-6")); + await browser.sleep(50); + + // "calc" radio on Z1 parameter + const z1calcbtn = element(by.id("mat-button-toggle-7")); + await browser.sleep(50); + + // click "var" radio on Z1 parameter + await z1varbtn.click(); + await browser.sleep(200); + + // click cancel button + const cancelbtn = element(by.id("btn-cancel")); + await cancelbtn.click(); + await browser.sleep(200); + + // check Q fix toggle is checked + expect(await qfixbtn.getAttribute("ng-reflect-checked")).toBe("true"); + + // check Z1 calc toggle is checked expect(await z1calcbtn.getAttribute("ng-reflect-checked")).toBe("true"); }); }); diff --git a/scripts/deploy-version.sh b/scripts/deploy-version.sh index d4cfb88144fb7b161a5a19507b3ad31769823974..c495e81e0255388d9e86f72562a7e822fb5e5898 100755 --- a/scripts/deploy-version.sh +++ b/scripts/deploy-version.sh @@ -14,20 +14,16 @@ VERSION="$1" LOGIN="$2" HOST="$3" DIR="$4" -UPDATE_INDEX=$5 -PASS="$6" +PASS="$5" echo "$(basename $0): deploying version $VERSION in $LOGIN@$HOST:$DIR" -if [[ $VERSION == "stable" ]]; then +if [[ $VERSION == "prod" ]]; then # Copie de la branche production rsync -a --delete --exclude=cassiopee-releases -e "ssh -o StrictHostKeyChecking=no" dist/ ${LOGIN}@${HOST}:${DIR}/ - - if (( $UPDATE_INDEX == 1 )); then - # Modification du dossier base href - echo "updating index.html" - ssh $LOGIN@$HOST "sed -i 's:/cassiopee/stable/:/:g' $DIR/index.html" - fi + # Modification du dossier base href + echo "updating index.html" + ssh $LOGIN@$HOST "sed -i 's:/cassiopee/stable/:/:g' $DIR/index.html" else # Copie de la branche / du tag rsync -a --delete --exclude=cassiopee-releases -e "ssh -o StrictHostKeyChecking=no" "dist/" "$LOGIN@$HOST:$DIR/$VERSION" diff --git a/src/app/components/pab-table/pab-table.component.html b/src/app/components/pab-table/pab-table.component.html index 053f92e43b9213ac33c8607e827773cf57932d49..f32c43fd141230f0f59b63bea01cee72203fdc26 100644 --- a/src/app/components/pab-table/pab-table.component.html +++ b/src/app/components/pab-table/pab-table.component.html @@ -86,8 +86,9 @@ [class.select]="isSelect(cell)" [attr.rowspan]="rowSpan(cell)" [attr.colspan]="colSpan(cell)" [title]="cellTitle(cell)"> - <input matInput *ngIf="isNumberInput(cell)" step="0.00000000000001" type="number" - [(ngModel)]="cell.model.singleValue" (input)="inputValueChanged($event, cell)"> + <input matInput *ngIf="isNumberInput(cell)" step="0.00000000000001" type="number" required + [ngModel]="getCellValue(cell)" (ngModelChange)="setCellValue(cell,$event)" + (input)="inputValueChanged($event, cell)"> <mat-select #selectWidget *ngIf="isSelect(cell)" [value]="cell.modelValue" (selectionChange)="loiDebitSelected($event, cell)"> @@ -102,7 +103,8 @@ {{ cell.title }} </div> <param-field-line class="qaFieldLine" [param]="cell.model" (radio)="inputValueChanged($event, cell)" - (input)="inputValueChanged($event, cell)" [captureTabEvents]="false"> + (input)="inputValueChanged($event, cell)" [captureTabEvents]="false" + fixedPlaceHolder=""> </param-field-line> </div> diff --git a/src/app/components/pab-table/pab-table.component.ts b/src/app/components/pab-table/pab-table.component.ts index 7d95042fbe040b74b0ce78be4079036ccdc2478e..f22816c7dfc97d65842dede42319def5acb459a2 100644 --- a/src/app/components/pab-table/pab-table.component.ts +++ b/src/app/components/pab-table/pab-table.component.ts @@ -190,6 +190,9 @@ export class PabTableComponent implements AfterViewInit, AfterViewChecked, OnIni if (cell.uiValidity !== undefined) { valid = valid && cell.uiValidity; } + if (cell.modelValidity !== undefined) { + valid = valid && cell.modelValidity; + } return ! valid; } @@ -1439,6 +1442,19 @@ export class PabTableComponent implements AfterViewInit, AfterViewChecked, OnIni this.updateValidity(); } + public getCellValue(cell) { + return cell.model.singleValue; + } + + public setCellValue(cell, event) { + try { + cell.model.singleValue = event + cell.modelValidity = undefined; + } catch (error) { + cell.modelValidity = false; + } + } + /** * Computes the global Pab validity : validity of every cell of every row */ diff --git a/src/app/components/param-field-line/param-field-line.component.html b/src/app/components/param-field-line/param-field-line.component.html index a9114f5f2974450548c16151f381f711af3adb29..641d9c4b026793c3f12900a2de31ee916068ff30 100644 --- a/src/app/components/param-field-line/param-field-line.component.html +++ b/src/app/components/param-field-line/param-field-line.component.html @@ -3,7 +3,7 @@ <!-- input de saisie de la valeur --> <div fxFlex="1 0 120px"> <!-- composant pour gérer le cas général (valeur numérique à saisir) --> - <ngparam-input [title]="param.title" [hidden]="! isRadioFixChecked" (change)="onInputChange($event)" + <ngparam-input [title]="fixedPlaceHolder" [hidden]="! isRadioFixChecked" (change)="onInputChange($event)" (tabPressed)="onTabPressed($event)" [captureTabEvents]="captureTabEvents"> </ngparam-input> diff --git a/src/app/components/param-field-line/param-field-line.component.ts b/src/app/components/param-field-line/param-field-line.component.ts index 0c68a61120b4a2a02c1c523896277eeba9fe8083..a64528e1fcab24d304caf2763e13ada2708894ad 100644 --- a/src/app/components/param-field-line/param-field-line.component.ts +++ b/src/app/components/param-field-line/param-field-line.component.ts @@ -45,6 +45,21 @@ export class ParamFieldLineComponent implements OnChanges { return this.intlService.localizeText("INFO_PARAMFIELD_PARAMLIE"); } + /** user defined parameter placeholder (fixed mode) */ + private _fixedPlaceHolder: string; + + public get fixedPlaceHolder(): string { + if (this._fixedPlaceHolder !== undefined) { + return this._fixedPlaceHolder; + } + return this.param.title; + } + + @Input() + public set fixedPlaceHolder(ph: string) { + this._fixedPlaceHolder = ph; + } + // états booléens des boutons public get isRadioFixChecked(): boolean { @@ -211,8 +226,13 @@ export class ParamFieldLineComponent implements OnChanges { let ret = true; if (this.param.paramDefinition.isCalculated) { const nub = this.param.paramDefinition.parentNub; - const p = nub.findFirstCalculableParameter(this.param.paramDefinition); - ret = (p !== undefined); + try { + const p = nub.findFirstCalculableParameter(this.param.paramDefinition); + ret = (p !== undefined); + } + catch (e) { + ret = true; + } } return ret; } diff --git a/src/app/formulaire/elements/ngparam.ts b/src/app/formulaire/elements/ngparam.ts index c4d6c146e010d746c54e61c8ede01b2311d3cd03..869e54e20f8131656548962e8d30bb56df4da946 100644 --- a/src/app/formulaire/elements/ngparam.ts +++ b/src/app/formulaire/elements/ngparam.ts @@ -32,6 +32,9 @@ export class NgParameter extends InputField implements Observer { /** set to true to disable UI validation on this input */ private _allowEmpty = false; + /** user defined title (if undefined : parameter label + unit */ + private _title: string; + public radioConfig: ParamRadioConfig; public disabled: boolean; @@ -269,6 +272,10 @@ export class NgParameter extends InputField implements Observer { } public get title(): string { + if (this._title !== undefined) { + return this._title; + } + let t = ""; if (this.label !== undefined) { t = this.label; @@ -279,6 +286,13 @@ export class NgParameter extends InputField implements Observer { return t; } + /** + * set custom title + */ + public set title(t: string) { + this._title = t; + } + public get valuesIterator(): INumberIterator { return this._paramDef.valuesIterator; }