Repository: ambari Updated Branches: refs/heads/trunk ef4f7720d -> 89b64a03f
AMBARI-5410. Provide Flume service actions. (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/89b64a03 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/89b64a03 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/89b64a03 Branch: refs/heads/trunk Commit: 89b64a03f3a73f587c2c2cf2f5f109719de7803b Parents: ef4f772 Author: Aleksandr Kovalenko <[email protected]> Authored: Wed Apr 9 18:17:54 2014 +0300 Committer: Aleksandr Kovalenko <[email protected]> Committed: Wed Apr 9 18:19:52 2014 +0300 ---------------------------------------------------------------------- ambari-web/app/controllers/main/service/item.js | 4 --- ambari-web/app/templates/main/service/item.hbs | 30 +++++++++----------- ambari-web/app/views/main/service/item.js | 5 +++- 3 files changed, 18 insertions(+), 21 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/89b64a03/ambari-web/app/controllers/main/service/item.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/service/item.js b/ambari-web/app/controllers/main/service/item.js index dff7fd7..85883ee 100644 --- a/ambari-web/app/controllers/main/service/item.js +++ b/ambari-web/app/controllers/main/service/item.js @@ -335,10 +335,6 @@ App.MainServiceItemController = Em.Controller.extend({ } }.observes('App.router.backgroundOperationsController.serviceTimestamp'), - isServiceRestartable: function() { - return this.get('content.serviceName') !== "FLUME"; - }.property('content.serviceName'), - isStartDisabled: function () { if(this.get('isPending')) return true; return !(this.get('content.healthStatus') == 'red'); http://git-wip-us.apache.org/repos/asf/ambari/blob/89b64a03/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 41c77da..9a116d9 100644 --- a/ambari-web/app/templates/main/service/item.hbs +++ b/ambari-web/app/templates/main/service/item.hbs @@ -51,22 +51,20 @@ <!-- Start/Stop service actions --> {{#unless controller.content.isClientsOnly}} - {{#if controller.isServiceRestartable}} - <li {{bindAttr class="controller.isStartDisabled:disabled"}}> - <a href="javascript:void(null)" {{bindAttr class="controller.isStartDisabled:disabled" }} - {{action "startService" target="controller"}}> - <i {{bindAttr class=":icon-play controller.isStartDisabled:disabled:enabled" }}></i> - {{t services.service.start}} - </a> - </li> - <li {{bindAttr class="controller.isStopDisabled:disabled"}}> - <a href="javascript:void(null)" {{bindAttr class="controller.isStopDisabled:disabled" }} - data-toggle="modal" {{action "stopService" target="controller"}}> - <i {{bindAttr class=":icon-stop controller.isStopDisabled:disabled:enabled" }}></i> - {{t services.service.stop}} - </a> - </li> - {{/if}} + <li {{bindAttr class="controller.isStartDisabled:disabled"}}> + <a href="javascript:void(null)" {{bindAttr class="controller.isStartDisabled:disabled" }} + {{action "startService" target="controller"}}> + <i {{bindAttr class=":icon-play controller.isStartDisabled:disabled:enabled" }}></i> + {{t services.service.start}} + </a> + </li> + <li {{bindAttr class="controller.isStopDisabled:disabled"}}> + <a href="javascript:void(null)" {{bindAttr class="controller.isStopDisabled:disabled" }} + data-toggle="modal" {{action "stopService" target="controller"}}> + <i {{bindAttr class=":icon-stop controller.isStopDisabled:disabled:enabled" }}></i> + {{t services.service.stop}} + </a> + </li> {{/unless}} <!-- Other service actions --> http://git-wip-us.apache.org/repos/asf/ambari/blob/89b64a03/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 da08140..4cce974 100644 --- a/ambari-web/app/views/main/service/item.js +++ b/ambari-web/app/views/main/service/item.js @@ -28,9 +28,9 @@ App.MainServiceItemView = Em.View.extend({ var allMasters = this.get('controller.content.hostComponents').filterProperty('isMaster').mapProperty('componentName').uniq(); var disabled = this.get('controller.isStopDisabled'); var serviceName = service.get('serviceName'); + var disableRefreshConfgis = !service.get('isRestartRequired'); if (service.get('isClientsOnly')) { - var disableRefreshConfgis = !service.get('isRestartRequired'); if (serviceName != 'TEZ') { options.push({action: 'runSmokeTest', cssClass: 'icon-thumbs-up-alt', 'label': Em.I18n.t('services.service.actions.run.smoke')}); } @@ -44,6 +44,9 @@ App.MainServiceItemView = Em.View.extend({ var label = Em.I18n.t('rollingrestart.dialog.title').format(App.format.role(rrComponentName)); options.push({action:'rollingRestart', cssClass: 'icon-time', context: rrComponentName, 'label': label, disabled: false}); } + if (serviceName == 'FLUME') { + options.push({action: 'refreshConfigs', cssClass: 'icon-refresh', 'label': Em.I18n.t('hosts.host.details.refreshConfigs'), disabled: disableRefreshConfgis}); + } // Service Check and Reassign Master actions switch (serviceName) { case 'GANGLIA':
