Github user robertgmoss commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/704#discussion_r33032941
--- Diff: usage/jsgui/src/main/webapp/assets/js/view/catalog.js ---
@@ -113,9 +113,16 @@ define([
// Could use wait flag to block removal of model from
collection
// until server confirms deletion and success handler to
perform
// removal. Useful if delete fails for e.g. lack of
entitlement.
- this.activeModel.destroy();
- var displayName = $(event.currentTarget).data("name");
- this.renderEmpty(displayName ? "Deleted " + displayName : "");
+ var that = this;
+ var displayName = $(event.currentTarget).data("name") ||
"item";
+ this.activeModel.destroy({
+ success: function() {
+ that.renderEmpty("Deleted " + displayName);
+ },
+ error: function(info) {
+ that.renderEmpty("Unable to permanently delete " +
displayName+". Deletion is temporary, client-side only.");
--- End diff --
Reverse the order of these two sentences - I had to do a double take
because it looks like a failure message but the location is removed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---