You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2017/07/17 11:36:28 UTC

ambari git commit: AMBARI-21486 Remove IOP Select button declares success even if command fails. (atkach)

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 <at...@apache.org>
Authored: Mon Jul 17 14:22:56 2017 +0300
Committer: Andrii Tkach <at...@apache.org>
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:<li>{1} Maintenance Mode</li><li>{2} Not Required</li>",
   '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 <b>Cluster Management</b> 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
+          })
+        });
       });
     });
   }