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 2013/10/28 17:03:09 UTC
git commit: AMBARI-3603. Reassign Master: Links to the wizard are
disabled when respective component service is stopped. (akovalenko)
Updated Branches:
refs/heads/trunk 71226d354 -> 6ed6d64ea
AMBARI-3603. Reassign Master: Links to the wizard are disabled when respective component service is stopped. (akovalenko)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/6ed6d64e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/6ed6d64e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/6ed6d64e
Branch: refs/heads/trunk
Commit: 6ed6d64ea79e1e145ad35ae66c9b82e985ddbc59
Parents: 71226d3
Author: Aleksandr Kovalenko <ol...@ukr.net>
Authored: Mon Oct 28 18:01:13 2013 +0200
Committer: Aleksandr Kovalenko <ol...@ukr.net>
Committed: Mon Oct 28 18:01:13 2013 +0200
----------------------------------------------------------------------
ambari-web/app/templates/main/service/item.hbs | 2 +-
ambari-web/app/views/main/service/item.js | 7 ++++---
2 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/6ed6d64e/ambari-web/app/templates/main/service/item.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/item.hbs b/ambari-web/app/templates/main/service/item.hbs
index 343d151..1764a9d 100644
--- a/ambari-web/app/templates/main/service/item.hbs
+++ b/ambari-web/app/templates/main/service/item.hbs
@@ -49,7 +49,7 @@
<ul class="dropdown-menu">
<!-- dropdown menu links -->
{{#each option in view.maintenance}}
- <li {{bindAttr class="controller.isStopDisabled:disabled"}}>
+ <li {{bindAttr class="option.disabled:disabled"}}>
<a {{action "doAction" option target="controller" href=true}}>{{option.label}}</a>
</li>
{{/each}}
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/6ed6d64e/ambari-web/app/views/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/item.js b/ambari-web/app/views/main/service/item.js
index 6826b35..a75a975 100644
--- a/ambari-web/app/views/main/service/item.js
+++ b/ambari-web/app/views/main/service/item.js
@@ -26,6 +26,7 @@ App.MainServiceItemView = Em.View.extend({
var hosts = App.Host.find().content.length;
var allMasters = this.get('controller.content.hostComponents').filterProperty('isMaster').mapProperty('componentName').uniq();
var reassignableMasters = ['NAMENODE', 'SECONDARY_NAMENODE', 'JOBTRACKER', 'RESOURCEMANAGER'];
+ var disabled = this.get('controller.isStopDisabled');
switch (service.get('serviceName')) {
case 'GANGLIA':
case 'NAGIOS':
@@ -37,15 +38,15 @@ App.MainServiceItemView = Em.View.extend({
allMasters.forEach(function (hostComponent) {
if (reassignableMasters.contains(hostComponent)) {
options.push({action: 'reassignMaster', context: hostComponent,
- 'label': Em.I18n.t('services.service.actions.reassign.master').format(App.format.role(hostComponent))});
+ 'label': Em.I18n.t('services.service.actions.reassign.master').format(App.format.role(hostComponent)), disabled: false});
}
})
}
default:
- options.push({action: 'runSmokeTest', 'label': Em.I18n.t('services.service.actions.run.smoke')});
+ options.push({action: 'runSmokeTest', 'label': Em.I18n.t('services.service.actions.run.smoke'), disabled:disabled});
}
return options;
- }.property('controller.content'),
+ }.property('controller.content', 'controller.isStopDisabled'),
isMaintenanceActive: function() {
return this.get('maintenance').length !== 0;
}.property('maintenance'),