You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by dg...@apache.org on 2021/02/03 14:48:05 UTC
[incubator-datalab] branch DATALAB-2271 created (now d439799)
This is an automated email from the ASF dual-hosted git repository.
dgnatyshyn pushed a change to branch DATALAB-2271
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git.
at d439799 small fix
This branch includes the following new commits:
new c92ea94 [DATALAB-2271]: Removed pip2 package from groups list
new d439799 small fix
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org
[incubator-datalab] 01/02: [DATALAB-2271]: Removed pip2 package
from groups list
Posted by dg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dgnatyshyn pushed a commit to branch DATALAB-2271
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
commit c92ea944a86c4c7354aa61b9f0e68509192b6baf
Author: Dmytro_Gnatyshyn <di...@ukr.net>
AuthorDate: Wed Feb 3 16:30:29 2021 +0200
[DATALAB-2271]: Removed pip2 package from groups list
---
.../src/main/resources/webapp/src/app/core/util/sortUtils.ts | 4 ++--
.../exploratory/install-libraries/install-libraries.component.html | 5 ++++-
.../exploratory/install-libraries/install-libraries.component.scss | 2 +-
.../exploratory/install-libraries/install-libraries.component.ts | 6 +++---
4 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/util/sortUtils.ts b/services/self-service/src/main/resources/webapp/src/app/core/util/sortUtils.ts
index 18567bd..24dbf49 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/util/sortUtils.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/util/sortUtils.ts
@@ -44,13 +44,13 @@ export class SortUtils {
}
public static libGroupsSort(groups) {
- const sortOrder = ['os_pkg', 'pip2', 'pip3', 'r_pkg', 'java', 'others'];
+ const sortOrder = ['os_pkg', 'pip3', 'r_pkg', 'java', 'others'];
return groups.sort((arg1, arg2) => sortOrder.indexOf(arg1) - sortOrder.indexOf(arg2));
}
public static libFilterGroupsSort(groups) {
- const sortOrder = ['Apt/Yum', 'Python 2', 'Python 3', 'R packages', 'Java', 'Others'];
+ const sortOrder = ['Apt/Yum', 'Python 3', 'R packages', 'Java', 'Others'];
return groups.sort((arg1, arg2) => sortOrder.indexOf(arg1) - sortOrder.indexOf(arg2));
}
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
index 9de8286..689af5a 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
@@ -57,7 +57,10 @@
<div class="control-group constol-select">
<label class="label">Library name</label>
<div class="control control-relative">
- <span class="other-message" *ngIf="group === 'others'">Other group can include libs from Python 2 and Python 3 groups</span>
+ <span class="other-message" *ngIf="group === 'others'">
+ Other group can include libs from Python 2 and Python 3 groups.
+ Some libs cannot be installed due to Python 2 is no longer supported
+ </span>
<input
type="text" [placeholder]="'Enter library name'"
[disabled]="!group"
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss
index 0033c6d..d368e4f 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss
@@ -218,7 +218,7 @@ ul.resources{
padding-bottom: 0;
flex-direction: column;
box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12);
- margin-top: 30px;
+ margin-top: 35px;
.mat-form-field-flex {
padding-left: 15px;
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 45bc6d5..f79487b 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
@@ -65,7 +65,6 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
public libSearch: FormControl = new FormControl();
public groupsListMap = {
'r_pkg': 'R packages',
- 'pip2': 'Python 2',
'pip3': 'Python 3',
'os_pkg': 'Apt/Yum',
'others': 'Others',
@@ -165,14 +164,15 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
public filterGroups(groupsList) {
const CURRENT_TEMPLATE = this.notebook.template_name.toLowerCase();
+ const filteredGroupsList = groupsList.filter(group => group !== 'pip2');
if (CURRENT_TEMPLATE.indexOf('jupyter with tensorflow') !== -1 || CURRENT_TEMPLATE.indexOf('deep learning') !== -1) {
- const filtered = groupsList.filter(group => group !== 'r_pkg');
+ const filtered = filteredGroupsList.filter(group => group !== 'r_pkg');
return SortUtils.libGroupsSort(filtered);
}
const PREVENT_TEMPLATES = ['rstudio', 'rstudio with tensorflow'];
const templateCheck = PREVENT_TEMPLATES.some(template => CURRENT_TEMPLATE.indexOf(template) !== -1);
- const filteredGroups = templateCheck ? groupsList.filter(group => group !== 'java') : groupsList;
+ const filteredGroups = templateCheck ? groupsList.filter(group => group !== 'java') : filteredGroupsList;
return SortUtils.libGroupsSort(filteredGroups);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org
[incubator-datalab] 02/02: small fix
Posted by dg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dgnatyshyn pushed a commit to branch DATALAB-2271
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
commit d439799f8c20e4f30868ee6bb46eeece3bfd13fa
Author: Dmytro_Gnatyshyn <di...@ukr.net>
AuthorDate: Wed Feb 3 16:47:44 2021 +0200
small fix
---
.../exploratory/install-libraries/install-libraries.component.ts | 9 +++++++--
1 file changed, 7 insertions(+), 2 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 f79487b..4867389 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
@@ -131,13 +131,17 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
)
.subscribe(
response => {
- this.libsUploadingStatus(response);
+ const groups = [].concat(response);
+
+ // Remove when will be removed pip2 from Backend
+ const groupWithoutPip2 = groups.filter(group => group !== 'pip2');
+
+ this.libsUploadingStatus(groupWithoutPip2);
this.changeDetector.detectChanges();
this.resource_select && this.resource_select.setDefaultOptions(
this.getResourcesList(),
this.destination.title, 'destination', 'title', 'array');
-
this.group_select && this.group_select.setDefaultOptions(
this.groupsList, 'Select group', 'group_lib', null, 'list', this.groupsListMap);
},
@@ -366,6 +370,7 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
private libsUploadingStatus(groupsList): void {
if (groupsList.length) {
+
this.groupsList = this.filterGroups(groupsList);
this.libs_uploaded = true;
this.uploading = false;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org