This is an automated email from the ASF dual-hosted git repository. ytykhun pushed a commit to branch DATALAB-2457 in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
commit 12718dbdcacd55990cad9b3a87cc83c8f96ac99f Author: Yurii Tykhun <[email protected]> AuthorDate: Tue Jun 29 10:48:18 2021 +0300 [DATALAB-2457] made the image selection dropdown mandatory --- .../create-environment/create-environment.component.html | 1 - .../exploratory/create-environment/create-environment.component.ts | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.html index 56b12c9..2f9af7a 100644 --- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.html +++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.html @@ -104,7 +104,6 @@ <mat-form-field> <mat-label>Select image</mat-label> <mat-select formControlName="notebook_image_name" panelClass="create-resources-dialog scrolling" disableOptionCentering> - <mat-option [value]="null" (click)="selectedImage = null">None</mat-option> <mat-option *ngFor="let image of images" [value]="image?.name" diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.ts index 958261a..08a7f70 100644 --- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.ts +++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.ts @@ -156,7 +156,7 @@ export class ExploratoryEnvironmentCreateComponent implements OnInit { controls.forEach(control => { this.createExploratoryForm.controls[control].setValue(null); - if (control === 'gpu_type' || control === 'gpu_count') { + if (control !== 'shape') { this.createExploratoryForm.controls[control].clearValidators(); this.createExploratoryForm.controls[control].updateValueAndValidity(); } @@ -166,6 +166,11 @@ export class ExploratoryEnvironmentCreateComponent implements OnInit { this.additionalParams.gpu = !this.additionalParams.gpu; this.createExploratoryForm.controls['gpu_enabled'].setValue(this.additionalParams.gpu); } + + if (this.selectedCloud === 'gcp' && template?.image === 'docker.datalab-deeplearning') { + this.createExploratoryForm.controls['notebook_image_name'].setValidators([Validators.required]); + this.createExploratoryForm.controls['notebook_image_name'].updateValueAndValidity(); + } if (this.selectedCloud === 'gcp' && (template?.image === 'docker.datalab-jupyter' || --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
