You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by yt...@apache.org on 2021/07/22 07:34:09 UTC
[incubator-datalab] 01/01: [DATALAB-310] disabled image creation
when installing the library
This is an automated email from the ASF dual-hosted git repository.
ytykhun pushed a commit to branch DATALAB-310
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
commit 2d9c8368acf82258f1c52faae1558991f4be5614
Author: Yurii Tykhun <ty...@gmail.com>
AuthorDate: Thu Jul 22 10:33:16 2021 +0300
[DATALAB-310] disabled image creation when installing the library
---
.../app/resources/resources-grid/resources-grid.component.html | 10 ++++++++--
.../app/resources/resources-grid/resources-grid.component.ts | 8 ++++++++
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.html
index 36b20e7..bb20c4e 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.html
@@ -243,9 +243,15 @@
</div>
</li>
</div>
- <li (click)="exploratoryAction(element, 'ami')"
+ <li
+ matTooltip="You can create an image after the library installation is complete"
+ matTooltipPosition="above" [matTooltipDisabled]="!checkLibStatus(element)"
+ [matTooltipClass]="'full-size-tooltip'"
+ [ngClass]="{'not-allow': checkLibStatus(element) }"
*ngIf="element.status === 'running' && element.image !== 'docker.datalab-superset' && element.image !== 'docker.datalab-jupyterlab'">
- <div>
+ <div
+ (click)="exploratoryAction(element, 'ami')"
+ [ngClass]="{'not-allowed': checkLibStatus(element) }">
<i class="material-icons">view_module</i>
<span>Create AMI</span>
</div>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts
index e0c8552..f9347a8 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts
@@ -488,4 +488,12 @@ export class ResourcesGridComponent implements OnInit {
this.filterForm.name = targetElement;
this.checkFilters();
}
+
+ public checkLibStatus(element) {
+ let installingLib = [];
+ if(element.libs) {
+ installingLib = element.libs.filter(lib => lib.status === 'installing');
+ }
+ return !!installingLib.length;
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org