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

hshpak pushed a commit to branch feat/DATALAB-2646/create-HDInside-on-Azure
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git

commit 522d01d7569554e91d173e06ac8a9d788d0d1416
Author: Hennadii_Shpak <[email protected]>
AuthorDate: Thu Aug 18 21:04:41 2022 +0300

    initial commit
---
 .../docker-image-name.ts}                          |  6 +--
 .../app/core/{models => configs}/imageType.enum.ts |  0
 .../imageType.enum.ts => configs/providers.ts}     |  7 +--
 .../core/{models => configs}/statusTypes.enum.ts   |  0
 .../templates-name.ts => configs/template-name.ts} |  4 +-
 .../models/computationalResourceImage.model.ts     |  8 +--
 .../models/exploratoryEnvironmentVersion.model.ts  |  2 +-
 .../resources/webapp/src/app/core/models/index.ts  |  6 +--
 .../is-element-available.pipe.ts                   |  4 +-
 .../src/app/core/services/userResource.service.ts  |  6 ++-
 ...utational-resource-create-dialog.component.html | 14 +++--
 ...mputational-resource-create-dialog.component.ts | 32 +++++++-----
 .../computational.resource.model.ts}               | 59 ++++++++++++++--------
 .../computational-resource-create-dialog/index.ts  |  5 +-
 .../create-environment.component.ts                |  4 +-
 .../src/app/resources/images/images.component.html |  2 +-
 .../src/app/resources/images/images.component.ts   |  8 ++-
 .../src/app/resources/images/images.config.ts      | 10 +---
 .../src/app/resources/resources.component.ts       |  2 -
 19 files changed, 104 insertions(+), 75 deletions(-)

diff --git 
a/services/self-service/src/main/resources/webapp/src/app/core/models/imageType.enum.ts
 
