ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [17/25] ambari git commit: AMBARI-20078. When uploading a file using the WFM, need a message to say that either the file upload succeeded or failed. (Padma Priya N via gauravn7)
Date Tue, 21 Feb 2017 16:39:48 GMT
AMBARI-20078. When uploading a file using the WFM, need a message to say that either the file
upload succeeded or failed. (Padma Priya N via gauravn7)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6a3d8fd7
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6a3d8fd7
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6a3d8fd7

Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 6a3d8fd75f9b5a15f9a27d2c1948e07691d16a98
Parents: e585eb6
Author: Gaurav Nagar <grvngr@gmail.com>
Authored: Tue Feb 21 16:04:17 2017 +0530
Committer: Gaurav Nagar <grvngr@gmail.com>
Committed: Tue Feb 21 16:06:08 2017 +0530

----------------------------------------------------------------------
 .../src/main/resources/ui/app/components/hdfs-browser.js    | 9 +++++++++
 .../resources/ui/app/templates/components/hdfs-browser.hbs  | 5 +++++
 2 files changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/6a3d8fd7/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 1af9f4d..0194f13 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,6 +53,13 @@ export default Ember.Component.extend({
     this.set("alertDetails",data.details);
     this.set("alertMessage",data.message);
   },
+  isUpdated : function(){
+    if(this.get('showUploadSuccess')){
+      this.$('#success-alert').fadeOut(5000, ()=>{
+        this.set("showUploadSuccess", false);
+      });
+    }
+  }.on('didUpdate'),
   actions: {
     viewerError(error) {
       if (error.responseJSON && error.responseJSON.message && error.responseJSON.message.includes("Permission"))
{
@@ -98,6 +105,8 @@ export default Ember.Component.extend({
     },
     uploadSuccess(e){
       this.get('uploaderService').trigger('uploadSuccess');
+      this.set('uploadSelected', false);
+      this.set('showUploadSuccess', true);
     },
     uploadFailure(textStatus,errorThrown){
       this.showNotification({

http://git-wip-us.apache.org/repos/asf/ambari/blob/6a3d8fd7/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 b8da4a0..44f25c8 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
@@ -51,6 +51,11 @@
         </div>
         <div class="panel-body">
           <div>
+            {{#if showUploadSuccess}}
+              <div id="success-alert"class="alert alert-success alert-dismissible fade
in" role="alert">
+                <span>File uploaded</span>
+              </div>
+            {{/if}}
             {{#if alertMessage}}
               <div class="alert alert-{{alertType}} col-xs-24">
                 {{alertMessage}}


Mime
View raw message