Repository: ambari Updated Branches: refs/heads/branch-2.5 6379b6e0b -> ab3f216be
AMBARI-19291. User should be shown proper error message in file browser page (Madhan Mohan Reddy via pallavkul) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ab3f216b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ab3f216b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ab3f216b Branch: refs/heads/branch-2.5 Commit: ab3f216be76715cb1f6746c9f24b3a2baff7efa1 Parents: 6379b6e Author: pallavkul <[email protected]> Authored: Thu Jan 5 12:17:52 2017 +0530 Committer: pallavkul <[email protected]> Committed: Thu Jan 5 12:19:29 2017 +0530 ---------------------------------------------------------------------- .../src/main/resources/ui/app/components/hdfs-browser.js | 5 ++++- .../resources/ui/app/templates/components/hdfs-browser.hbs | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/ab3f216b/contrib/views/wfmanager/src/main/resources/ui/app/components/hdfs-browser.js ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/hdfs-browser.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/hdfs-browser.js index c9be41a..47e7983 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/hdfs-browser.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/hdfs-browser.js @@ -53,7 +53,10 @@ export default Ember.Component.extend({ this.set("alertMessage",data.message); }, actions: { - viewerError() { + viewerError(error) { + if (error.responseJSON && error.responseJSON.message && error.responseJSON.message.includes("Permission")) { + this.showNotification({"type": "error", "message": "Permission denied"}); + } }, createFolder(){ var self=this; http://git-wip-us.apache.org/repos/asf/ambari/blob/ab3f216b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs index 437640d..4f9b4ce 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs @@ -53,8 +53,10 @@ <div> {{#if alertMessage}} <div class="alert alert-{{alertType}} col-xs-24"> - {{alertMessage}}- - {{alertDetails}} + {{alertMessage}} + {{#if alertDetails}} + -{{alertDetails}} + {{/if}} </div> {{/if}}