b/services/self-service/src/main/resources/webapp/src/app/core/configs/docker-image-name.ts
similarity index 85%
copy from 
services/self-service/src/main/resources/webapp/src/app/core/models/imageType.enum.ts
copy to 
services/self-service/src/main/resources/webapp/src/app/core/configs/docker-image-name.ts
index 8fe0401de..4225b9890 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/core/models/imageType.enum.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/core/configs/docker-image-name.ts
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-export enum ImageType {
-  СOMPUTATIONAL = 0,
-  EXPLORATORY = 1
+export enum DockerImageName {
+    jupyterJpu = 'docker.datalab-jupyter-gpu',
+    dataEngineService = 'docker.datalab-dataengine-service'
 }
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/core/models/imageType.enum.ts
 
b/services/self-service/src/main/resources/webapp/src/app/core/configs/imageType.enum.ts
similarity index 100%
copy from 
services/self-service/src/main/resources/webapp/src/app/core/models/imageType.enum.ts
copy to 
services/self-service/src/main/resources/webapp/src/app/core/configs/imageType.enum.ts
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/core/models/imageType.enum.ts
 
b/services/self-service/src/main/resources/webapp/src/app/core/configs/providers.ts
similarity index 91%
rename from 
services/self-service/src/main/resources/webapp/src/app/core/models/imageType.enum.ts
rename to 
services/self-service/src/main/resources/webapp/src/app/core/configs/providers.ts
index 8fe0401de..b63a22981 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/core/models/imageType.enum.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/core/configs/providers.ts
@@ -17,7 +17,8 @@
  * under the License.
  */
 
-export enum ImageType {
-  СOMPUTATIONAL = 0,
-  EXPLORATORY = 1
+export enum Providers {
+  aws = 'aws',
+  azure = 'azure',
+  gcp = 'gsp'
 }
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/core/models/statusTypes.enum.ts
 
b/services/self-service/src/main/resources/webapp/src/app/core/configs/statusTypes.enum.ts
similarity index 100%
rename from 
services/self-service/src/main/resources/webapp/src/app/core/models/statusTypes.enum.ts
rename to 
services/self-service/src/main/resources/webapp/src/app/core/configs/statusTypes.enum.ts
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/core/models/templates-name.ts
 
b/services/self-service/src/main/resources/webapp/src/app/core/configs/template-name.ts
similarity index 94%
rename from 
services/self-service/src/main/resources/webapp/src/app/core/models/templates-name.ts
rename to 
services/self-service/src/main/resources/webapp/src/app/core/configs/template-name.ts
index c067be1cc..8413cc29f 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/core/models/templates-name.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/core/configs/template-name.ts
@@ -18,5 +18,5 @@
  */
 
 export enum TemplateName {
-    jupyterJpu = 'docker.datalab-jupyter-gpu'
-}
\ No newline at end of file
+  hdInsight = 'HDInsight cluster'
+}
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/core/models/computationalResourceImage.model.ts
 
b/services/self-service/src/main/resources/webapp/src/app/core/models/computationalResourceImage.model.ts
index b721b2601..13727f789 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/core/models/computationalResourceImage.model.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/core/models/computationalResourceImage.model.ts
@@ -19,7 +19,7 @@
 
 import { ComputationalResourceApplicationTemplate } from 
'./computationalResourceApplicationTemplate.model';
 import { ResourceShapeTypesModel } from './resourceShapeTypes.model';
-import { ImageType } from './imageType.enum';
+import { ImageType } from '../configs/imageType.enum';
 import { SortUtils } from '../util';
 
 export class ComputationalResourceImage {
@@ -44,9 +44,9 @@ export class ComputationalResourceImage {
       for (let index = 0; index < jsonModel.templates.length; index++) {
         this.application_templates.push(new 
ComputationalResourceApplicationTemplate(
           jsonModel.templates[index],
-          this.shapes, 
-          this.image, 
-          this.template_name, 
+          this.shapes,
+          this.image,
+          this.template_name,
           this.description)
         );
       }
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/core/models/exploratoryEnvironmentVersion.model.ts
 
b/services/self-service/src/main/resources/webapp/src/app/core/models/exploratoryEnvironmentVersion.model.ts
index f7159555f..a14479800 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/core/models/exploratoryEnvironmentVersion.model.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/core/models/exploratoryEnvironmentVersion.model.ts
@@ -18,7 +18,7 @@
  */
 
 import { ResourceShapeTypesModel } from './resourceShapeTypes.model';
-import { ImageType } from './imageType.enum';
+import { ImageType } from '../configs/imageType.enum';
 
 export class ExploratoryEnvironmentVersionModel {
   image: string;
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/core/models/index.ts 
b/services/self-service/src/main/resources/webapp/src/app/core/models/index.ts
index ed98699f6..d996c4c79 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/core/models/index.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/core/models/index.ts
@@ -23,8 +23,8 @@ export * from './exploratoryEnvironmentVersion.model';
 export * from './computationalResourceImage.model';
 export * from './computationalResourceApplicationTemplate.model';
 export * from './computationalResourceApplication.model';
-export * from './imageType.enum';
-export * from './templates-name';
-export * from './statusTypes.enum';
+export * from '../configs/imageType.enum';
+export * from '../configs/docker-image-name';
+export * from '../configs/statusTypes.enum';
 
 
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/core/pipes/is-element-available-pipe/is-element-available.pipe.ts
 
b/services/self-service/src/main/resources/webapp/src/app/core/pipes/is-element-available-pipe/is-element-available.pipe.ts
index 7e7ebb1ee..31ed33807 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/core/pipes/is-element-available-pipe/is-element-available.pipe.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/core/pipes/is-element-available-pipe/is-element-available.pipe.ts
@@ -22,7 +22,7 @@ import { Pipe, PipeTransform } from '@angular/core';
 @Pipe({ name: 'isElementAvailable' })
 
 export class IsElementAvailablePipe implements PipeTransform {
-  transform<T extends object>(elementField: T): boolean {
-    return (<any>Object).values(elementField).some(item => Boolean(item));
+  transform<T>(elementField: T, callback: (elementField: T, rest?: any[]) => 
boolean, ...rest: any[]): boolean {
+    return callback(elementField, rest);
   }
 }
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/core/services/userResource.service.ts
 
b/services/self-service/src/main/resources/webapp/src/app/core/services/userResource.service.ts
index 05061c533..6f5fe08ff 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/core/services/userResource.service.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/core/services/userResource.service.ts
@@ -23,7 +23,9 @@ import { catchError, map } from 'rxjs/operators';
 
 import { ErrorUtils } from '../util/';
 import { ApplicationServiceFacade } from './applicationServiceFacade.service';
-import {ProjectModel} from '../../resources/images/images.model';
+import {
+  ComputationalResourceModel
+} from 
'../../resources/computational/computational-resource-create-dialog/computational.resource.model';
 
 @Injectable()
 export class UserResourceService {
@@ -38,7 +40,7 @@ export class UserResourceService {
         catchError(ErrorUtils.handleServiceError));
   }
 
-  public getComputationalTemplates(project, endpoint, provider): 
Observable<any> {
+  public getComputationalTemplates(project, endpoint, provider): 
Observable<ComputationalResourceModel> {
     const url = `/${project}/${endpoint}/templates`;
     return this.applicationServiceFacade
       .buildGetComputationTemplatesRequest(url, provider)
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..c882d496a 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,11 @@
       <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"
+              *ngIf="(clusterTypes | isElementAvailable : isHasHDInside) || 
this.PROVIDER !== providerList.azure"
+              [hidden]="clusterTypes.length === 1"
+            >
               <label class="label">Select cluster type</label>
               <div class="control selector-wrapper">
                 <mat-form-field>
@@ -421,13 +425,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 15d9a9d1c..1bcfeb197 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
@@ -17,17 +17,21 @@
  * under the License.
  */
 
-import { Component, OnInit, Inject, ChangeDetectorRef } from '@angular/core';
-import {FormGroup, FormBuilder, Validators, FormControl, ValidatorFn} from 
'@angular/forms';
-import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
+import { ChangeDetectorRef, Component, Inject, OnInit } from '@angular/core';
+import { FormBuilder, FormControl, FormGroup, ValidatorFn, Validators } from 
'@angular/forms';
+import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
 import { ToastrService } from 'ngx-toastr';
 
 import { ComputationalResourceModel } from 
'./computational-resource-create.model';
 import { UserResourceService } from '../../../core/services';
-import { HTTP_STATUS_CODES, PATTERNS, CheckUtils, SortUtils, HelpUtils } from 
'../../../core/util';
+import { CheckUtils, HelpUtils, HTTP_STATUS_CODES, PATTERNS, SortUtils } from 
'../../../core/util';
 
 import { DICTIONARY } from '../../../../dictionary/global.dictionary';
 import { CLUSTER_CONFIGURATION } from './cluster-configuration-templates';
+import { DockerImageName } from '../../../core/models';
+import { TemplateName } from '../../../core/configs/template-name';
+import { ComputationalTemplate } from './computational.resource.model';
+import { Providers } from '../../../core/configs/providers';
 
 @Component({
   selector: 'computational-resource-create-dialog',
@@ -40,6 +44,7 @@ export class ComputationalResourceCreateDialogComponent 
implements OnInit {
   readonly DICTIONARY = DICTIONARY;
   readonly CLUSTER_CONFIGURATION = CLUSTER_CONFIGURATION;
   readonly CheckUtils = CheckUtils;
+  readonly providerList: typeof Providers = Providers;
 
   notebook_instance: any;
   resourcesList: any;
@@ -153,6 +158,10 @@ export class ComputationalResourceCreateDialogComponent 
implements OnInit {
       );
   }
 
+  public isHasHDInside(templateList: ComputationalTemplate[]): boolean {
+    return  templateList.some(({template_name}) => template_name === 
TemplateName.hdInsight);
+  }
+
   private initFormModel(): void {
     this.resourceForm = this._fb.group({
       template_name: ['', [Validators.required]],
@@ -189,13 +198,12 @@ export class ComputationalResourceCreateDialogComponent 
implements OnInit {
 
       this.minInstanceNumber = 
this.selectedImage.limits[activeImage.total_instance_number_min];
       this.maxInstanceNumber = 
this.selectedImage.limits[activeImage.total_instance_number_max];
-
-      if (this.PROVIDER === 'gcp' && this.selectedImage.image === 
'docker.datalab-dataengine-service') {
+      if (this.PROVIDER === 'gcp' && this.selectedImage.image === 
DockerImageName.dataEngineService) {
         this.maxInstanceNumber = 
this.selectedImage.limits[activeImage.total_instance_number_max] - 1;
         this.minPreemptibleInstanceNumber = 
this.selectedImage.limits.min_dataproc_preemptible_instance_count;
       }
 
-      if (this.PROVIDER === 'aws' && this.selectedImage.image === 
'docker.datalab-dataengine-service') {
+      if (this.PROVIDER === 'aws' && this.selectedImage.image === 
DockerImageName.dataEngineService) {
         this.minSpotPrice = 
this.selectedImage.limits.min_emr_spot_instance_bid_pct;
         this.maxSpotPrice = 
this.selectedImage.limits.max_emr_spot_instance_bid_pct;
 
@@ -273,12 +281,12 @@ export class ComputationalResourceCreateDialogComponent 
implements OnInit {
     }
   }
 
-  private getTemplates(project, endpoint, provider) {
+  private getTemplates(project, endpoint, provider): void {
     this.userResourceService.getComputationalTemplates(project, endpoint, 
provider).subscribe(
-      clusterTypes => {
-        this.clusterTypes = clusterTypes.templates;
-        this.userComputations = clusterTypes.user_computations;
-        this.projectComputations = clusterTypes.project_computations;
+      ({templates, user_computations, project_computations}) => {
+        this.clusterTypes = templates;
+        this.userComputations = user_computations;
+        this.projectComputations = project_computations;
 
         this.clusterTypes.forEach((cluster, index) => 
this.clusterTypes[index].computation_resources_shapes =
           SortUtils.shapesSort(cluster.computation_resources_shapes));
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/core/models/exploratoryEnvironmentVersion.model.ts
 
b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational.resource.model.ts
similarity index 50%
copy from 
services/self-service/src/main/resources/webapp/src/app/core/models/exploratoryEnvironmentVersion.model.ts
copy to 
services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational.resource.model.ts
index f7159555f..d67a29e17 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/core/models/exploratoryEnvironmentVersion.model.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational.resource.model.ts
@@ -17,29 +17,48 @@
  * under the License.
  */
 
-import { ResourceShapeTypesModel } from './resourceShapeTypes.model';
-import { ImageType } from './imageType.enum';
+export interface ComputationalResourceModel {
+  project_computations: string[];
+  templates: ComputationalTemplate[];
+  user_computations: string[];
+}
 
-export class ExploratoryEnvironmentVersionModel {
+export interface ComputationalTemplate {
   image: string;
-  template_name: string;
   description: string;
-  environment_type: ImageType;
+  templates: TemplatesVersion[];
+  computationGPU: string[];
+  image_type: string;
+  template_name: string;
+  environment_type: string;
+  request_id: string;
+  computation_resources_shapes: ComputationResourcesShapes;
+  limits: {[key: string]: number };
+}
+
+export interface ComputationResourcesShapes {
+  ['GPU optimized']: Shape[];
+  ['Compute optimized']: Shape[];
+  ['Memory optimized']: Shape[];
+  ['For testing']: Shape[];
+}
+
+export interface Shape {
+  Type: string;
+  Size: string;
+  Description: string;
+  Ram: string;
+  Cpu: number;
+  Spot: boolean;
+  SpotPctPrice: number;
+}
+
+export interface TemplatesVersion {
+  applications: Application[];
   version: string;
-  vendor: string;
-  shapes: ResourceShapeTypesModel;
+}
 
-  constructor(
-    parentImage: string,
-    jsonModel: any,
-    shapes: ResourceShapeTypesModel
-  ) {
-    this.image = parentImage;
-    this.template_name = jsonModel.template_name;
-    this.description = jsonModel.description;
-    this.environment_type = ImageType.EXPLORATORY;
-    this.version = jsonModel.version;
-    this.vendor = jsonModel.vendor;
-    this.shapes = shapes;
-  }
+export interface Application {
+  Version: string;
+  Name: string;
 }
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/index.ts
 
b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/index.ts
index 4586b9e26..5776dbaca 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/index.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/index.ts
@@ -25,7 +25,7 @@ import { MaterialModule } from 
'../../../shared/material.module';
 import { FormControlsModule } from '../../../shared/form-controls';
 import { ComputationalResourceCreateDialogComponent } from 
'./computational-resource-create-dialog.component';
 import { ComputationalResourceModel } from 
'./computational-resource-create.model';
-import { KeysPipeModule, UnderscorelessPipeModule } from '../../../core/pipes';
+import { IsElementAvailablePipeModule, KeysPipeModule, 
UnderscorelessPipeModule } from '../../../core/pipes';
 
 @NgModule({
   imports: [
@@ -35,7 +35,8 @@ import { KeysPipeModule, UnderscorelessPipeModule } from 
'../../../core/pipes';
     FormControlsModule,
     KeysPipeModule,
     UnderscorelessPipeModule,
-    MaterialModule
+    MaterialModule,
+    IsElementAvailablePipeModule
   ],
   declarations: [ComputationalResourceCreateDialogComponent],
   providers: [ComputationalResourceModel],
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 e946ed14f..f75853ee7 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
@@ -28,7 +28,7 @@ import { DICTIONARY } from 
'../../../../dictionary/global.dictionary';
 import { CLUSTER_CONFIGURATION } from 
'../../computational/computational-resource-create-dialog/cluster-configuration-templates';
 import { tap } from 'rxjs/operators';
 import { timer } from 'rxjs';
-import { TemplateName } from '../../../core/models';
+import { DockerImageName } from '../../../core/models';
 import { Project } from '../../../administration/project/project.model';
 
 @Component({
@@ -52,7 +52,7 @@ export class ExploratoryEnvironmentCreateComponent implements 
OnInit {
   selectedImage: any;
   maxNotebookLength: number = 14;
   maxCustomTagLength: number = 63;
-  templateName = TemplateName;
+  templateName = DockerImageName;
   public areShapes: boolean;
   public selectedCloud: string = '';
   public gpuCount: Array<number>;
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/resources/images/images.component.html
 
b/services/self-service/src/main/resources/webapp/src/app/resources/images/images.component.html
index a7874b93a..e8d1103a5 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/resources/images/images.component.html
+++ 
b/services/self-service/src/main/resources/webapp/src/app/resources/images/images.component.html
@@ -307,7 +307,7 @@
                   <i class="material-icons">help_outline</i>
                 </span>
                 <span
-                  *ngIf="element.imageUserPermissions | isElementAvailable"
+                  *ngIf="element.imageUserPermissions | isElementAvailable: 
isObjectFieldTrue"
                   #settings class="actions"
                   (click)="actions.toggle($event, settings)"
                 ></span>
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/resources/images/images.component.ts
 
b/services/self-service/src/main/resources/webapp/src/app/resources/images/images.component.ts
index 195e9f3d9..7d701db94 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/resources/images/images.component.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/resources/images/images.component.ts
@@ -34,7 +34,7 @@ import {
   ImageStatuses,
   Localstorage_Key,
   Placeholders,
-  Shared_Status,
+  SharedStatus,
   DropdownFieldNames,
   FilterFormInitialValue,
   ImageModelKeysForFilter,
@@ -60,7 +60,7 @@ export class ImagesComponent implements OnInit, OnDestroy {
   readonly tableHeaderCellTitles: typeof Image_Table_Column_Headers = 
Image_Table_Column_Headers;
   readonly displayedColumns: typeof Image_Table_Titles = Image_Table_Titles;
   readonly placeholder: typeof Placeholders = Placeholders;
-  readonly sharedStatus: typeof Shared_Status = Shared_Status;
+  readonly sharedStatus: typeof SharedStatus = SharedStatus;
   readonly imageStatus: typeof ImageStatuses = ImageStatuses;
   readonly columnFieldNames: typeof FilterFormControlNames = 
FilterFormControlNames;
   readonly dropdownFieldNames: typeof DropdownFieldNames = DropdownFieldNames;
@@ -127,6 +127,10 @@ export class ImagesComponent implements OnInit, OnDestroy {
     this.isActionsOpen = !this.isActionsOpen;
   }
 
+  isObjectFieldTrue(elementField: ImageModel): boolean {
+    return (<any>Object).values(elementField).some(item => Boolean(item));
+  }
+
   onSelectClick(projectName: string = ''): void {
     this.imagesService.getActiveProject(projectName);
     this.activeProjectName = projectName;
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/resources/images/images.config.ts
 
b/services/self-service/src/main/resources/webapp/src/app/resources/images/images.config.ts
index 4f419b7d8..b6bcdc197 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/resources/images/images.config.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/resources/images/images.config.ts
@@ -28,7 +28,7 @@ export enum Image_Table_Column_Headers {
   endpoint = 'Endpoint',
 }
 
-export enum Shared_Status {
+export enum SharedStatus {
   shared = 'SHARED',
   private = 'PRIVATE',
   received = 'RECEIVED'
@@ -85,14 +85,6 @@ export enum FilterFormControlNames {
   sharingStatuses = 'sharingStatuses'
 }
 
-export enum ImageModelNames {
-  name = 'name',
-  status = 'status',
-  endpoint = 'endpoint',
-  templateName = 'templateName',
-  sharingStatus = 'sharingStatus'
-}
-
 export const FilterFormInitialValue = {
     endpoints: [],
     imageName: '',
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.ts
 
b/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.ts
index 6b0a1b764..7ad2073dd 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.ts
@@ -96,8 +96,6 @@ export class ResourcesComponent implements OnInit {
   }
 
   public getActiveProject() {
-    console.log('activeProject: ', this.resourcesGrid.activeProject);
-
     return this.resourcesGrid.activeProject;
   }
 


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

Reply via email to