This is an automated email from the ASF dual-hosted git repository.

hshpak pushed a commit to branch cluste-type-for-azure
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git

commit 50e5894d963a115ac5a687ccf48548a63ecb1577
Author: Hennadii_Shpak <[email protected]>
AuthorDate: Tue Aug 16 12:28:55 2022 +0300

    removed condition
---
 .../computational-resource-create-dialog.component.html        | 10 +++++-----
 .../computational-resource-create-dialog.component.ts          |  5 +++++
 2 files changed, 10 insertions(+), 5 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 5599234ca..8387e9637 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
@@ -27,7 +27,7 @@
       <form [formGroup]="resourceForm" *ngIf="clusterTypes.length && 
resourceForm; else placeholder">
         <div class="form-wrapper">
           <div class="col">
-            <div class="control-group" *ngIf="PROVIDER !== 'azure'" 
[hidden]="clusterTypes.length === 1">
+            <div class="control-group" [hidden]="clusterTypes.length === 1">
               <label class="label">Select cluster type</label>
               <div class="control selector-wrapper">
                 <mat-form-field>
@@ -421,13 +421,13 @@
           <button
             mat-raised-button
             type="button"
-            [disabled]="!resourceForm?.valid 
-              || (!resourceForm.value.shape_slave) 
+            [disabled]="!resourceForm?.valid
+              || (!resourceForm.value.shape_slave)
               || (selectedImage?.image === 'docker.datalab-dataengine-service' 
&& !resourceForm.value.version)"
             (click)="createComputationalResource(resourceForm.value)"
             class="butt butt-success action"
-            [ngClass]="{'not-allowed': !resourceForm?.valid 
-              || (selectedImage?.image === 'docker.datalab-dataengine-service' 
&& !resourceForm.value.shape_slave) 
+            [ngClass]="{'not-allowed': !resourceForm?.valid
+              || (selectedImage?.image === 'docker.datalab-dataengine-service' 
&& !resourceForm.value.shape_slave)
               || (selectedImage?.image === 'docker.datalab-dataengine-service' 
&& !resourceForm.value.version) }"
           >
             Create
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 9b03fdf9f..a910fbdc7 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
@@ -184,6 +184,7 @@ export class ComputationalResourceCreateDialogComponent 
implements OnInit {
   }
 
   private getComputationalResourceLimits(): void {
+    console.log(1111, this.selectedImage);
     if (this.selectedImage && this.selectedImage.image) {
       const activeImage = DICTIONARY[this.PROVIDER][this.selectedImage.image];
 
@@ -203,6 +204,10 @@ export class ComputationalResourceCreateDialogComponent 
implements OnInit {
         this.resourceForm.controls['emr_slave_instance_spot'].setValue(true);
         this.resourceForm.controls['instance_price'].setValue(50);
       }
+      if (this.PROVIDER === 'azure' && this.selectedImage.image === 
'docker.datalab-dataengine-service') {
+        this.minInstanceNumber = 
this.selectedImage.limits['min_hdinsight_instance_count'];
+        this.maxInstanceNumber = 
this.selectedImage.limits['max_hdinsight_instance_count'];
+      }
 
       
this.resourceForm.controls['instance_number'].setValue(this.minInstanceNumber);
       
this.resourceForm.controls['preemptible_instance_number'].setValue(this.minPreemptibleInstanceNumber);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to