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/13 15:21:39 UTC

[incubator-dlab] branch DLAB-1321 updated (876ab4a -> 7e49113)

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

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


    from 876ab4a  Updated default value for query param
     new 00eaed7  [DLAB-1386]: Fixed bag
     new c8768dc  Merge branch 'DLAB-1321' of https://github.com/apache/incubator-dlab into DLAB-1321
     new 7e49113  Merge remote-tracking branch 'origin/DLAB-1321' into DLAB-1321

The 3 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.


Summary of changes:
 .../management/endpoints/endpoints.component.ts    |   6 +-
 .../notification-dialog.component.ts               | 165 +++++++++++----------
 2 files changed, 90 insertions(+), 81 deletions(-)


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


[incubator-dlab] 02/03: Merge branch 'DLAB-1321' of https://github.com/apache/incubator-dlab into DLAB-1321

Posted by dg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit c8768dc560f41ff8f07b7961618f51719aae5229
Merge: 00eaed7 d14c358
Author: Dmytro Gnatyshyn <di...@ukr.net>
AuthorDate: Fri Dec 13 17:03:52 2019 +0200

    Merge branch 'DLAB-1321' of https://github.com/apache/incubator-dlab into DLAB-1321

 .../epam/dlab/backendapi/dao/ExploratoryDAO.java   | 18 +++++++++-
 .../com/epam/dlab/backendapi/dao/ProjectDAO.java   |  2 ++
 .../epam/dlab/backendapi/dao/ProjectDAOImpl.java   |  5 +++
 .../backendapi/resources/EndpointResource.java     |  6 ++--
 .../dlab/backendapi/service/EndpointService.java   |  6 +++-
 .../dlab/backendapi/service/ProjectService.java    |  4 +++
 .../service/impl/EndpointServiceImpl.java          | 36 ++++++++++++++++++--
 .../service/impl/ProjectServiceImpl.java           | 39 ++++++++++++++--------
 8 files changed, 96 insertions(+), 20 deletions(-)


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


[incubator-dlab] 01/03: [DLAB-1386]: Fixed bag

Posted by dg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 00eaed7ad3b72d83ad4c3851db777efa481716a3
Author: Dmytro Gnatyshyn <di...@ukr.net>
AuthorDate: Fri Dec 13 14:28:35 2019 +0200

    [DLAB-1386]: Fixed bag
---
 .../management/endpoints/endpoints.component.ts    |   6 +-
 .../notification-dialog.component.ts               | 165 +++++++++++----------
 2 files changed, 90 insertions(+), 81 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 31a5d2d..3012aa9 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
