You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by hs...@apache.org on 2022/09/21 09:30:59 UTC
[incubator-datalab] branch feat/DATALAB-2933/view-additional-info-about-image-add-section-shared-with created (now 85b487097)
This is an automated email from the ASF dual-hosted git repository.
hshpak pushed a change to branch feat/DATALAB-2933/view-additional-info-about-image-add-section-shared-with
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
at 85b487097 [DATALAB-2933] added section shared with
This branch includes the following new commits:
new 85b487097 [DATALAB-2933] added section shared with
The 1 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/01: [DATALAB-2933] added section shared with
Posted by hs...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
hshpak pushed a commit to branch feat/DATALAB-2933/view-additional-info-about-image-add-section-shared-with
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
commit 85b487097675ba3528af2e6f946e6bbb12810623
Author: Hennadii_Shpak <bo...@gmail.com>
AuthorDate: Tue Sep 20 18:32:57 2022 +0300
[DATALAB-2933] added section shared with
---
.../share-dialog/share-dialog.component.html | 1 -
.../image-detail-dialog.component.html | 21 +++++++++++++++++
.../image-detail-dialog.component.scss | 27 ++++++++++++++++++++++
.../image-detail-dialog.component.ts | 4 +++-
.../image-detail-dialog.module.ts | 4 +++-
.../src/app/resources/images/images.component.ts | 4 ++--
.../src/app/resources/images/images.config.ts | 2 +-
.../src/app/resources/images/images.model.ts | 6 +++++
.../src/app/resources/images/images.service.ts | 4 ++--
9 files changed, 65 insertions(+), 8 deletions(-)
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/share-dialog/share-dialog.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/share-dialog/share-dialog.component.html
index ac237d1ba..d39160bc7 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/share-dialog/share-dialog.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/share-dialog/share-dialog.component.html
@@ -60,7 +60,6 @@
<input
type="text"
class="search-input"
- panelClass="scrolling"
[placeholder]="placeholder.groupOrNameSearchInput"
[formControl]="addUserDataControl"
(change)="onChange()"
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-detail-dialog/image-detail-dialog.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-detail-dialog/image-detail-dialog.component.html
index bbafc43bb..69b9ebeed 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-detail-dialog/image-detail-dialog.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-detail-dialog/image-detail-dialog.component.html
@@ -65,18 +65,39 @@
</ng-template>
</div>
</div>
+
<div class="image__provider--wrapper">
<span class="modal-row__item modal-row__item--title">Provider</span>
<span class="modal-row__item">{{ data.image.cloudProvider }}</span>
</div>
+
<div class="image__creation-date--wrapper">
<span class="modal-row__item modal-row__item--title">Creation date</span>
<span class="modal-row__item">{{data.image.timestamp | localDate : 'short'}} </span>
</div>
+
<div class="image__creator--wrapper">
<span class="modal-row__item modal-row__item--title">Creator</span>
<span class="modal-row__item">{{ data.image.user }}</span>
</div>
+
+ <div *ngIf="data.image.sharingStatus === sharingStatus.shared" class="image__creator--wrapper">
+ <span class="modal-row__item modal-row__item--title">Shared with</span>
+ <div class="user-data__list--wrapper scrolling">
+ <ul class="groups__list">
+ <li *ngFor="let group of data.image.sharedWith.groups" class="groups__item">
+ <span class="icon--wrapper"><mat-icon class="user-data__icon">people</mat-icon></span>
+ <span class="groups__item--wrapper">{{group}}</span>
+ </li>
+ </ul>
+ <ul class="users__list">
+ <li *ngFor="let user of data.image.sharedWith.users" class="users__item">
+ <span class="icon--wrapper"><mat-icon class="user-data__icon">person</mat-icon></span>
+ <span class="groups__item--wrapper">{{user}}</span>
+ </li>
+ </ul>
+ </div>
+ </div>
</div>
</div>
</div>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-detail-dialog/image-detail-dialog.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-detail-dialog/image-detail-dialog.component.scss
index 4964c9590..ebcc1d606 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-detail-dialog/image-detail-dialog.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-detail-dialog/image-detail-dialog.component.scss
@@ -62,3 +62,30 @@
.no-libraries {
color: rgba(113, 138, 165, 0.5);
}
+
+.users__item,
+.groups__item {
+ display: flex;
+ align-items: center;
+
+ &:not(last-child) {
+ margin-bottom: 10px;
+ }
+}
+
+.user-data {
+
+ &__icon {
+ border-radius: 50%;
+ }
+
+ &__list--wrapper {
+ width: 50%;
+ height: 110px;
+ overflow-y: scroll;
+ }
+}
+
+.icon--wrapper {
+ margin-right: 10px;
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-detail-dialog/image-detail-dialog.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-detail-dialog/image-detail-dialog.component.ts
index 3c1948e09..05116a3a4 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-detail-dialog/image-detail-dialog.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-detail-dialog/image-detail-dialog.component.ts
@@ -19,7 +19,7 @@
import { Component, Inject, OnInit } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';
-import { LibraryInfoItem, Library, ImageDetailModalData } from '../../images';
+import { LibraryInfoItem, Library, ImageDetailModalData, SharingStatus } from '../../images';
import { LibraryInfoModalComponent } from '../library-info-modal/library-info-modal.component';
import { caseInsensitiveSortUtil } from '../../../core/util';
@@ -33,6 +33,8 @@ import { caseInsensitiveSortUtil } from '../../../core/util';
})
export class ImageDetailDialogComponent implements OnInit {
+ readonly sharingStatus: typeof SharingStatus = SharingStatus;
+
maxDescriptionLength: number = 170;
libraryList = [];
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-detail-dialog/image-detail-dialog.module.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-detail-dialog/image-detail-dialog.module.ts
index 44a9cbc6c..d4e215acb 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-detail-dialog/image-detail-dialog.module.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-detail-dialog/image-detail-dialog.module.ts
@@ -24,6 +24,7 @@ import { TruncateTextPipeModule } from '../../../core/pipes/truncate-text-pipe';
import {LocalDatePipeModule} from '../../../core/pipes/local-date-pipe';
import {MatTooltipModule} from '@angular/material/tooltip';
import {LibraryNameNormalizePipeModule} from '../../../core/pipes/library-name-normalize';
+import { MaterialModule } from '../../../shared/material.module';
@@ -34,7 +35,8 @@ import {LibraryNameNormalizePipeModule} from '../../../core/pipes/library-name-n
TruncateTextPipeModule,
LocalDatePipeModule,
MatTooltipModule,
- LibraryNameNormalizePipeModule
+ LibraryNameNormalizePipeModule,
+ MaterialModule,
],
exports: [ ImageDetailDialogComponent ],
entryComponents: [ ImageDetailDialogComponent ]
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 66f2425f2..2954922bb 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
@@ -41,7 +41,7 @@ import {
ImageStatuses,
Localstorage_Key,
Placeholders,
- SharedStatus,
+ SharingStatus,
DropdownFieldNames,
FilterFormInitialValue,
ImageModelKeysForFilter,
@@ -69,7 +69,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 SharedStatus = SharedStatus;
+ readonly sharedStatus: typeof SharingStatus = SharingStatus;
readonly imageStatus: typeof ImageStatuses = ImageStatuses;
readonly columnFieldNames: typeof FilterFormControlNames = FilterFormControlNames;
readonly dropdownFieldNames: typeof DropdownFieldNames = DropdownFieldNames;
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 fb5e0860e..60a3ab54b 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 SharedStatus {
+export enum SharingStatus {
shared = 'SHARED',
private = 'PRIVATE',
received = 'RECEIVED'
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/images/images.model.ts b/services/self-service/src/main/resources/webapp/src/app/resources/images/images.model.ts
index 4f874ecc5..03771329d 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/images/images.model.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/images/images.model.ts
@@ -42,6 +42,7 @@ export interface ImageModel {
imageUserPermissions: ImageUserPermissions;
name: string;
project: string;
+ sharedWith: SharedWithField;
sharingStatus: 'SHARED'| 'PRIVATE' | 'RECEIVED';
status: 'ACTIVE' | 'CREATING' | 'FAILED';
user: string;
@@ -131,3 +132,8 @@ export interface UnShareModal {
userData: UserData;
title: ModalTitle;
}
+
+export interface SharedWithField {
+ users: string[];
+ groups: string[];
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/images/images.service.ts b/services/self-service/src/main/resources/webapp/src/app/resources/images/images.service.ts
index f37650960..0a2c08fe8 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/images/images.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/images/images.service.ts
@@ -15,7 +15,7 @@ import {
ImageActionModalData
} from './images.model';
import { ApplicationServiceFacade, UserImagesPageService } from '../../core/services';
-import { ChangedColumnStartValue, FilterFormInitialValue, ModalTitle, SharedStatus } from './images.config';
+import { ChangedColumnStartValue, FilterFormInitialValue, ModalTitle, SharingStatus } from './images.config';
import { ShareDialogComponent } from '../exploratory/image-action-dialog/share-dialog/share-dialog.component';
import { TerminateDialogComponent } from '../exploratory/image-action-dialog/terminate-dialog/terminate-dialog.component';
import { ComponentType } from 'ngx-toastr';
@@ -229,7 +229,7 @@ export class ImagesService {
}
private isImageShared(image: ImageModel): boolean {
- return image.sharingStatus !== SharedStatus.private;
+ return image.sharingStatus !== SharingStatus.private;
}
private checkColumnState(acc: FilteredColumnList, fieldItem: FilterFormItemType): FilteredColumnList {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org