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 72CCC200D39 for ; Sat, 11 Nov 2017 12:01:50 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 71661160C05; Sat, 11 Nov 2017 11:01:50 +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 BEE10160C04 for ; Sat, 11 Nov 2017 12:01:49 +0100 (CET) Received: (qmail 26649 invoked by uid 500); 11 Nov 2017 11:01:47 -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 26152 invoked by uid 99); 11 Nov 2017 11:01:47 -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; Sat, 11 Nov 2017 11:01:47 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A1A3CF5E0C; Sat, 11 Nov 2017 11:01:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sunilg@apache.org To: common-commits@hadoop.apache.org Date: Sat, 11 Nov 2017 11:02:01 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [18/50] [abbrv] hadoop git commit: HDFS-12788. Reset the upload button when file upload fails. Contributed by Brahma Reddy Battula archived-at: Sat, 11 Nov 2017 11:01:50 -0000 HDFS-12788. Reset the upload button when file upload fails. Contributed by Brahma Reddy Battula Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/410d0319 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/410d0319 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/410d0319 Branch: refs/heads/YARN-5881 Commit: 410d0319cf72b9b5f3807c522237f52121d98cd5 Parents: bb8a6ee Author: Brahma Reddy Battula Authored: Wed Nov 8 14:41:16 2017 +0530 Committer: Brahma Reddy Battula Committed: Wed Nov 8 14:41:16 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/410d0319/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