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:46:15 UTC
[incubator-dlab] branch DLAB-1321 updated: [DLAB-1321]: Conveyed
all resources which will be terminated on confirmation dialog and added
possibility to terminate all resources on endpoint
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
The following commit(s) were added to refs/heads/DLAB-1321 by this push:
new eb408be [DLAB-1321]: Conveyed all resources which will be terminated on confirmation dialog and added possibility to terminate all resources on endpoint
eb408be is described below
commit eb408bee7438b4ada8cf05ebcbb4651511b69bde
Author: Dmytro Gnatyshyn <di...@ukr.net>
AuthorDate: Fri Dec 13 17:45:57 2019 +0200
[DLAB-1321]: Conveyed all resources which will be terminated on confirmation dialog and added possibility to terminate all resources on endpoint
---
.../management/endpoints/endpoints.component.ts | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 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 3012aa9..a5e5342 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,14 +85,8 @@ 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}?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!'));
+ result === 'noTerminate' && this.deleteEndpointOption(data, false);
+ result === 'terminate' && this.deleteEndpointOption(data, true);
});
}
@@ -105,6 +99,13 @@ 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.getEndpointList();
+ }, error => this.toastr.error(error.message || 'Endpoint creation failed!', 'Oops!'));
+ }
+
private getEndpointList() {
this.endpointService.getEndpointsData().subscribe((endpoints: any) => this.endpoints = endpoints);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org