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

ankovalyshyn pushed a commit to branch feature/projects
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit 507be62e00d33287b400fd5b5a505e8c10a55ff1
Author: Andriana Kovalyshyn <andriana_kovalys...@epam.com>
AuthorDate: Wed Jun 19 17:24:55 2019 +0300

    [DLAB-787]: pass custom tag on cluster creation
---
 .../computational-resource-create-dialog.component.ts               | 6 +++---
 .../webapp/src/app/resources/resources-grid/resources-grid.model.ts | 4 +++-
 2 files changed, 6 insertions(+), 4 deletions(-)

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 6b793d4..7d28484 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
@@ -81,7 +81,7 @@ export class ComputationalResourceCreateDialogComponent 
implements OnInit {
   }
 
   public selectSpotInstances($event?): void {
-    if ($event ? $event.target.checked : 
this.spotInstancesSelect.nativeElement['checked']) {
+    if ($event ? $event.target.checked : (this.spotInstancesSelect && 
this.spotInstancesSelect.nativeElement['checked'])) {
       const filtered = this.filterAvailableSpots();
       this.spotInstance = this.shapePlaceholder(filtered, 'spot');
       this.resourceForm.controls['instance_price'].setValue(50);
@@ -141,7 +141,7 @@ export class ComputationalResourceCreateDialogComponent 
implements OnInit {
       preemptible_instance_number: [0, 
Validators.compose([Validators.pattern(PATTERNS.integerRegex), 
this.validPreemptibleRange.bind(this)])],
       instance_price: [0, [this.validInstanceSpotRange.bind(this)]],
       configuration_parameters: ['', [this.validConfiguration.bind(this)]],
-      custom_tag: [this.notebook_instance.custom_tag]
+      custom_tag: [this.notebook_instance.tags.custom_tag]
     });
   }
 
@@ -165,7 +165,7 @@ export class ComputationalResourceCreateDialogComponent 
implements OnInit {
         this.minSpotPrice = 
this.selectedImage.limits.min_emr_spot_instance_bid_pct;
         this.maxSpotPrice = 
this.selectedImage.limits.max_emr_spot_instance_bid_pct;
 
-        this.spotInstancesSelect.nativeElement['checked'] = true;
+        if (this.spotInstancesSelect) 
this.spotInstancesSelect.nativeElement['checked'] = true;
         this.selectSpotInstances();
       }
 
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.model.ts
 
b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.model.ts
index 93d3d0a..b60d13a 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.model.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.model.ts
@@ -47,6 +47,7 @@ export class ExploratoryModel {
     public datalake_shared_directory: string,
     public project: string,
     public endpoint: string,
+    public tags: any,
   ) { }
 
   public static loadEnvironments(exploratoryList: Array<any>, sharedDataList: 
any): Array<ExploratoryModel> {
@@ -76,7 +77,8 @@ export class ExploratoryModel {
           sharedDataList[DICTIONARY.datalake_user_directory_name],
           sharedDataList[DICTIONARY.datalake_shared_directory_name],
           value.project,
-          value.endpoint
+          value.endpoint,
+          value.tags
         );
       });
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org
For additional commands, e-mail: commits-h...@dlab.apache.org

Reply via email to