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:39:42 UTC
[2/2] 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/288e2447
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/tree/288e2447
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/diff/288e2447
Branch: refs/heads/0.9.0
Commit: 288e2447e9c00e8671fc802bab2e6d466921d9a0
Parents: a88f781
Author: Thomas Bouron <th...@cloudsoftcorp.com>
Authored: Wed Apr 6 12:35:12 2016 +0100
Committer: Aled Sage <al...@gmail.com>
Committed: Wed Apr 6 16:39:18 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/288e2447/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();
});
}
}