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/08 13:16:53 UTC

[incubator-datalab] branch feat/DATALAB-3009/share-with-user-on-another-project-pop-up-layout updated: finished share dialog marckup

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

hshpak pushed a commit to branch feat/DATALAB-3009/share-with-user-on-another-project-pop-up-layout
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git


The following commit(s) were added to refs/heads/feat/DATALAB-3009/share-with-user-on-another-project-pop-up-layout by this push:
     new 59cc092fa finished share dialog marckup
59cc092fa is described below

commit 59cc092fad1438803f9f6102722d4195723383b7
Author: Hennadii_Shpak <bo...@gmail.com>
AuthorDate: Thu Sep 8 16:16:42 2022 +0300

    finished share dialog marckup
---
 .../share-dialog/share-dialog.component.ts         | 27 +++------------------
 .../share-user-data/share-user-data.component.html | 19 +++++++++++++++
 .../share-user-data/share-user-data.component.scss | 19 +++++++++++++++
 .../share-user-data/share-user-data.component.ts   | 28 ++++++++++++++++------
 .../terminate-dialog/terminate-dialog.component.ts |  8 ++-----
 5 files changed, 64 insertions(+), 37 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/share-dialog/share-dialog.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/share-dialog/share-dialog.component.ts
index df605e04d..50a194a8c 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/share-dialog/share-dialog.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/share-dialog/share-dialog.component.ts
@@ -17,32 +17,11 @@
  * under the License.
  */
 
-import { AfterViewInit, ChangeDetectionStrategy, Component, Inject, OnInit, ViewChild } from '@angular/core';
-import { MAT_DIALOG_DATA } from '@angular/material/dialog';
-import { ImageActionModalData } from '../../../images';
+import { ChangeDetectionStrategy, Component, ViewChild } from '@angular/core';
 import { SharePlaceholder, TabName, UserDataTypeConfig } from '../image-action.config';
 import { DialogWindowTabConfig, UserData, UserDataType } from '../image-action.model';
 import { NgModel } from '@angular/forms';
 
-const mockedUserList: UserData[] = [
-  {
-    value: 'Biba',
-    type: 'GROUP'
-  },
-  {
-    value: 'Boba',
-    type: 'USER'
-  },
-  {
-    value: 'hennadii_shpak@epam.com',
-    type: 'USER'
-  },
-  {
-    value: 'hennadii_shpak@epam.com',
-    type: 'GROUP'
-  },
-];
-
 @Component({
   selector: 'datalab-share-dialog',
   templateUrl: './share-dialog.component.html',
@@ -56,7 +35,7 @@ export class ShareDialogComponent {
   readonly tabsName: typeof TabName = TabName;
   readonly userDataTypeConfig: typeof UserDataTypeConfig = UserDataTypeConfig;
 
-  userList: UserData[] = mockedUserList;
+  userList: UserData[] = [];
   temporaryUserList: UserData[] = [];
   userNameOrGroup: UserDataType;
   activeTabConfig: DialogWindowTabConfig = {
@@ -70,7 +49,7 @@ export class ShareDialogComponent {
       return;
     }
     const newUserEntity: UserData = {
-      value: this.searchInput,
+      value: this.searchInput.trim(),
       type: this.userNameOrGroup
     };
     this.temporaryUserList = [...this.temporaryUserList, newUserEntity];
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/share-user-data/share-user-data.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/share-user-data/share-user-data.component.html
index 81c60d5b1..aa647e824 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/share-user-data/share-user-data.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/share-user-data/share-user-data.component.html
@@ -1,3 +1,22 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
 <div class="user-data__wrapper">
   <span><mat-icon class="user-data__icon">{{userData.type === 'GROUP' ? 'people' : 'person'}}</mat-icon></span>
   <span class="user-data__name">{{userData.value}}
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/share-user-data/share-user-data.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/share-user-data/share-user-data.component.scss
index 5bee7b44a..3f939f09e 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/share-user-data/share-user-data.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/share-user-data/share-user-data.component.scss
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 .user-data {
   &__name {
     position: relative;
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/share-user-data/share-user-data.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/share-user-data/share-user-data.component.ts
index 6550f2e58..9468d21ed 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/share-user-data/share-user-data.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/share-user-data/share-user-data.component.ts
@@ -1,4 +1,23 @@
-import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { Component, EventEmitter, Input, Output } from '@angular/core';
 import { UserData } from '../image-action.model';
 
 @Component({
@@ -6,16 +25,11 @@ import { UserData } from '../image-action.model';
   templateUrl: './share-user-data.component.html',
   styleUrls: ['./share-user-data.component.scss'],
 })
-export class ShareUserDataComponent implements OnInit {
+export class ShareUserDataComponent {
   @Input() userData: UserData;
 
   @Output() removeUserData: EventEmitter<string> = new EventEmitter<string>();
 
-  constructor() { }
-
-  ngOnInit(): void {
-  }
-
   removeUser(userData: string): void {
     this.removeUserData.emit(userData);
   }
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/terminate-dialog/terminate-dialog.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/terminate-dialog/terminate-dialog.component.ts
index 0cba6292f..d15a3d49e 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/terminate-dialog/terminate-dialog.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/image-action-dialog/terminate-dialog/terminate-dialog.component.ts
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-import { Component, Inject, OnInit } from '@angular/core';
+import { Component, Inject } from '@angular/core';
 import { MAT_DIALOG_DATA } from '@angular/material/dialog';
 import { ImageActionModalData } from '../../../images';
 
@@ -26,13 +26,9 @@ import { ImageActionModalData } from '../../../images';
   templateUrl: './terminate-dialog.component.html',
   styleUrls: ['./terminate-dialog.component.scss']
 })
-export class TerminateDialogComponent implements OnInit {
+export class TerminateDialogComponent {
 
   constructor(
     @Inject(MAT_DIALOG_DATA) public data: ImageActionModalData,
   ) { }
-
-  ngOnInit(): void {
-  }
-
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org