ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From avija...@apache.org
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 GMT
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 <avijayan@hortonworks.com>
Authored: Mon Mar 27 12:44:34 2017 -0700
Committer: Aravindan Vijayan <avijayan@hortonworks.com>
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 <i>cannot be deleted</i>
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;


Mime
View raw message