Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 17A6D200D33 for ; Wed, 8 Nov 2017 10:19:59 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 15FFB160BE0; Wed, 8 Nov 2017 09:19:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5DAFE160BDA for ; Wed, 8 Nov 2017 10:19:58 +0100 (CET) Received: (qmail 62928 invoked by uid 500); 8 Nov 2017 09:19:57 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 62919 invoked by uid 99); 8 Nov 2017 09:19:57 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Nov 2017 09:19:57 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 51F78DFC49; Wed, 8 Nov 2017 09:19:57 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: brahma@apache.org To: common-commits@hadoop.apache.org Message-Id: <0f5c0211b73b4bc2bacf8ca789827403@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: hadoop git commit: HDFS-12788. Reset the upload button when file upload fails. Contributed by Brahma Reddy Battula Date: Wed, 8 Nov 2017 09:19:57 +0000 (UTC) archived-at: Wed, 08 Nov 2017 09:19:59 -0000 Repository: hadoop Updated Branches: refs/heads/branch-3.0 19b1164fc -> d25d3827d 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/d25d3827 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d25d3827 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d25d3827 Branch: refs/heads/branch-3.0 Commit: d25d3827d505b4c2702a461ff13bf37f4d033275 Parents: 19b1164 Author: Brahma Reddy Battula Authored: Wed Nov 8 14:41:16 2017 +0530 Committer: Brahma Reddy Battula Committed: Wed Nov 8 14:49:10 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/d25d3827/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