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

hshpak pushed a commit to branch 
fix/DATALAB-3081/hide-possibility-to-install-library
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git

commit 169af1a45da15ac68855f0fe30ed9177eee58f81
Author: Hennadii_Shpak <[email protected]>
AuthorDate: Thu Oct 6 13:57:18 2022 +0300

    filtered HDinsight compute for dropdown in manage library popup
---
 .../install-libraries.component.ts                 | 28 ++++++++++++----------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git 
a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
 
b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
index 8a867e96d..73d601ca4 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
@@ -30,6 +30,7 @@ import { SortUtils, HTTP_STATUS_CODES, PATTERNS } from 
'../../../core/util';
 import { FilterLibsModel } from './filter-libs.model';
 import { Subject, timer } from 'rxjs';
 import { CompareUtils } from '../../../core/util/compareUtils';
+import { DockerImageName } from '../../../core/configs/docker-image-name';
 
 interface Library {
   name: string;
@@ -159,6 +160,7 @@ export class InstallLibrariesComponent implements OnInit, 
OnDestroy {
     this.notebook.type = 'EXPLORATORY';
     this.notebook.title = `${this.notebook.name} <em 
class="capt">notebook</em>`;
     return [this.notebook].concat(this.notebook.resources
+      .filter((item) => !Boolean(item.hdinsight_version))
       .filter(item => item.status === 'running')
       .map(item => {
         item['name'] = item.computational_name;
@@ -170,14 +172,14 @@ export class InstallLibrariesComponent implements OnInit, 
OnDestroy {
 
   public filterList(): void {
     this.validity_format = '';
-    (this.lib.name && this.lib.name.length >= 2 && this.group ) 
-      ? this.getFilteredList() 
+    (this.lib.name && this.lib.name.length >= 2 && this.group )
+      ? this.getFilteredList()
       : this.filteredList = null;
   }
 
   public filterGroups(groupsList): Array<string> {
     const CURRENT_TEMPLATE = this.notebook.template_name.toLowerCase();
-    if (CURRENT_TEMPLATE.indexOf('jupyter with tensorflow') !== -1  
+    if (CURRENT_TEMPLATE.indexOf('jupyter with tensorflow') !== -1
       || CURRENT_TEMPLATE.indexOf('deep learning') !== -1) {
       const filtered = groupsList.filter(group => group !== 'r_pkg');
       return SortUtils.libGroupsSort(filtered);
@@ -499,22 +501,22 @@ export class InstallLibrariesComponent implements OnInit, 
OnDestroy {
       Object.setPrototypeOf(this.cashedFilterForm, 
Object.getPrototypeOf(this.filterModel));
     }
     this.filtredNotebookLibs = this.notebookLibs.filter((lib) => {
-      const isName = this.cashedFilterForm.name 
+      const isName = this.cashedFilterForm.name
         ? 
lib.name.toLowerCase().indexOf(this.cashedFilterForm.name.toLowerCase().trim()) 
!== -1
-          || 
lib.version.indexOf(this.cashedFilterForm.name.toLowerCase().trim()) !== -1 
+          || 
lib.version.indexOf(this.cashedFilterForm.name.toLowerCase().trim()) !== -1
         : true;
-      const isGroup = this.cashedFilterForm.group.length 
-        ? this.cashedFilterForm.group.includes(this.groupsListMap[lib.group]) 
+      const isGroup = this.cashedFilterForm.group.length
+        ? this.cashedFilterForm.group.includes(this.groupsListMap[lib.group])
         : true;
       lib.filteredStatus = lib.status.filter(status => {
-        const isResource = this.cashedFilterForm.resource.length 
-          ? this.cashedFilterForm.resource.includes(status.resource) 
+        const isResource = this.cashedFilterForm.resource.length
+          ? this.cashedFilterForm.resource.includes(status.resource)
           : true;
-        const isResourceType = this.cashedFilterForm.resource_type.length 
-          ? this.cashedFilterForm.resource_type.includes(status.resourceType) 
+        const isResourceType = this.cashedFilterForm.resource_type.length
+          ? this.cashedFilterForm.resource_type.includes(status.resourceType)
           : true;
-        const isStatus = this.cashedFilterForm.status.length 
-          ? this.cashedFilterForm.status.includes(status.status) 
+        const isStatus = this.cashedFilterForm.status.length
+          ? this.cashedFilterForm.status.includes(status.status)
           : true;
         return isResource && isResourceType && isStatus;
       });


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

Reply via email to