You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2015/12/23 16:06:52 UTC
[13/51] [abbrv] ambari git commit: AMBARI-14426. If repos for the
current os are not defined install_packages doesn't show error.(xiwang)
AMBARI-14426. If repos for the current os are not defined install_packages doesn't show error.(xiwang)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fd6e9cc0
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fd6e9cc0
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fd6e9cc0
Branch: refs/heads/branch-dev-patch-upgrade
Commit: fd6e9cc00ea511c3433c847654d994dd605c6368
Parents: 32e8654
Author: Xi Wang <xi...@apache.org>
Authored: Thu Dec 17 12:11:45 2015 -0800
Committer: Xi Wang <xi...@apache.org>
Committed: Fri Dec 18 11:51:21 2015 -0800
----------------------------------------------------------------------
.../main/admin/stack_and_upgrade_controller.js | 19 +++++++++++++++++++
ambari-web/app/messages.js | 1 +
2 files changed, 20 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/fd6e9cc0/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 2760c81..e1e16f4 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
@@ -1160,6 +1160,7 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
sender: this,
data: data,
success: 'installRepoVersionSuccess',
+ error: 'installRepoVersionError',
callback: function() {
this.sender.set('requestInProgress', false);
}
@@ -1312,6 +1313,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
http://git-wip-us.apache.org/repos/asf/ambari/blob/fd6e9cc0/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 12402fd..05e2179 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1450,6 +1450,7 @@ Em.I18n.translations = {
'admin.stackVersions.filter.upgrading': "Upgrade/Downgrade In Process ({0})",
'admin.stackVersions.filter.upgraded': "Ready to Finalize ({0})",
'admin.stackVersions.upgrade.start.fail.title':'Upgrade could not be started',
+ 'admin.stackVersions.upgrade.installPackage.fail.title':'Packages could not be installed',
'admin.stackVersions.editRepositories.info': 'Provide Base URLs for the Operating Systems you are configuring. Uncheck all other Operating Systems.',
'admin.stackVersions.editRepositories.validation.warning': 'Some of the repositories failed validation. Make changes to the base url or skip validation if you are sure that urls are correct',