Updated Branches: refs/heads/trunk 70aa9b085 -> 621079d13
Revert "AMBARI-3632. Need ability to remove hbase master (xiwang)" This reverts commit 0dba52dfc703f44b440945edfd9d2d62f2303735. Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/621079d1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/621079d1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/621079d1 Branch: refs/heads/trunk Commit: 621079d13d0768518fbd9af349746de93dec87b9 Parents: 70aa9b0 Author: Srimanth Gunturi <[email protected]> Authored: Wed Oct 30 18:13:40 2013 -0700 Committer: Srimanth Gunturi <[email protected]> Committed: Wed Oct 30 18:13:40 2013 -0700 ---------------------------------------------------------------------- ambari-web/app/controllers/main/host/details.js | 54 +------------------- ambari-web/app/messages.js | 2 - ambari-web/app/styles/application.less | 10 ---- ambari-web/app/templates/main/host/summary.hbs | 17 ++---- ambari-web/app/views/main/host/summary.js | 13 +---- 5 files changed, 8 insertions(+), 88 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/621079d1/ambari-web/app/controllers/main/host/details.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js index d5bbfa5..ef76e1a 100644 --- a/ambari-web/app/controllers/main/host/details.js +++ b/ambari-web/app/controllers/main/host/details.js @@ -156,61 +156,11 @@ App.MainHostDetailsController = Em.Controller.extend({ } else { App.router.get('clusterController').loadUpdatedStatusDelayed(500); } - if (App.router.get('mainAdminUserSettingsController').loadShowBgChecked()) { - App.router.get('backgroundOperationsController').showPopup(); - } + App.router.get('backgroundOperationsController').showPopup(); }); }, /** - * send command to server to delete selected host component - * - */ - deleteComponent: function (event) { - var self = this; - var component = event.context; - var componentName = component.get('componentName').toUpperCase().toString(); - var displayName = component.get('displayName'); - var numberOfComponents = 0; - var isLastComponent = false; - var allComponents = component.get('service.hostComponents'); - allComponents.forEach(function(component) { - if (component.get('componentName') == componentName) numberOfComponents++; - if (numberOfComponents > 1) return; - }); - if (numberOfComponents == 1) { - isLastComponent = true; - } - App.ModalPopup.show({ - header: Em.I18n.t('popup.confirmation.commonHeader'), - bodyClass: Ember.View.extend({ - templateName: require('templates/main/host/details/deleteComponentPopup') - }), - enablePrimary: false, - lastComponent: function() { - if (isLastComponent) { - this.set('enablePrimary',false); - return true; - } else { - this.set('enablePrimary',true); - return false; - } - }.property(), - lastComponentError: Em.View.extend({ - template: Ember.Handlebars.compile(Em.I18n.t('hosts.host.deleteComponent.popup.warning').format(displayName)) - }), - deleteComponentMsg: function() { - return Em.I18n.t('hosts.host.deleteComponent.popup.msg').format(displayName); - }.property(), - onPrimary: function () { - if (!this.get('enablePrimary')) return; - self._doDeleteHostComponent(component); - this.hide(); - }, - }); - - }, - /** * Deletes the given host component, or all host components. * * @param component When <code>null</code> all host components are deleted. @@ -396,7 +346,7 @@ App.MainHostDetailsController = Em.Controller.extend({ onPrimary: function () { this.hide(); if (component.get('componentName') === 'CLIENTS') { - // Clients component has many sub-components which + // Clients component has many sub-components which // need to be installed. var scs = component.get('subComponentNames'); scs.forEach(function (sc) { http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/621079d1/ambari-web/app/messages.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 8c9568e..be9a725 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -1276,8 +1276,6 @@ Em.I18n.translations = { 'host.host.componentFilter.master':'Master Components', 'host.host.componentFilter.slave':'Slave Components', 'host.host.componentFilter.client':'Client Components', - 'hosts.host.deleteComponent.popup.msg':'Are you sure you want to delete {0}?', - 'hosts.host.deleteComponent.popup.warning':'<b>WARNING!</b> Delete the last <i>{0}</i> component in the cluster?</br>Deleting the last component in the cluster could result in permanent loss of service data.', 'hosts.host.installComponent.msg':'Are you sure you want to install {0}?', 'hosts.host.addComponent.msg':'Are you sure you want to add {0}?', 'hosts.host.addComponent.note':'Note: After this component is installed, go to Services -> Nagios to restart the Nagios service. This is required for the alerts and notifications to work properly.', http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/621079d1/ambari-web/app/styles/application.less ---------------------------------------------------------------------- diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less index 6568d9b..ce55792 100644 --- a/ambari-web/app/styles/application.less +++ b/ambari-web/app/styles/application.less @@ -3016,16 +3016,6 @@ table.graphs { font-style: italic; } } - - .host-components { - .dropdown-menu { - .disabled { - pointer-events: none; - color: #808080; - cursor: default; - } - } - } } .background-operations { http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/621079d1/ambari-web/app/templates/main/host/summary.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/host/summary.hbs b/ambari-web/app/templates/main/host/summary.hbs index 10ab4ca..3c41091 100644 --- a/ambari-web/app/templates/main/host/summary.hbs +++ b/ambari-web/app/templates/main/host/summary.hbs @@ -69,11 +69,11 @@ <span class="caret pull-right"></span> </a> <ul class="dropdown-menu"> - <li> - <div class="component-text-status"> - {{view.componentTextStatus}} - </div> - </li> + <li> + <div class="component-text-status"> + {{view.componentTextStatus}} + </div> + </li> {{#if view.isDataNode}} {{#if view.isDataNodeDecommissionAvailable}} <li {{bindAttr class="view.noActionAvailable"}}> @@ -90,13 +90,6 @@ </li> {{/if}} {{/if}} - {{#if view.isHBaseMaster}} - <li {{bindAttr class="view.isDeleteHBaseMasterDisabled:disabled"}}> - <a href="javascript:void(null)" data-toggle="modal" {{action "deleteComponent" view.content target="controller"}}> - {{t common.delete}} - </a> - </li> - {{/if}} {{#unless view.isInstalling}} {{#if view.isStart}} <li {{bindAttr class=" view.isDecommissioning:hidden view.noActionAvailable"}}> http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/621079d1/ambari-web/app/views/main/host/summary.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/host/summary.js b/ambari-web/app/views/main/host/summary.js index 51ef1a0..b19e41a 100644 --- a/ambari-web/app/views/main/host/summary.js +++ b/ambari-web/app/views/main/host/summary.js @@ -425,18 +425,7 @@ App.MainHostSummaryView = Em.View.extend({ var decommissionHostNames = this.get('decommissionDataNodeHostNames'); var hostName = App.router.get('mainHostDetailsController.content.hostName'); return decommissionHostNames != null && decommissionHostNames.contains(hostName); - }.property('App.router.mainHostDetailsController.content', 'decommissionDataNodeHostNames'), - - /** - * Shows whether we need to show Delete button - */ - isHBaseMaster: function () { - return this.get('content.componentName') === 'HBASE_MASTER'; - }.property('content'), - isDeleteHBaseMasterDisabled: function () { - return !(this.get('workStatus') == App.HostComponentStatus.stopped || this.get('workStatus') == App.HostComponentStatus.unknown || - this.get('workStatus') == App.HostComponentStatus.install_failed || this.get('workStatus') == App.HostComponentStatus.upgrade_failed); - }.property('workStatus'), + }.property('App.router.mainHostDetailsController.content', 'decommissionDataNodeHostNames') }), timeSinceHeartBeat: function () {
