commit | dafc0baedaf9445d7d10e99c981dd502cabfe76e | [log] [tgz] |
---|---|---|
author | Max Chu <maxmchu@gmail.com> | Tue Aug 15 11:03:09 2017 -0700 |
committer | Max Chu <maxmchu@gmail.com> | Tue Aug 15 16:16:06 2017 -0700 |
tree | 3a6bf10fccac6b6288c863dcbdb63be7487ea971 | |
parent | 3c8b65f713d6a31b887fe699e83cef48d81e87a7 [diff] [blame] |
add ability to delete Elines in Metronet GUI Change-Id: I7cdcfb78417bed445e10384b65e0117cc5961d1a
diff --git a/xos/gui/src/app/components/eline-side.component.ts b/xos/gui/src/app/components/eline-side.component.ts index ca017c4..a3dde96 100644 --- a/xos/gui/src/app/components/eline-side.component.ts +++ b/xos/gui/src/app/components/eline-side.component.ts
@@ -26,6 +26,15 @@ }); } + 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}`); + }); + } }