vnaas cleanup
Change-Id: Id5db389e12b0ca42d6a1d9ecec4bb2854fa4d65c
diff --git a/xos/gui/src/app/components/eline-side.component.ts b/xos/gui/src/app/components/eline-side.component.ts
index fb8a2f1..e8613e7 100755
--- a/xos/gui/src/app/components/eline-side.component.ts
+++ b/xos/gui/src/app/components/eline-side.component.ts
@@ -2,14 +2,14 @@
/*
* Copyright 2017-present Open Networking Foundation
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
+ * distributed under the License is distributed on an 'AS IS' BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
@@ -20,7 +20,7 @@
class ElineSide {
- static $inject = ['XosSidePanel', 'XosModelStore', '$http', '$log', 'toastr'];
+ static $inject = ['XosSidePanel', 'XosModelStore', '$http', '$log', 'toastr', 'XosConfirm'];
constructor(
private XosSidePanel: any,
@@ -28,6 +28,7 @@
private $http: any,
private $log: any,
private toastr: any,
+ private XosConfirm: any,
) {
self = this;
}
@@ -46,12 +47,23 @@
public deleteEline(item: any) {
let name = item.name;
- item.$delete().then((res) => {
- this.toastr.success(`${name} successfully deleted!`);
- })
- .catch((error) => {
- this.toastr.error(`Error while deleting ${name}: ${error.specific_error}`);
- });
+ this.XosConfirm.open({
+ header: 'Confirm deletion',
+ text: 'Are you sure you want to delete this? This action cannot be undone.',
+ actions: [{
+ label: 'Delete',
+ class: 'btn-danger',
+ cb: () => {
+ item.$delete().then((res) => {
+ this.toastr.success(`${name} successfully deleted!`);
+ })
+ .catch((error) => {
+ this.toastr.error(`Error while deleting ${name}: ${error.specific_error}`);
+ });
+ }
+ }]
+ });
+
}
@@ -62,6 +74,6 @@
controllerAs: 'vm',
controller: ElineSide,
bindings: {
- eng: '='
+ vng: '='
}
};