|
@@ -1160,6 +1160,7 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
|
|
sender: this,
|
|
sender: this,
|
|
data: data,
|
|
data: data,
|
|
success: 'installRepoVersionSuccess',
|
|
success: 'installRepoVersionSuccess',
|
|
|
|
+ error: 'installRepoVersionError',
|
|
callback: function() {
|
|
callback: function() {
|
|
this.sender.set('requestInProgress', false);
|
|
this.sender.set('requestInProgress', false);
|
|
}
|
|
}
|
|
@@ -1311,6 +1312,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
|
|
* opens a popup with installations state per host
|
|
* @param {Em.Object} version
|
|
* @param {Em.Object} version
|