This is an automated email from the ASF dual-hosted git repository. dgnatyshyn pushed a commit to branch DLAB-1391 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/DLAB-1391 by this push: new 3c0f019 [1394] Fixed Cancel' button does not trigger for Cluster configurations 3c0f019 is described below commit 3c0f019d08566d2c659381f47994a34c87c42a6b Author: Dmytro Gnatyshyn <di1...@ukr.net> AuthorDate: Wed Dec 18 10:32:21 2019 +0200 [1394] Fixed Cancel' button does not trigger for Cluster configurations --- .../project/project-list/project-list.component.ts | 9 +++------ .../app/administration/project/project.component.ts | 19 +------------------ .../detail-dialog/detail-dialog.component.html | 2 +- 3 files changed, 5 insertions(+), 25 deletions(-) diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.ts index 4b8b9a6..e5feeac 100644 --- a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.ts +++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.ts @@ -117,12 +117,9 @@ export class ProjectListComponent implements OnInit, OnDestroy { .afterClosed().subscribe(endpoint => { if(endpoint && endpoint.length){ this.toggleStatus.emit({project, endpoint, action}); - }console.log(endpoint) - // result && this.endpointService.deleteEndpoint(data.name).subscribe(() => { - // this.toastr.success('Endpoint successfully deleted!', 'Success!'); - - // }, error => this.toastr.error(error.message || 'Endpoint creation failed!', 'Oops!')); - }); + } + }, error => this.toastr.error(error.message || `Endpoint ${action} failed!`, 'Oops!') + ); } public areStartedEndpoints(project) { 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 6ea0c25..52d2ff2 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 @@ -114,28 +114,11 @@ export class ProjectComponent implements OnInit, OnDestroy { } public toggleStatus($event) { - console.log($event); const data = { 'project_name': $event.project.name, endpoint: $event.endpoint.map(endpoint => endpoint.name)}; - - console.log(data) - // if ($event.action === 'stop' || $event.action === 'terminate') { - // this.dialog.open(NotificationDialogComponent, { - // data: { - // type: 'confirmation', - // template: `Edge node in endpoint <span class="strong">${$event.endpoint.name}</span> will be ${$event.action === 'stop' ? 'stopped' : 'terminated'} for <span class="strong">${$event.project.name}</span>`, - // item: $event.endpoint, action: $event.action === 'stop' ? 'stopped' : 'terminated' - // }, panelClass: 'modal-sm' - // }) - // .afterClosed().subscribe(result => { - // result && this.toggleStatusRequest(data, $event.action); - // }, error => this.toastr.error(error.message, 'Oops!')); - // } else { - // this.toggleStatusRequest(data, $event.action); - // } + this.toggleStatusRequest(data, $event.action); } private toggleStatusRequest(data, action) { - console.log(data); this.projectService.toggleProjectStatus(data, action).subscribe(() => { this.refreshGrid(); this.toastr.success(`Endpoint ${this.toEndpointAction(action)} is in progress!`, 'Processing!'); diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.html index 2aaa4b5..22802ae 100644 --- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.html +++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.html @@ -121,7 +121,7 @@ </ng-template> <div [scrollTo]="configuration?.nativeElement['checked'] || false" class="text-center m-top-20 m-bott-10" *ngIf="(configuration?.nativeElement['checked'] || false) && notebook.status === 'running'"> - <button mat-raised-button type="button" (click)="bindDialog.close()" class="butt action">Cancel</button> + <button mat-raised-button type="button" (click)="dialogRef.close()" class="butt action">Cancel</button> <button mat-raised-button type="submit" [disabled]="!configurationForm.valid" class="butt butt-success action" [ngClass]="{'not-allowed': !configurationForm.valid}" (click)="editClusterConfiguration(configurationForm.value)">Update</button> --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org