You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by dg...@apache.org on 2019/12/18 10:05:10 UTC

[incubator-dlab] 01/01: [1400] Altered information message for endpoint management

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

dgnatyshyn pushed a commit to branch DLAB-1400
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit a002db4d72f4678907313fbde5b543cc1185b3c2
Author: Dmytro Gnatyshyn <di...@ukr.net>
AuthorDate: Wed Dec 18 12:04:46 2019 +0200

    [1400] Altered information message for endpoint management
---
 .../management/endpoints/endpoints.component.ts       |  6 +++---
 .../app/administration/project/project.component.ts   |  2 +-
 .../notification-dialog.component.ts                  | 19 +++++++++----------
 3 files changed, 13 insertions(+), 14 deletions(-)

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 a5e5342..7a89f87 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
@@ -68,9 +68,9 @@ export class EndpointsComponent implements OnInit {
 
   public assignChanges(data) {
     this.endpointService.createEndpoint(data).subscribe(() => {
-      this.toastr.success('Endpoint created successfully!', 'Success!');
+      this.toastr.success('Endpoint connected successfully!', 'Success!');
       this.dialogRef.close(true);
-    }, error => this.toastr.error(error.message || 'Endpoint creation failed!', 'Oops!'));
+    }, error => this.toastr.error(error.message || 'Endpoint connection failed!', 'Oops!'));
   }
 
   public deleteEndpoint(data) {
@@ -101,7 +101,7 @@ export class EndpointsComponent implements OnInit {
 
   private deleteEndpointOption(data, option){
     this.endpointService.deleteEndpoint(`${data.name}?with-resources=${option}`).subscribe(() => {
-      this.toastr.success(option ? 'Endpoint successfully disconnected. All related resources are terminated!' : 'Endpoint successfully disconnected!' , 'Success!');
+      this.toastr.success(option ? 'Endpoint successfully disconnected. All related resources are terminating!' : 'Endpoint successfully disconnected!' , '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/administration/project/project.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.ts
index 1804b34..a501ccc 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/project.component.ts
@@ -105,7 +105,7 @@ export class ProjectComponent implements OnInit, OnDestroy {
   }
 
   public deleteProject($event) {
-    this.dialog.open(NotificationDialogComponent, { data: { type: 'confirmation', item: $event, list: [] }, panelClass: 'modal-sm' })
+    this.dialog.open(NotificationDialogComponent, { data: { type: 'confirmation', item: $event }, panelClass: 'modal-sm' })
       .afterClosed().subscribe(result => {
         result && this.projectService.deleteProject($event.name).subscribe(() => {
           this.refreshGrid();
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/notification-dialog/notification-dialog.component.ts b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/notification-dialog/notification-dialog.component.ts
index 834792c..a4762fc 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/notification-dialog/notification-dialog.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/notification-dialog/notification-dialog.component.ts
@@ -33,9 +33,9 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
                   <div *ngIf="data.template.notebook.length > 0">
                       Following notebook server<span *ngIf="data.template.notebook.length>1">s </span>
                       <span *ngFor="let item of data.template.notebook">
-            <span class="strong">{{ item.exploratory_name }}</span>
-            <span *ngIf="data.template.notebook.length > 1">, </span>
-          </span> will be stopped and all computational resources will be stopped/terminated
+                        <span class="strong">{{ item.exploratory_name }}</span>
+                        <span *ngIf="data.template.notebook.length > 1">, </span>
+                      </span> will be stopped and all computational resources will be stopped/terminated
                   </div>
 
                   <div *ngIf="data.template.cluster.length > 0">
@@ -55,7 +55,8 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
                   </p>
                   <ng-template #label>
                       <p>
-            <span class="ellipsis label-name strong" matTooltip="{{ data.item.name }}" matTooltipPosition="above"
+            <span *ngIf="!!data.list">Endpoint</span>
+            <span class="ellipsis strong" matTooltip="{{ data.item.name }}" matTooltipPosition="above"
                   [matTooltipDisabled]="data.item.name.length > 35">
              {{ data.item.name }}</span> will be {{ data.action || 'disconnected' }}.
                       </p>
@@ -121,14 +122,12 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
     header h4 i { vertical-align: bottom; }
     header a i { font-size: 20px; }
     header a:hover i { color: #35afd5; cursor: pointer; }
-    .plur { font-style: normal; }
-    .label-name { display: inline-block; width: 100% } 
+    .plur { font-style: normal; }    
     .scrolling-content{overflow-y: auto; max-height: 200px; }
     .endpoint { width: 70%; text-align: left; color: #577289;}
     .status { width: 30%;text-align: left;}
     .label { font-size: 15px; font-weight: 500; font-family: "Open Sans",sans-serif;}
-    .node { font-weight: 300;}    
-    .label-name { display: inline-block; width: 100%}    
+    .node { font-weight: 300;}     
     .resource-name { width: 280px;text-align: left; padding: 10px 0;line-height: 26px;}
     .project { width: 30%;text-align: left; padding: 10px 0;line-height: 26px;}    
     .resource-list{max-width: 100%; margin: 0 auto;margin-top: 20px; }
@@ -142,8 +141,8 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
     
   `]
 })
-export class NotificationDialogComponent {
-  public willNotTerminate: boolean = false;
+export class NotificationDialogComponent{
+  public willNotTerminate: boolean = !this.data.list.length;
   constructor(
     public dialogRef: MatDialogRef<NotificationDialogComponent>,
     @Inject(MAT_DIALOG_DATA) public data: any


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