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 265CB200CC9 for ; Mon, 17 Jul 2017 13:36:30 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 249A9164C72; Mon, 17 Jul 2017 11:36:30 +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 6BB3D164C6D for ; Mon, 17 Jul 2017 13:36:29 +0200 (CEST) Received: (qmail 78763 invoked by uid 500); 17 Jul 2017 11:36:28 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 78753 invoked by uid 99); 17 Jul 2017 11:36:28 -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; Mon, 17 Jul 2017 11:36:28 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6D122E360F; Mon, 17 Jul 2017 11:36:28 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: atkach@apache.org To: commits@ambari.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-21486 Remove IOP Select button declares success even if command fails. (atkach) Date: Mon, 17 Jul 2017 11:36:28 +0000 (UTC) archived-at: Mon, 17 Jul 2017 11:36:30 -0000 Repository: ambari Updated Branches: refs/heads/branch-feature-AMBARI-21348 133baa53f -> 061467bae AMBARI-21486 Remove IOP Select button declares success even if command fails. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/061467ba Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/061467ba Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/061467ba Branch: refs/heads/branch-feature-AMBARI-21348 Commit: 061467bae47c4218437b0fed97d814ce4d43222b Parents: 133baa5 Author: Andrii Tkach Authored: Mon Jul 17 14:22:56 2017 +0300 Committer: Andrii Tkach Committed: Mon Jul 17 14:22:56 2017 +0300 ---------------------------------------------------------------------- ambari-web/app/messages.js | 1 - .../main/admin/stack_upgrade/versions_view.js | 24 ++++++++------------ 2 files changed, 10 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/061467ba/ambari-web/app/messages.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index a51f896..9ec64ef 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -1710,7 +1710,6 @@ Em.I18n.translations = { 'admin.stackVersions.version.notInstalled': "Not Installed", 'admin.stackVersions.version.hostsInfoTooltip': "There are {0} hosts that do not need packages installed:
  • {1} Maintenance Mode
  • {2} Not Required
  • ", 'admin.stackVersions.removeIopSelect': "Remove IOP select", - 'admin.stackVersions.removeIopSelect.done': "IOP select successfully removed.", 'admin.stackVersions.removeIopSelect.fail': "IOP select remove failed", 'admin.stackVersions.manageVersions': "Manage Versions", 'admin.stackVersions.manageVersions.popup.body': 'You are about to leave the Cluster Management interface' + http://git-wip-us.apache.org/repos/asf/ambari/blob/061467ba/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js b/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js index 2b57e04..699ee5f 100644 --- a/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js +++ b/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js @@ -257,20 +257,16 @@ App.MainAdminStackVersionsView = Em.View.extend({ data: { hosts: App.get('allHostNames').join(',') } - }).always(function(xhr, status) { - if (status === 'success') { - App.showAlertPopup(Em.I18n.t('admin.stackVersions.removeIopSelect'), Em.I18n.t('admin.stackVersions.removeIopSelect.done')); - } else if (status === 'error') { - App.ModalPopup.show({ - header: Em.I18n.t('admin.stackVersions.removeIopSelect.fail'), - secondary: false, - bodyClass: App.AjaxDefaultErrorPopupBodyView.extend({ - type: 'POST', - status: xhr.status, - message: xhr.responseText - }) - }); - } + }).fail(function(xhr) { + App.ModalPopup.show({ + header: Em.I18n.t('admin.stackVersions.removeIopSelect.fail'), + secondary: false, + bodyClass: App.AjaxDefaultErrorPopupBodyView.extend({ + type: 'POST', + status: xhr.status, + message: xhr.responseText + }) + }); }); }); }