You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ak...@apache.org on 2016/02/05 15:26:10 UTC

ambari git commit: AMBARI-14937. Show error message when installing registered version which does not have repo defined for the OS (akovalenko)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 324d92a15 -> 89be2a462


AMBARI-14937. Show error message when installing registered version which does not have repo defined for the OS (akovalenko)


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

Branch: refs/heads/branch-2.2
Commit: 89be2a4629b4db0abff028cf902a2c4a74b75161
Parents: 324d92a
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Fri Feb 5 14:21:04 2016 +0200
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Fri Feb 5 16:25:47 2016 +0200

----------------------------------------------------------------------
 .../main/admin/stack_and_upgrade_controller.js   | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/89be2a46/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
index 61645d4..6c342dc 100644
--- a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
+++ b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
@@ -1252,6 +1252,7 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
       sender: this,
       data: data,
       success: 'installRepoVersionSuccess',
+      error: 'installRepoVersionError',
       callback: function() {
         this.sender.set('requestInProgress', false);
         this.sender.set('requestInProgressRepoId', null);
@@ -1410,6 +1411,24 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
   },
 
   /**
+   * error callback for <code>installRepoVersion()<code>
+   * show the error message
+   * @param data
+   * @method installStackVersionSuccess
+   */
+  installRepoVersionError: function (data) {
+    var header = Em.I18n.t('admin.stackVersions.upgrade.installPackage.fail.title');
+    var body = "";
+    if(data && data.responseText){
+      try {
+        var json = $.parseJSON(data.responseText);
+        body = json.message;
+      } catch (err) {}
+    }
+    App.showAlertPopup(header, body);
+  },
+
+  /**
    * opens a popup with installations state per host
    * @param {Em.Object} version
    * @method showProgressPopup