Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 2E9F1200C44 for ; Mon, 27 Mar 2017 21:44:49 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2D604160B85; Mon, 27 Mar 2017 19:44:49 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C1443160B7B for ; Mon, 27 Mar 2017 21:44:47 +0200 (CEST) Received: (qmail 96796 invoked by uid 500); 27 Mar 2017 19:44:47 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 96785 invoked by uid 99); 27 Mar 2017 19:44:46 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Mar 2017 19:44:46 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D79FEDFE34; Mon, 27 Mar 2017 19:44:46 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: avijayan@apache.org To: commits@ambari.apache.org Message-Id: <5bcb1313e8a34e86ba86379bc84e1e6b@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: Revert "AMBARI-20429 - Warn users about pending requests while trying to enable Interactive Query immediately after disabling it (Vivek Subramanian via rzang)" Date: Mon, 27 Mar 2017 19:44:46 +0000 (UTC) archived-at: Mon, 27 Mar 2017 19:44:49 -0000 Repository: ambari Updated Branches: refs/heads/branch-2.5 dd7f46f10 -> 1416bba1b Revert "AMBARI-20429 - Warn users about pending requests while trying to enable Interactive Query immediately after disabling it (Vivek Subramanian via rzang)" This reverts commit dd7f46f10df8b31476bb17e427775c4acf8c303d. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1416bba1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1416bba1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1416bba1 Branch: refs/heads/branch-2.5 Commit: 1416bba1bf2eb046f51afab4827a1e11749f9807 Parents: dd7f46f Author: Aravindan Vijayan Authored: Mon Mar 27 12:44:34 2017 -0700 Committer: Aravindan Vijayan Committed: Mon Mar 27 12:44:34 2017 -0700 ---------------------------------------------------------------------- .../wizard/step7/assign_master_controller.js | 75 ++------------------ ambari-web/app/messages.js | 2 - ambari-web/app/utils/ajax/ajax.js | 4 -- .../configs/widgets/config_widget_view.js | 3 - 4 files changed, 6 insertions(+), 78 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/1416bba1/ambari-web/app/controllers/wizard/step7/assign_master_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/wizard/step7/assign_master_controller.js b/ambari-web/app/controllers/wizard/step7/assign_master_controller.js index b1e3397..e2c5fa6 100644 --- a/ambari-web/app/controllers/wizard/step7/assign_master_controller.js +++ b/ambari-web/app/controllers/wizard/step7/assign_master_controller.js @@ -62,13 +62,15 @@ App.AssignMasterOnStep7Controller = Em.Controller.extend(App.BlueprintMixin, App this.set('configWidgetContext', context); this.set('content', context.get('controller.content')); this.set('configActionComponent', hostComponent); - + var missingDependentServices = this.getAllMissingDependentServices(); + var isNonWizardPage = !this.get('content.controllerName'); switch (action) { case 'ADD': - if (hostComponent.componentName == "HIVE_SERVER_INTERACTIVE") { - this.getPendingBatchRequests(hostComponent); + if (missingDependentServices.length && isNonWizardPage) { + this.showInstallServicesPopup(missingDependentServices); } else { - this.showPopup(hostComponent); + this.set('mastersToCreate', [hostComponent.componentName]); + this.showAssignComponentPopup(); } break; case 'DELETE': @@ -78,71 +80,6 @@ App.AssignMasterOnStep7Controller = Em.Controller.extend(App.BlueprintMixin, App } }, - getPendingBatchRequests: function(hostComponent) { - var self = this; - // Send Ajax request to get status of pending batch requests - App.ajax.send({ - name : 'request_schedule.get.pending', - sender: self, - error : 'pendingBatchRequestsAjaxError', - success: 'pendingBatchRequestsAjaxSuccess', - data: { - hostComponent: hostComponent - } - }); - }, - - pendingBatchRequestsAjaxError: function(data) { - var error = Em.I18n.t('services.service.actions.run.yarnRefreshQueues.error'); - if(data && data.responseText){ - try { - var json = $.parseJSON(data.responseText); - error += json.message; - } catch (err) {} - } - App.showAlertPopup(Em.I18n.t('services.service.actions.run.yarnRefreshQueues.error'), error, null); - }, - - pendingBatchRequestsAjaxSuccess : function(data, opt, params) { - var self = this; - var showAlert = false; - if (data.hasOwnProperty('items') && data.items.length > 0) { - data.items.forEach( function(_item) { - _item.RequestSchedule.batch.batch_requests.forEach( function(batchRequest) { - // Check if a DELETE request on HIVE_SERVER_INTERACTIVE is in progress - if (batchRequest.request_type == "DELETE" && batchRequest.request_uri.indexOf("HIVE_SERVER_INTERACTIVE") > -1) { - showAlert = true; - } - }); - }); - } - if (showAlert) { - App.showAlertPopup(Em.I18n.t('services.service.actions.hsi.alertPopup.header'), Em.I18n.t('services.service.actions.hsi.alertPopup.body'), function() { - var configWidgetContext = self.get('configWidgetContext'); - var config = self.get('configWidgetContext.config'); - configWidgetContext.toggleProperty('controller.forceUpdateBoundaries'); - var value = config.get('initialValue'); - config.set('value', value); - configWidgetContext.setValue(value); - configWidgetContext.sendRequestRorDependentConfigs(config); - this.hide(); - }); - } else { - this.showPopup(params.hostComponent); - } - }, - - showPopup: function(hostComponent) { - var missingDependentServices = this.getAllMissingDependentServices(); - var isNonWizardPage = !this.get('content.controllerName'); - if (missingDependentServices.length && isNonWizardPage) { - this.showInstallServicesPopup(missingDependentServices); - } else { - this.set('mastersToCreate', [hostComponent.componentName]); - this.showAssignComponentPopup(); - } - }, - /** * Used to set showAddControl/showRemoveControl flag * @param componentName http://git-wip-us.apache.org/repos/asf/ambari/blob/1416bba1/ambari-web/app/messages.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 8173ca3..a2a9d60 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -1963,8 +1963,6 @@ Em.I18n.translations = { 'services.service.actions.run.runHawqCheck.label':'Run HAWQ Config Check', 'services.service.actions.manage_configuration_groups.short':'Manage Config Groups', 'services.service.actions.serviceActions':'Service Actions', - 'services.service.actions.hsi.alertPopup.header':'Cannot enable Interactive Query', - 'services.service.actions.hsi.alertPopup.body':'You cannot enable Interactive Query now because Interactive Query is in the process of being disabled. This may take a few minutes. Try again later.', 'services.service.delete.popup.header': 'Delete Service', 'services.service.delete.popup.kerberos': 'The Kerberos Service cannot be deleted because Kerberos is ' + http://git-wip-us.apache.org/repos/asf/ambari/blob/1416bba1/ambari-web/app/utils/ajax/ajax.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js index 70ecb23..8be3b62 100644 --- a/ambari-web/app/utils/ajax/ajax.js +++ b/ambari-web/app/utils/ajax/ajax.js @@ -2326,10 +2326,6 @@ var urls = { 'real': '/clusters/{clusterName}/request_schedules/{request_schedule_id}', 'mock': '' }, - 'request_schedule.get.pending': { - 'real': '/clusters/{clusterName}/request_schedules?fields=*&(RequestSchedule/status.in(SCHEDULED,IN_PROGRESS))', - 'mock': '' - }, 'restart.hostComponents': { 'real': '/clusters/{clusterName}/requests', 'mock': '', http://git-wip-us.apache.org/repos/asf/ambari/blob/1416bba1/ambari-web/app/views/common/configs/widgets/config_widget_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/configs/widgets/config_widget_view.js b/ambari-web/app/views/common/configs/widgets/config_widget_view.js index 3a1e24d..cb5d5b9 100644 --- a/ambari-web/app/views/common/configs/widgets/config_widget_view.js +++ b/ambari-web/app/views/common/configs/widgets/config_widget_view.js @@ -482,9 +482,6 @@ App.ConfigWidgetView = Em.View.extend(App.SupportsDependentConfigs, App.WidgetPo this.set('controller.saveInProgress', true); assignMasterOnStep7Controller.execute(this, 'ADD', hostComponent); } else { - if(hostComponent.componentName == "HIVE_SERVER_INTERACTIVE") { - assignMasterOnStep7Controller.execute(this, 'ADD', hostComponent); - } assignMasterOnStep7Controller.clearComponentsToBeDeleted(hostComponent.componentName); } break;