@@ -85,10 +85,14 @@ export class EndpointsComponent implements OnInit {
 
     this.dialog.open(NotificationDialogComponent, { data: { type: 'confirmation', item: data, list: this.filtredResource }, panelClass: 'modal-sm' })
       .afterClosed().subscribe(result => {
-        result === 'noTerminate' && this.endpointService.deleteEndpoint(data.name).subscribe(() => {
+        result === 'noTerminate' && this.endpointService.deleteEndpoint(`${data.name}?with-resources=false`).subscribe(() => {
           this.toastr.success('Endpoint successfully deleted!', 'Success!');
           this.getEndpointList();
         }, error => this.toastr.error(error.message || 'Endpoint creation failed!', 'Oops!'));
+        result === 'terminate' && this.endpointService.deleteEndpoint(`${data.name}?with-resources=true`).subscribe(() => {
+          this.toastr.success('Endpoint successfully deleted. All related resources are terminated!', '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/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 f371079..834792c 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
@@ -23,89 +23,95 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
 @Component({
   selector: 'notification-dialog',
   template: `
-  <div id="dialog-box">
-    <header class="dialog-header">
-      <h4 class="modal-title"><i class="material-icons">priority_high</i>Warning</h4>
-      <button type="button" class="close" (click)="dialogRef.close()">&times;</button>
-    </header>
-    <div mat-dialog-content class="content message">
-      <div *ngIf="data.type === 'list'" class="info">
-        <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">
+      <div id="dialog-box">
+          <header class="dialog-header">
+              <h4 class="modal-title"><i class="material-icons">priority_high</i>Warning</h4>
+              <button type="button" class="close" (click)="dialogRef.close()">&times;</button>
+          </header>
+          <div mat-dialog-content class="content message">
+              <div *ngIf="data.type === 'list'" class="info">
+                  <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
-        </div>
-        
-        <div *ngIf="data.template.cluster.length > 0">
-          <p *ngFor="let item of data.template.cluster">
-              Computational resource<span *ngIf="data.template.cluster.length > 1">s </span>
-              <span class="strong">{{ item.computational_name }}</span> on <span class="strong">{{ item.exploratory_name }}</span>
-              will be stopped
-          </p>
-        </div>
-        <span class="strong">by a schedule in 15 minutes.</span>
-      </div>
-      <div *ngIf="data.type === 'message'"><span [innerHTML]="data.template"></span></div>
-      <div *ngIf="data.type === 'confirmation'" class="confirm-dialog">
-        <p *ngIf="data.template; else label">
-          <span [innerHTML]="data.template"></span>
-        </p>
-        <ng-template #label>
-          <p>
-            <span class="ellipsis label-name strong" matTooltip="{{ data.item.name }}" matTooltipPosition="above" [matTooltipDisabled]="data.item.name.length > 35">
+                  </div>
+
+                  <div *ngIf="data.template.cluster.length > 0">
+                      <p *ngFor="let item of data.template.cluster">
+                          Computational resource<span *ngIf="data.template.cluster.length > 1">s </span>
+                          <span class="strong">{{ item.computational_name }}</span> on <span
+                              class="strong">{{ item.exploratory_name }}</span>
+                          will be stopped
+                      </p>
+                  </div>
+                  <span class="strong">by a schedule in 15 minutes.</span>
+              </div>
+              <div *ngIf="data.type === 'message'"><span [innerHTML]="data.template"></span></div>
+              <div *ngIf="data.type === 'confirmation'" class="confirm-dialog">
+                  <p *ngIf="data.template; else label">
+                      <span [innerHTML]="data.template"></span>
+                  </p>
+                  <ng-template #label>
+                      <p>
+            <span class="ellipsis label-name strong" matTooltip="{{ data.item.name }}" matTooltipPosition="above"
+                  [matTooltipDisabled]="data.item.name.length > 35">
              {{ data.item.name }}</span> will be {{ data.action || 'disconnected' }}.
-          </p>
-        </ng-template>
-          
-        <div *ngIf="data.list && data.list.length && data.type === 'confirmation'">
-          <div class="resource-list">
-            <div class="resource-list-header">
-                <div class="resource-name">Resource</div>
-                <div class="project">Project</div>
-            </div>
-            <div class="scrolling-content resource-heigth" >
-                <div class="resource-list-row sans node" *ngFor="let project of data.list">
-                    <div class="resource-name ellipsis">
-                        <div *ngFor="let notebook of project.filtredExploratory">{{notebook.name}}</div>
-                    </div>
-                    <div class="project ellipsis">{{project.project}}</div>                    
-                </div>
-            </div>
-          </div>
-          <div class="confirm-resource-terminating">
-              <label>
-                  <input class="checkbox" type="checkbox"
-                         (change)="terminateResource()"/>Terminate all related resources
-              </label>              
+                      </p>
+                  </ng-template>
+
+                  <div *ngIf="data.list && data.list.length && data.type === 'confirmation'">
+                      <div class="resource-list">
+                          <div class="resource-list-header">
+                              <div class="resource-name">Resource</div>
+                              <div class="project">Project</div>
+                          </div>
+                          <div class="scrolling-content resource-heigth">
+                              <div class="resource-list-row sans node" *ngFor="let project of data.list">
+                                  <div class="resource-name ellipsis">
+                                      <div *ngFor="let notebook of project.filtredExploratory">{{notebook.name}}</div>
+                                  </div>
+                                  <div class="project ellipsis">{{project.project}}</div>
+                              </div>
+                          </div>
+                      </div>
+                      <div class="confirm-resource-terminating">
+                          <label>
+                              <input class="checkbox" type="checkbox"
+                                     (change)="terminateResource()"/>Do not terminate all related resources
+                          </label>
+                      </div>
+                      <p class="confirm-message">
+                          <span *ngIf="!willNotTerminate">All connected computational resources will be terminated as well</span>
+                      </p>
+                  </div>
+                  <mat-list *ngIf="data.item.endpoints?.length">
+                      <mat-list-item class="list-header sans">
+                          <div class="endpoint">Edge node in endpoint</div>
+                          <div class="status">Further status</div>
+                      </mat-list-item>
+                      <div class="scrolling-content">
+                          <mat-list-item *ngFor="let endpoint of data.item.endpoints" class="sans node">
+                              <div class="endpoint ellipsis">{{endpoint.name}}</div>
+                              <div class="status terminated">Terminated</div>
+                          </mat-list-item>
+                      </div>
+                  </mat-list>
+                  <p class="m-top-20"><span class="strong">Do you want to proceed?</span></p>
+
+                  <div class="text-center m-top-30 m-bott-10">
+                      <button type="button" class="butt" mat-raised-button (click)="dialogRef.close()">No</button>
+                      <button *ngIf="!this.willNotTerminate" type="button" class="butt butt-success" mat-raised-button
+                              (click)="dialogRef.close('terminate')">Yes
+                      </button>
+                      <button *ngIf="this.willNotTerminate" type="button" class="butt butt-success" mat-raised-button
+                              (click)="dialogRef.close('noTerminate')">Yes
+                      </button>
+                  </div>
+              </div>
           </div>
-          <p class="confirm-message">
-              <span *ngIf="willResourceTermineted">All connected computational resources will be terminated as well</span>
-          </p>
-        </div>            
-          <mat-list *ngIf="data.item.endpoints?.length">
-            <mat-list-item class="list-header sans">
-                <div class="endpoint">Edge node in endpoint</div>
-                <div class="status">Further status</div>
-            </mat-list-item>
-            <div class="scrolling-content">
-                <mat-list-item *ngFor="let endpoint of data.item.endpoints" class="sans node">
-                    <div class="endpoint ellipsis">{{endpoint.name}}</div>
-                    <div class="status terminated">Terminated</div>
-                </mat-list-item>
-            </div>
-        </mat-list>          
-        <p class="m-top-20"><span class="strong">Do you want to proceed?</span></p>
-          
-        <div class="text-center m-top-30 m-bott-10">
-          <button type="button" class="butt" mat-raised-button (click)="dialogRef.close()">No</button>
-          <button *ngIf="!this.willResourceTermineted" type="button" class="butt butt-success" mat-raised-button (click)="dialogRef.close('noTerminate')">Yes</button>
-          <button *ngIf="this.willResourceTermineted" type="button" class="butt butt-success" mat-raised-button (click)="dialogRef.close('terminate')">Yes</button>
-        </div>          
       </div>
-    </div>
-  </div>
   `,
   styles: [`
     .content { color: #718ba6; padding: 20px 50px; font-size: 14px; font-weight: 400; margin: 0; }
@@ -137,15 +143,14 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
   `]
 })
 export class NotificationDialogComponent {
-  public willResourceTermineted: boolean = false;
+  public willNotTerminate: boolean = false;
   constructor(
     public dialogRef: MatDialogRef<NotificationDialogComponent>,
     @Inject(MAT_DIALOG_DATA) public data: any
   ) {
-    console.log(data);
   }
 
   public terminateResource(): void{
-    this.willResourceTermineted = !this.willResourceTermineted;
+    this.willNotTerminate = !this.willNotTerminate;
   }
 }


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


[incubator-dlab] 03/03: Merge remote-tracking branch 'origin/DLAB-1321' into DLAB-1321

Posted by dg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 7e49113965f7f17df68eedd3595818b34475deeb
Merge: c8768dc 876ab4a
Author: Dmytro Gnatyshyn <di...@ukr.net>
AuthorDate: Fri Dec 13 17:21:29 2019 +0200

    Merge remote-tracking branch 'origin/DLAB-1321' into DLAB-1321

 .../main/java/com/epam/dlab/backendapi/resources/EndpointResource.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


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