hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bra...@apache.org
Subject hadoop git commit: HDFS-12788. Reset the upload button when file upload fails. Contributed by Brahma Reddy Battula
Date Wed, 08 Nov 2017 09:17:07 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.9 53891b7f8 -> ce027c6f4


HDFS-12788. Reset the upload button when file upload fails. Contributed by Brahma Reddy Battula

(cherry picked from commit 410d0319cf72b9b5f3807c522237f52121d98cd5)


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

Branch: refs/heads/branch-2.9
Commit: ce027c6f4802f3844c63a16fac910584bb17746f
Parents: 53891b7
Author: Brahma Reddy Battula <brahma@apache.org>
Authored: Wed Nov 8 14:41:16 2017 +0530
Committer: Brahma Reddy Battula <brahma@apache.org>
Committed: Wed Nov 8 14:46:27 2017 +0530

----------------------------------------------------------------------
 .../hadoop-hdfs/src/main/webapps/hdfs/explorer.js        | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/ce027c6f/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js
index dae3519..ed1f832 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js
@@ -440,22 +440,29 @@
           }).complete(function(data) {
             numCompleted++;
             if(numCompleted == files.length) {
-              $('#modal-upload-file').modal('hide');
-              $('#modal-upload-file-button').button('reset');
+              reset_upload_button();
               browse_directory(current_directory);
             }
           }).error(function(jqXHR, textStatus, errorThrown) {
             numCompleted++;
+            reset_upload_button();
             show_err_msg("Couldn't upload the file " + file.file.name + ". "+ errorThrown);
           });
         }).error(function(jqXHR, textStatus, errorThrown) {
           numCompleted++;
+          reset_upload_button();
           show_err_msg("Couldn't find datanode to write file. " + errorThrown);
         });
       })();
     }
   });
 
+  //Reset the upload button
+  function reset_upload_button() {
+    $('#modal-upload-file').modal('hide');
+    $('#modal-upload-file-button').button('reset');
+  }
+
   //Store the list of files which have been checked into session storage
   function store_selected_files(current_directory) {
     sessionStorage.setItem("source_directory", current_directory);


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message