You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2014/08/21 11:47:22 UTC
[1/2] git commit: AMBARI-6969 Add tooltips for BGO window status
icons. (ababiichuk)
Repository: ambari
Updated Branches:
refs/heads/trunk b750cd8f2 -> 3a05d2ca1
AMBARI-6969 Add tooltips for BGO window status icons. (ababiichuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/315bf96e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/315bf96e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/315bf96e
Branch: refs/heads/trunk
Commit: 315bf96e2e216d60b3787dc87e393a478f0026b4
Parents: b750cd8
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Thu Aug 21 12:41:23 2014 +0300
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Thu Aug 21 12:41:23 2014 +0300
----------------------------------------------------------------------
ambari-web/app/messages.js | 1 -
ambari-web/app/utils/host_progress_popup.js | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/315bf96e/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 869ef64..d1ec6ef 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -258,7 +258,6 @@ Em.I18n.translations = {
'hostPopup.header.postFix':' Background Operations Running',
'hostPopup.serviceInfo.showMore':'Show more...',
'hostPopup.bgop.abortRequest.title': 'Abort operation',
- 'hostPopup.abortedOperation.icon.tooltip': 'Operation aborted',
'hostPopup.bgop.abortRequest.confirmation.body': 'Are you sure you want to abort \'{0}\' operation?',
'hostPopup.bgop.abortRequest.reason': 'Aborted by user',
'hostPopup.bgop.abortRequest.modal.header': 'Abort request sent',
http://git-wip-us.apache.org/repos/asf/ambari/blob/315bf96e/ambari-web/app/utils/host_progress_popup.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/host_progress_popup.js b/ambari-web/app/utils/host_progress_popup.js
index c78fbdb..1e2c675 100644
--- a/ambari-web/app/utils/host_progress_popup.js
+++ b/ambari-web/app/utils/host_progress_popup.js
@@ -89,7 +89,7 @@ App.HostPopup = Em.Object.create({
classNameBindings: ['servicesInfo.status', 'servicesInfo.icon', 'additionalClass'],
attributeBindings: ['data-original-title'],
'data-original-title': function() {
- return this.get('servicesInfo.status') == 'aborted' ? Em.I18n.t('hostPopup.abortedOperation.icon.tooltip') : ""
+ return this.get('servicesInfo.status');
}.property('servicesInfo.status'),
didInsertElement: function () {
App.tooltip($(this.get('element')));
[2/2] git commit: AMBARI-6968 Fix server validation to load all hosts
on service confg page. (ababiichuk)
Posted by ab...@apache.org.
AMBARI-6968 Fix server validation to load all hosts on service confg page. (ababiichuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3a05d2ca
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3a05d2ca
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3a05d2ca
Branch: refs/heads/trunk
Commit: 3a05d2ca1ec4a6f4bb74f53b2ffa4a06e39bb291
Parents: 315bf96
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Thu Aug 21 12:42:53 2014 +0300
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Thu Aug 21 12:42:53 2014 +0300
----------------------------------------------------------------------
ambari-web/app/mixins/common/serverValidator.js | 63 ++++++++++++++++----
1 file changed, 50 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/3a05d2ca/ambari-web/app/mixins/common/serverValidator.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/serverValidator.js b/ambari-web/app/mixins/common/serverValidator.js
index a4be042..f809538 100644
--- a/ambari-web/app/mixins/common/serverValidator.js
+++ b/ambari-web/app/mixins/common/serverValidator.js
@@ -43,6 +43,9 @@ App.ServerValidatorMixin = Em.Mixin.create({
*/
recommendationsConfigs: null,
+ loadAdditionalinfo: function() {
+ return !(this.get('content.hosts') && this.get('content.hosts').length);
+ }.property('content.hosts'),
/**
* by default loads data from model otherwise must be overridden as computed property
* refer to \assets\data\stacks\HDP-2.1\recommendations_configs.json to learn structure
@@ -52,10 +55,10 @@ App.ServerValidatorMixin = Em.Mixin.create({
hostNames: function() {
return this.get('content.hosts')
? Object.keys(this.get('content.hosts'))
- : App.HostComponent.find().mapProperty('hostName').uniq();
- }.property('content.hosts'),
-
+ : this.get('allHostNames');
+ }.property('content.hosts', 'allHostNames'),
+ allHostNames: [],
/**
* by default loads data from model otherwise must be overridden as computed property
* @type {Array} - of strings (serviceNames)
@@ -135,21 +138,55 @@ App.ServerValidatorMixin = Em.Mixin.create({
console.error('Load recommendations failed');
},
+ serverSideValidation: function() {
+ var deferred = $.Deferred();
+ if (!App.get('supports.serverRecommendValidate')) {
+ deferred.resolve();
+ } else {
+ this.set('configValidationFailed', false);
+ if (this.get('loadAdditionalinfo')) {
+ var self = this;
+ this.getHostNames().complete(function() {
+ if (self.get('configValidationFailed')) {
+ self.warnUser(deferred);
+ } else {
+ self.runServerSideValidation(deferred);
+ }
+ });
+ } else {
+ this.runServerSideValidation(deferred);
+ }
+ }
+ return deferred;
+ },
+
+ getHostNames: function() {
+ return App.ajax.send({
+ name: 'hosts.all',
+ sender: this,
+ success: 'getHostNamesSuccess',
+ error: 'getHostNamesError'
+ })
+ },
+
+ getHostNamesSuccess: function(data) {
+ this.set("allHostNames", data.items.mapProperty("Hosts.host_name"));
+ },
+
+ getHostNamesError: function() {
+ this.set('configValidationFailed', true);
+ console.error('failed to load hostNames');
+ },
/**
* @method serverSideValidation
* send request to validate configs
* @returns {*}
*/
- serverSideValidation: function() {
+ runServerSideValidation: function(deferred) {
var self = this;
- var deferred = $.Deferred();
- if (!App.get('supports.serverRecommendValidate')) {
- deferred.resolve();
- return deferred;
- }
var recommendations = this.get('hostGroups');
recommendations.blueprint.configurations = blueprintUtils.buildConfisJSON(this.get('services'), this.get('stepConfigs'));
- App.ajax.send({
+ return App.ajax.send({
name: 'config.validations',
sender: this,
data: {
@@ -164,7 +201,6 @@ App.ServerValidatorMixin = Em.Mixin.create({
}).complete(function() {
self.warnUser(deferred);
});
- return deferred;
},
@@ -178,7 +214,6 @@ App.ServerValidatorMixin = Em.Mixin.create({
var self = this;
self.set('configValidationError', false);
self.set('configValidationWarning', false);
- self.set('configValidationFailed', false);
data.resources.forEach(function(r) {
r.items.forEach(function(item){
if (item.type == "configuration") {
@@ -189,7 +224,7 @@ App.ServerValidatorMixin = Em.Mixin.create({
self.set('configValidationError', true);
property.set('errorMessage', item.message);
property.set('error', true);
- } else if (item.level == "ERROR") {
+ } else if (item.level == "WARN") {
self.set('configValidationWarning', true);
property.set('warnMessage', item.message);
property.set('warn', true);
@@ -219,10 +254,12 @@ App.ServerValidatorMixin = Em.Mixin.create({
if (this.get('configValidationFailed')) {
this.set('isSubmitDisabled', false);
this.set("isApplyingChanges", false);
+ deferred.reject();
return App.showAlertPopup(Em.I18n.t('installer.step7.popup.validation.failed.header'), Em.I18n.t('installer.step7.popup.validation.request.failed.body'));
} else if (this.get('configValidationError')) {
this.set("isApplyingChanges", false);
this.set('isSubmitDisabled', true);
+ deferred.reject();
return App.showAlertPopup(Em.I18n.t('installer.step7.popup.validation.failed.header'), Em.I18n.t('installer.step7.popup.validation.failed.body'));
} else if (this.get('configValidationWarning')) {
this.set('isSubmitDisabled', true);