Added delete action to tabular views
Change-Id: I09aaec02ce55f74108ead6bf5ae1dd8f478effab
diff --git a/mCordPortal/src/app/view/enode-list/enode-list.js b/mCordPortal/src/app/view/enode-list/enode-list.js
index ed52596..402aa07 100644
--- a/mCordPortal/src/app/view/enode-list/enode-list.js
+++ b/mCordPortal/src/app/view/enode-list/enode-list.js
@@ -8,7 +8,7 @@
scope: {},
controllerAs: 'vm',
templateUrl: 'app/view/enode-list/e-node-list.tpl.html',
- controller: function($uibModal, Enodeb){
+ controller: function($uibModal, _, Enodeb){
Enodeb.query().$promise
.then((enodes) => {
@@ -37,6 +37,22 @@
prop: 'Status',
type: 'boolean'
}
+ ],
+ actions: [
+ {
+ label: 'delete',
+ icon: 'remove',
+ cb: (item) => {
+ item.$delete()
+ .then(() => {
+ _.remove(this.enodes, item);
+ })
+ .catch(e => {
+ console.log(e);
+ })
+ },
+ color: 'red'
+ }
]
};
diff --git a/mCordPortal/src/app/view/imsi-list/imsi-list.js b/mCordPortal/src/app/view/imsi-list/imsi-list.js
index 02fb6e5..ff8ec71 100644
--- a/mCordPortal/src/app/view/imsi-list/imsi-list.js
+++ b/mCordPortal/src/app/view/imsi-list/imsi-list.js
@@ -49,6 +49,22 @@
prop: 'UeStatus',
type: 'boolean'
}
+ ],
+ actions: [
+ {
+ label: 'delete',
+ icon: 'remove',
+ cb: (item) => {
+ item.$delete()
+ .then(() => {
+ _.remove(this.imsi, item);
+ })
+ .catch(e => {
+ console.log(e);
+ })
+ },
+ color: 'red'
+ }
]
};
diff --git a/mCordPortal/src/app/view/profiles-list/profiles-list.js b/mCordPortal/src/app/view/profiles-list/profiles-list.js
index 66d1530..fa22dfe 100644
--- a/mCordPortal/src/app/view/profiles-list/profiles-list.js
+++ b/mCordPortal/src/app/view/profiles-list/profiles-list.js
@@ -56,6 +56,22 @@
prop: 'jsEnd',
type: 'date'
}
+ ],
+ actions: [
+ {
+ label: 'delete',
+ icon: 'remove',
+ cb: (item) => {
+ item.$delete()
+ .then(() => {
+ _.remove(this.profiles, item);
+ })
+ .catch(e => {
+ console.log(e);
+ })
+ },
+ color: 'red'
+ }
]
};
}