This is an automated email from the ASF dual-hosted git repository.
dgnatyshyn pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/develop by this push:
new 7480fc8 [DLAB-1984]: Allowed to create EMR/Dataproc with GPU for
Jupyter, fix… (#848)
7480fc8 is described below
commit 7480fc8562290c9a49410a81f3772956e5654964
Author: Dmytro Gnatyshyn <[email protected]>
AuthorDate: Thu Aug 6 18:13:21 2020 +0300
[DLAB-1984]: Allowed to create EMR/Dataproc with GPU for Jupyter, fix…
(#848)
[DLAB-1984]: Allowed to create EMR/Dataproc with GPU for Jupyter, fixed
libs groups, ungit for zeppelin
---
.../bucket-browser/bucket-browser.component.ts | 2 --
...mputational-resource-create-dialog.component.ts | 36 ++++++++++---------
.../create-environment.component.scss | 2 +-
.../detail-dialog/detail-dialog.component.html | 40 +++++++++++++---------
.../install-libraries.component.ts | 35 +++++--------------
.../src/app/resources/resources.component.ts | 1 -
6 files changed, 52 insertions(+), 64 deletions(-)
diff --git
a/services/self-service/src/main/resources/webapp/src/app/resources/bucket-browser/bucket-browser.component.ts
b/services/self-service/src/main/resources/webapp/src/app/resources/bucket-browser/bucket-browser.component.ts
index 2be3dad..d179780 100644
---
a/services/self-service/src/main/resources/webapp/src/app/resources/bucket-browser/bucket-browser.component.ts
+++
b/services/self-service/src/main/resources/webapp/src/app/resources/bucket-browser/bucket-browser.component.ts
@@ -370,8 +370,6 @@ export class BucketBrowserComponent implements OnInit,
OnDestroy {
private getCloud() {
return this.buckets.filter(v => v.children.some(bucket => {
- console.log(bucket.name);
- console.log(this.bucketName);
return bucket.name === this.bucketName;
}))[0].cloud.toLowerCase();
}
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 9f319cc..55bb6e8 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
@@ -267,32 +267,36 @@ export class ComputationalResourceCreateDialogComponent
implements OnInit {
private filterShapes(): void {
const allowed: any = ['GPU optimized'];
+ let filtered;
+
+ const reduceShapes = (obj, key) => {
+ obj[key] = this.selectedImage.computation_resources_shapes[key];
+ return obj;
+ };
+
+ const filteredShapeKeys = Object.keys(
+ SortUtils.shapesSort(this.selectedImage.computation_resources_shapes));
+
+ const filterShapes = (filter) => filteredShapeKeys
+ .filter(filter)
+ .reduce(reduceShapes, {});
+
if
(this.notebook_instance.template_name.toLowerCase().indexOf('tensorflow') !== -1
|| this.notebook_instance.template_name.toLowerCase().indexOf('deep
learning') !== -1
) {
- const filtered = Object.keys(
- SortUtils.shapesSort(this.selectedImage.computation_resources_shapes))
- .filter(key => allowed.includes(key))
- .reduce((obj, key) => {
- obj[key] = this.selectedImage.computation_resources_shapes[key];
- return obj;
- }, {});
+ filtered = filterShapes(key => allowed.includes(key));
if (this.PROVIDER !== 'azure') {
const images = this.clusterTypes.filter(image => image.image ===
'docker.dlab-dataengine');
this.clusterTypes = images;
this.selectedImage = this.clusterTypes[0];
}
- this.selectedImage.computation_resources_shapes = filtered;
+ } else if
(this.notebook_instance.template_name.toLowerCase().indexOf('jupyter notebook')
!== -1 &&
+ this.selectedImage.image === 'docker.dlab-dataengine-service') {
+ filtered = filterShapes(v => v);
} else {
- const filtered = Object.keys(
- SortUtils.shapesSort(this.selectedImage.computation_resources_shapes))
- .filter(key => !(allowed.includes(key)))
- .reduce((obj, key) => {
- obj[key] = this.selectedImage.computation_resources_shapes[key];
- return obj;
- }, {});
- this.selectedImage.computation_resources_shapes = filtered;
+ filtered = filterShapes(key => !(allowed.includes(key)));
}
+ this.selectedImage.computation_resources_shapes = filtered;
}
private filterAvailableSpots() {
diff --git
a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.scss
b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.scss
index 6711ad4..f02436e 100644
---
a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.scss
+++
b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.scss
@@ -55,7 +55,7 @@
.error {
position: absolute;
right: 0;
- top: 35px;
+ top: 38px;
}
&.name-control {
diff --git
a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.html
b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.html
index 409e3ae..541c8a1 100644
---
a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.html
+++
b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.html
@@ -59,24 +59,30 @@
{{upTimeSince || "not specified."}}</p>
<p *ngIf="notebook.url?.length">Open following URL(s) in your
browser to access this box:</p>
<div class="links_block">
- <p *ngFor="let item of notebook.url"
(mouseleave)="hideCopyIcon()">
- <span class="description">{{item.description}}: </span>
- <a (mouseover)="showCopyIcon(item.description)"
- (click)="logAction(notebook.name, item.description)"
- class="ellipsis none-select" matTooltip="{{item.url}}"
- matTooltipPosition="above"
- href="{{item.url}}"
- target="_blank"
- (contextmenu)="false"
- >
- {{item.url}}
- </a>
- <span (click)="logAction(notebook.name, item.description,
'Copy');$event.stopPropagation()" *ngIf="isCopyIconVissible[item.description]"
[matTooltip]="isCopied ? 'Copy ' + item.description + ' url': 'Copied'"
matTooltipPosition="above" class="copy-icon-wrapper">
- <span class="link-icon" (click)="copyBucketName(item.url)" >
- <span _ngcontent-xpv-c19="" class="material-icons"
(click)="this.isCopied = false">content_copy</span>
- </span>
+ <ng-container *ngFor="let item of notebook.url">
+ <span class="d-none" *ngIf="item.description === 'Ungit' &&
notebook.template_name.toLowerCase().indexOf('deep learning') !== -1; else
ungit">
</span>
- </p>
+ <ng-template #ungit>
+ <p (mouseleave)="hideCopyIcon()">
+ <span class="description">{{item.description}}:
</span>
+ <a (mouseover)="showCopyIcon(item.description)"
+ (click)="logAction(notebook.name, item.description)"
+ class="ellipsis none-select" matTooltip="{{item.url}}"
+ matTooltipPosition="above"
+ href="{{item.url}}"
+ target="_blank"
+ (contextmenu)="false"
+ >
+ {{item.url}}
+ </a>
+ <span (click)="logAction(notebook.name, item.description,
'Copy');$event.stopPropagation()" *ngIf="isCopyIconVissible[item.description]"
[matTooltip]="isCopied ? 'Copy ' + item.description + ' url': 'Copied'"
matTooltipPosition="above" class="copy-icon-wrapper">
+ <span class="link-icon"
(click)="copyBucketName(item.url)" >
+ <span _ngcontent-xpv-c19="" class="material-icons"
(click)="this.isCopied = false">content_copy</span>
+ </span>
+ </span>
+ </p>
+ </ng-template>
+ </ng-container>
</div>
<p class="flex" *ngIf="notebook.username">Node User: <span
class="strong">{{ notebook.username }}</span></p>
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 94c7009..909fa4d 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
@@ -172,13 +172,12 @@ export class InstallLibrariesComponent implements OnInit,
OnDestroy {
}
this.lib = {name: '', version: ''};
} else if ($event.model.type === 'destination') {
- this.resetDialog();
this.destination = $event.model.value;
this.destination && this.destination.type === 'СOMPUTATIONAL'
? this.model.computational_name = this.destination.name
: this.model.computational_name = null;
- this.uploadLibGroups();
- this.getInstalledLibsByResource();
+ this.resetDialog();
+ // this.getInstalledLibsByResource();
this.libSearch.disable();
}
this.filterList();
@@ -345,7 +344,8 @@ export class InstallLibrariesComponent implements OnInit,
OnDestroy {
libs => {
this.filteredList = [libs];
this.filteredList.forEach(lib => {
- lib.isInSelectedList = this.model.selectedLibs.some(el =>
lib.name.toLowerCase() === el.name.substring(0,
el.name.lastIndexOf(':')).toLowerCase());
+ lib.isInSelectedList = this.model.selectedLibs
+ .some(el => lib.name.toLowerCase() === el.name.substring(0,
el.name.lastIndexOf(':')).toLowerCase());
lib.isInstalled = this.notebookLibs.some(libr => {
return lib.name.toLowerCase() === libr.name.substring(0,
libr.name.lastIndexOf(':')).toLowerCase() &&
this.group === libr.group &&
@@ -360,7 +360,7 @@ export class InstallLibrariesComponent implements OnInit,
OnDestroy {
|| error.status === HTTP_STATUS_CODES.BAD_REQUEST
|| error.status === HTTP_STATUS_CODES.INTERNAL_SERVER_ERROR) {
this.validity_format = error.message;
- if (error.message.indexOf('query param artifact') !== -1) {
+ if (error.message.indexOf('query param artifact') !== -1 ||
error.message.indexOf('Illegal character') !== -1) {
this.validity_format = 'Wrong library name format. Should be
<groupId>:<artifactId>:<versionId>.';
}
if (error.message.indexOf('not found') !== -1) {
@@ -394,8 +394,8 @@ export class InstallLibrariesComponent implements OnInit,
OnDestroy {
}
- private selectorsReset(): void {
- this.destination = this.getResourcesList()[0];
+ private selectorsReset(leaveDestanation?): void {
+ if (!leaveDestanation) this.destination = this.getResourcesList()[0];
this.uploadLibGroups();
this.getInstalledLibsByResource();
this.libSearch.disable();
@@ -414,7 +414,7 @@ export class InstallLibrariesComponent implements OnInit,
OnDestroy {
clearTimeout(this.clear);
clearTimeout(this.loadLibsTimer);
- this.selectorsReset();
+ this.selectorsReset(true);
}
public toggleFilterRow(): void {
@@ -489,25 +489,6 @@ export class ErrorLibMessageDialogComponent {
<h4 class="modal-title" *ngIf="data.type === 'available'">Version is not
available</h4>
<button type="button" class="close"
(click)="dialogRef.close()">×</button>
</div>
-<!-- <mat-list class="resources">-->
-
-<!-- <mat-list-item class="list-header">-->
-<!-- <div class="object">Name</div>-->
-<!-- <div class="size">Version</div>-->
-<!-- </mat-list-item>-->
-
-<!-- <div class="scrolling-content delete-list" id="scrolling">-->
-
-<!-- <mat-list-item *ngFor="let lib of data.add_pkgs"
class="delete-item">-->
-<!-- <div class="object">-->
-<!-- {{lib}}-->
-<!-- </div>-->
-<!-- <div class="size">v2.3.4</div>-->
-<!-- </mat-list-item>-->
-
-<!-- </div>-->
-<!-- </mat-list>-->
-
<div class="lib-list" *ngIf="data.type === 'added'">
<span class="strong dependency-title">Dependency: </span><span
class="packeges" *ngFor="let pack of data.lib.add_pkgs; index as i">{{pack + (i
!== data.lib.add_pkgs.length - 1 ? ', ' : '')}}</span>
</div>
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 3dadd70..13421ee 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
@@ -86,7 +86,6 @@ export class ResourcesComponent implements OnInit,
AfterViewInit {
}
public bucketBrowser(permition): void {
- console.log(this.exploratoryEnvironments);
const defaultBucket = this.resourcesGrid.bucketsList[0].children[0];
permition && this.dialog.open(BucketBrowserComponent, { data:
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]