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/07/06 17:24:01 UTC

[incubator-datalab] 01/01: [DATALAB-2874] added notification pop up

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

hshpak pushed a commit to branch feat/DATALAB-2874/add-notification-pop-up-window-appears
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git

commit 7077e67aa03e6842401dd45fe9798f270a7982c8
Author: Hennadii_Shpak <bo...@gmail.com>
AuthorDate: Wed Jul 6 20:22:44 2022 +0300

    [DATALAB-2874] added notification pop up
---
 .../configuration/configuration.component.ts             |  6 +++---
 .../management/endpoints/endpoints.component.ts          | 16 ++++++++--------
 .../webapp/src/app/resources/images/images.component.ts  |  6 ++++--
 .../webapp/src/app/resources/images/images.config.ts     |  4 ++++
 4 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/configuration/configuration.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/configuration/configuration.component.ts
index d3930f08f..58ff7f0da 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/configuration/configuration.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/configuration/configuration.component.ts
@@ -305,15 +305,15 @@ export class ConfigurationComponent implements OnInit, OnDestroy {
 
           if (this.services['self-service'].selected) {
             this.messagesStatus.counter += 1;
-            this.restartSingleService(true, false, false, 'Self-service')
+            this.restartSingleService(true, false, false, 'Self-service');
           }
           if (this.services['provisioning'].selected) {
             this.messagesStatus.counter += 1;
-            this.restartSingleService(false, true, false, 'Provisioning service')
+            this.restartSingleService(false, true, false, 'Provisioning service');
           }
           if (this.services['billing'].selected) {
             this.messagesStatus.counter += 1;
-            this.restartSingleService(false, false, true, 'Billing service')
+            this.restartSingleService(false, false, true, 'Billing service');
           }
 
           let timer = setInterval(() => {
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/management/endpoints/endpoints.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/management/endpoints/endpoints.component.ts
index 0dfffebae..1ba5e1411 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/management/endpoints/endpoints.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/management/endpoints/endpoints.component.ts
@@ -110,22 +110,22 @@ export class EndpointsComponent implements OnInit {
   private initFormModel(): void {
     this.createEndpointForm = this._fb.group({
       name: ['', Validators.compose([
-        Validators.required, 
-        Validators.pattern(PATTERNS.namePattern), 
-        this.validateName.bind(this), 
+        Validators.required,
+        Validators.pattern(PATTERNS.namePattern),
+        this.validateName.bind(this),
         this.providerMaxLength.bind(this)
       ])],
       url: ['', Validators.compose([
-        Validators.required, 
-        Validators.pattern(PATTERNS.fullUrl), 
+        Validators.required,
+        Validators.pattern(PATTERNS.fullUrl),
         this.validateUrl.bind(this)
       ])],
       account: ['', Validators.compose([
-        Validators.required, 
+        Validators.required,
         Validators.pattern(PATTERNS.namePattern)
       ])],
       endpoint_tag: ['', Validators.compose([
-        Validators.required, 
+        Validators.required,
         Validators.pattern(PATTERNS.namePattern)
       ])]
     });
@@ -137,7 +137,7 @@ export class EndpointsComponent implements OnInit {
         () => {
           this.toastr.success('Endpoint successfully disconnected. All related resources are terminating!', 'Success!');
           this.getEndpointList();
-        }, 
+        },
         error => this.toastr.error(error.message || 'Endpoint creation failed!', 'Oops!')
       );
   }
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 02a0551eb..7c1896bd5 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
@@ -24,7 +24,7 @@ import { ToastrService } from 'ngx-toastr';
 import { GeneralEnvironmentStatus } from '../../administration/management/management.model';
 import { HealthStatusService, UserImagesPageService } from '../../core/services';
 import { ImageModel, ProjectModel, ShareImageAllUsersParams } from './images.model';
-import { Image_Table_Column_Headers, Image_Table_Titles, Localstorage_Key, Shared_Status } from './images.config';
+import { Image_Table_Column_Headers, Image_Table_Titles, Localstorage_Key, Shared_Status, Toaster_Message } from './images.config';
 import { MatDialog } from '@angular/material/dialog';
 import { ShareImageComponent } from '../../shared/modal-dialog/share-image/share-image.component';
 import { switchMap, tap } from 'rxjs/operators';
@@ -112,7 +112,9 @@ export class ImagesComponent implements OnInit {
       .pipe(
         switchMap(() => this.shareImageAllUsers(image)),
         tap((imageListData: ProjectModel[]) => this.initImageTable(imageListData))
-      ).subscribe();
+      ).subscribe(
+      () => this.toastr.success(Toaster_Message.successShare, 'Success!')
+    );
   }
 
   private getImageList(): ImageModel[] {
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 e6f4d5ec9..12130fed9 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
@@ -48,3 +48,7 @@ export const Image_Table_Titles = <const>[
 export enum Localstorage_Key {
   userName = 'user_name'
 }
+
+export enum Toaster_Message {
+  successShare = 'The image has been shared with all current Regular Users on the project!'
+}


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