This is an automated email from the ASF dual-hosted git repository. dgnatyshyn pushed a commit to branch DLAB-1486 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit 44e8e446747c9e1572d9dfb60dd940ed47f9ba82 Author: Dmytro Gnatyshyn <di1...@ukr.net> AuthorDate: Wed Jan 29 18:17:12 2020 +0200 [DLAB-1486]: Fixed Dataproc creating --- ...utational-resource-create-dialog.component.html | 2 +- ...mputational-resource-create-dialog.component.ts | 18 ++-------------- .../create-environment.component.html | 2 +- .../resources/webapp/src/assets/styles/_theme.scss | 25 +++++++++++++++++----- 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.html index aab4e24..abac20d 100644 --- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.html +++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.html @@ -125,7 +125,7 @@ <div class="control selector-wrapper"> <mat-form-field> <mat-label>Select instance size</mat-label> - <mat-select formControlName="shape_slave" disableOptionCentering> + <mat-select formControlName="shape_slave" disableOptionCentering placeholder="Select instance size"> <mat-optgroup *ngFor="let item of (selectedImage.computation_resources_shapes | keys)" [label]="item.key | underscoreless"> <mat-option *ngFor="let list_item of item.value" [value]="list_item.Type"> diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.ts index 28f01cd..29ef7d4 100644 --- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.ts +++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.ts @@ -76,7 +76,6 @@ export class ComputationalResourceCreateDialogComponent implements OnInit { this.notebook_instance = this.data.notebook; this.resourcesList = this.data.full_list; this.initFormModel(); - this.initCluster(); this.getTemplates(this.notebook_instance.project, this.notebook_instance.endpoint); } @@ -139,9 +138,9 @@ export class ComputationalResourceCreateDialogComponent implements OnInit { private initFormModel(): void { this.resourceForm = this._fb.group({ template_name: ['', [Validators.required]], - version: ['', Validators.required], + version: [''], shape_master: ['', Validators.required], - shape_slave: ['', Validators.required], + shape_slave: [''], cluster_alias_name: ['', [Validators.required, Validators.pattern(PATTERNS.namePattern), Validators.maxLength(DICTIONARY[this.PROVIDER].max_cluster_name_length), this.checkDuplication.bind(this)]], instance_number: ['', [Validators.required, Validators.pattern(PATTERNS.nodeCountPattern), this.validInstanceNumberRange.bind(this)]], @@ -154,19 +153,6 @@ export class ComputationalResourceCreateDialogComponent implements OnInit { }); } - private initCluster() { - this.resourceForm.get('template_name').valueChanges.subscribe(val => { - if (val === 'AWS EMR cluster') { - this.resourceForm.addControl('shape_slave', new FormControl('', [ Validators.required ])); - this.resourceForm.addControl('version', new FormControl('', [ Validators.required ])); - } else { - this.resourceForm.removeControl('shape_slave'); - this.resourceForm.removeControl('version'); - } - this.resourceForm.updateValueAndValidity(); - }); - } - private shapePlaceholder(resourceShapes, byField: string) { for (const index in resourceShapes) return resourceShapes[index][0][byField]; } 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 a598cec..c195189 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 @@ -66,7 +66,7 @@ <div class="control selector-wrapper" [ngClass]="{ 'not-active' : !templates.length }"> <mat-form-field> <mat-select formControlName="version" disableOptionCentering [disabled]="!templates.length" - panelClass="create-resources-dialog" placeholder="Select endpoint"> + panelClass="create-resources-dialog" placeholder="Select template"> <mat-option *ngFor="let template of templates" [value]="template.exploratory_environment_versions[0].version" (click)="getShapes(template)"> {{ template.exploratory_environment_versions[0].template_name }} diff --git a/services/self-service/src/main/resources/webapp/src/assets/styles/_theme.scss b/services/self-service/src/main/resources/webapp/src/assets/styles/_theme.scss index bb8ad38..7ac6252 100644 --- a/services/self-service/src/main/resources/webapp/src/assets/styles/_theme.scss +++ b/services/self-service/src/main/resources/webapp/src/assets/styles/_theme.scss @@ -300,24 +300,39 @@ span.mat-slide-toggle-content { } .project-form, -.create-environment, -.create-cluster{ +.create-environment{ .ng-invalid{ .mat-form-field-label { line-height: 22px !important; font-size: 15px !important; } + .ng-valid .mat-form-field-label { + color: transparent !important; + } } +} + + +.project-form, +.create-environment, +.create-cluster{ - .ng-valid .mat-form-field-label { - color: transparent !important; - } .mat-select-value{ overflow: visible; } } +.create-cluster { + .ng-invalid { + .mat-form-field-label { + padding-top: 5px; + line-height: 16px !important; + font-size: 15px !important; + } + } +} + .manage-roles, .project-form, .selection { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org