You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by al...@apache.org on 2016/04/06 17:12:04 UTC
[2/3] brooklyn-ui git commit: BROOKLYN-244: Add error handling if the
applications' fetch fails
BROOKLYN-244: Add error handling if the applications' fetch fails
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/commit/ee3d34e2
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/tree/ee3d34e2
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/diff/ee3d34e2
Branch: refs/heads/master
Commit: ee3d34e282fb637867dd09cf456e89eb2dade0b6
Parents: 38e89a5
Author: Thomas Bouron <th...@cloudsoftcorp.com>
Authored: Wed Apr 6 12:35:12 2016 +0100
Committer: Thomas Bouron <th...@cloudsoftcorp.com>
Committed: Wed Apr 6 12:35:12 2016 +0100
----------------------------------------------------------------------
src/main/webapp/assets/js/view/editor.js | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/ee3d34e2/src/main/webapp/assets/js/view/editor.js
----------------------------------------------------------------------
diff --git a/src/main/webapp/assets/js/view/editor.js b/src/main/webapp/assets/js/view/editor.js
index 05469d1..72ce9f4 100644
--- a/src/main/webapp/assets/js/view/editor.js
+++ b/src/main/webapp/assets/js/view/editor.js
@@ -185,11 +185,14 @@ define([
}
cm.getDoc().setValue(itemText);
- cm.setOption('readOnly', false);
- cm.refresh();
-
- loading.fadeOut();
+ },
+ error: function() {
+ vm.showFailure('Could not load the item: ' + vm.options.typeId);
}
+ }).done(function() {
+ cm.setOption('readOnly', false);
+ cm.refresh();
+ loading.fadeOut();
});
}
}