ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject git commit: AMBARI-5726. Adding Oozie failed at service check. (jaimin)
Date Sat, 10 May 2014 03:10:46 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk db211f907 -> f9f5b2b03


AMBARI-5726. Adding Oozie failed at service check. (jaimin)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f9f5b2b0
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f9f5b2b0
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f9f5b2b0

Branch: refs/heads/trunk
Commit: f9f5b2b0307f2cfdc87f891d1fa5cf0a2dd7a259
Parents: db211f9
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Fri May 9 20:09:07 2014 -0700
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Fri May 9 20:10:24 2014 -0700

----------------------------------------------------------------------
 .../app/controllers/wizard/step10_controller.js | 12 +++++--
 .../app/controllers/wizard/step9_controller.js  | 38 ++++++++++++++------
 ambari-web/app/messages.js                      | 10 ++++--
 ambari-web/app/styles/application.less          |  6 ++++
 .../main/host/details/doDeleteHostPopup.hbs     |  6 ++--
 ambari-web/app/templates/wizard/step10.hbs      |  6 ++--
 ambari-web/app/utils/ajax/ajax.js               | 15 ++++++++
 ambari-web/app/views/wizard/step10_view.js      | 13 ++++++-
 8 files changed, 84 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f9f5b2b0/ambari-web/app/controllers/wizard/step10_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step10_controller.js b/ambari-web/app/controllers/wizard/step10_controller.js
index c73f403..bd1f04d 100644
--- a/ambari-web/app/controllers/wizard/step10_controller.js
+++ b/ambari-web/app/controllers/wizard/step10_controller.js
@@ -27,12 +27,20 @@ App.WizardStep10Controller = Em.Controller.extend({
   clusterInfo: [],
 
   /**
-   * Show message about required Nagios restart if installWizard used and Nagios is installed
+   * Show message about required Nagios restart if AddHostWizard or AddServiceWizard used
and Nagios is installed
    * @type {bool}
    */
   isNagiosRestartRequired: function () {
     return this.get('content.controllerName') !== 'installerController' && App.Service.find('NAGIOS').get('isLoaded');
-  }.property(),
+  }.property('content.controllerName'),
+
+  /**
+   * is Add service wizard the ongoing wizard
+   * @type {bool}
+   */
+  isAddServiceWizard: function () {
+    return this.get('content.controllerName') === 'addServiceController';
+  }.property('content.controllerName'),
 
   /**
    * Clear <code>clusterInfo</code>

http://git-wip-us.apache.org/repos/asf/ambari/blob/f9f5b2b0/ambari-web/app/controllers/wizard/step9_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step9_controller.js b/ambari-web/app/controllers/wizard/step9_controller.js
index 8494a87..5a17326 100644
--- a/ambari-web/app/controllers/wizard/step9_controller.js
+++ b/ambari-web/app/controllers/wizard/step9_controller.js
@@ -434,17 +434,12 @@ App.WizardStep9Controller = Em.Controller.extend({
    * @method launchStartServices
    */
   launchStartServices: function () {
-    var data = {
-      "RequestInfo": {
-        "context": Em.I18n.t("requestInfo.startServices")
-      },
-      "Body": {
-        "ServiceInfo": { "state": "STARTED" }
-      }
-    };
-    var name = 'wizard.step9.installer.launch_start_services';
+    var data = {};
+    var name = '';
+    var servicesList = [];
 
     if (this.get('content.controllerName') === 'addHostController') {
+      name = 'wizard.step9.add_host.launch_start_services';
       var hostnames = [];
       for (var hostname in this.get('wizardController').getDBProperty('hosts')) {
         hostnames.push(hostname);
@@ -458,7 +453,27 @@ App.WizardStep9Controller = Em.Controller.extend({
           "HostRoles": { "state": "STARTED" }
         }
       };
-      name = 'wizard.step9.add_host.launch_start_services';
+    } else if (this.get('content.controllerName') === 'addServiceController') {
+      servicesList = this.get('content.services').filterProperty('isSelected', true).filterProperty('isDisabled',
false).mapProperty('serviceName');
+      name = 'wizard.step9.add_service.launch_start_services';
+      data = {
+        "RequestInfo": {
+          "context": Em.I18n.t("requestInfo.startAddedServices")
+        },
+        "Body": {
+          "ServiceInfo": { "state": "STARTED" }
+        }
+      };
+    } else {
+      name = 'wizard.step9.installer.launch_start_services';
+      data = {
+        "RequestInfo": {
+          "context": Em.I18n.t("requestInfo.startServices")
+        },
+        "Body": {
+          "ServiceInfo": { "state": "STARTED" }
+        }
+      };
     }
     data = JSON.stringify(data);
     if (App.testMode) {
@@ -470,7 +485,8 @@ App.WizardStep9Controller = Em.Controller.extend({
       sender: this,
       data: {
         data: data,
-        cluster: this.get('content.cluster.name')
+        cluster: this.get('content.cluster.name'),
+        servicesList: servicesList    // used only for Add Service wizard
       },
       success: 'launchStartServicesSuccessCallback',
       error: 'launchStartServicesErrorCallback'

http://git-wip-us.apache.org/repos/asf/ambari/blob/f9f5b2b0/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 2b6a054..ca273c7 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -176,7 +176,7 @@ Em.I18n.translations = {
   'common.persist.error' : 'Error in persisting web client state at ambari server:',
   'common.update.error' : 'Error in retrieving web client state from ambari server',
   'common.tags': 'Tags',
-  'common.important': 'Important',
+  'common.important': '<strong>Important:</strong>',
   'common.allServices':'All Services',
   'common.move':'Move',
   'common.change': 'Change',
@@ -215,6 +215,7 @@ Em.I18n.translations = {
   'requestInfo.installComponents':'Install Components',
   'requestInfo.installServices':'Install Services',
   'requestInfo.startServices':'Start Services',
+  'requestInfo.startAddedServices':'Start Added Services',
   'requestInfo.stopAllServices':'Stop All Services',
   'requestInfo.startAllServices':'Start All Services',
   'requestInfo.startHostComponent':'Start',
@@ -673,7 +674,12 @@ Em.I18n.translations = {
 
   'installer.step10.header':'Summary',
   'installer.step10.body':'Here is the summary of the install process.',
-  'installer.step10.nagiosRestartRequired':'<b>Important!</b> Restarting Nagios
service is required for alerts and notifications to work properly.  After clicking on the
Complete button to dismiss this wizard, go to <i>Services -> Nagios</i> to
restart the Nagios service.',
+  'installer.step10.nagiosRestartRequired':' Restarting Nagios service is required for alerts
and ' +
+    'notifications to work properly.  After clicking on the Complete button to dismiss this
wizard, go to ' +
+    '<i>Services -> Nagios</i> to restart the Nagios service.',
+  'installer.step10.staleServicesRestartRequired':' You may also need to restart other services
for the newly added ' +
+    'services to function properly (for example, HDFS and YARN/MapReduce need to be restarted
after adding Oozie). After closing this ' +
+    'wizard, please restart all services that have the restart indicator <i class="icon-refresh"></i>
next to the service name.',
   'installer.step10.hostsSummary':'The cluster consists of {0} hosts',
   'installer.step10.servicesSummary':'Installed and started services successfully on {0}
new ',
   'installer.step10.warnings':' warnings',

http://git-wip-us.apache.org/repos/asf/ambari/blob/f9f5b2b0/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index 22f50a2..21bce9f 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -5087,6 +5087,12 @@ ul.inline li {
   }
 }
 
+#step10-alert-message {
+  .icon-refresh {
+    color: @restart-indicator-color;
+  }
+}
+
 #step10-content {
   ul {
     li {

http://git-wip-us.apache.org/repos/asf/ambari/blob/f9f5b2b0/ambari-web/app/templates/main/host/details/doDeleteHostPopup.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host/details/doDeleteHostPopup.hbs b/ambari-web/app/templates/main/host/details/doDeleteHostPopup.hbs
index 124409e..fb7ab1d 100644
--- a/ambari-web/app/templates/main/host/details/doDeleteHostPopup.hbs
+++ b/ambari-web/app/templates/main/host/details/doDeleteHostPopup.hbs
@@ -33,11 +33,11 @@
     </div>
 {{/if}}
 <br />
-<div class='alert'><strong>{{t common.important}}:</strong>
+<div class='alert'>{{{t common.important}}}
   {{#if unknownComponents}}
     {{t hosts.delete.popup.body.msg.unknownComponents}}
   {{/if}}
   {{t hosts.delete.popup.body.msg1}}
 </div>
-<div class='alert'><strong>{{t common.important}}:</strong> {{t hosts.delete.popup.body.msg2}}</div>
-<div class='alert'><strong>{{t common.important}}:</strong> {{t hosts.delete.popup.body.msg3}}</div>
+<div class='alert'>{{{t common.important}}} {{t hosts.delete.popup.body.msg2}}</div>
+<div class='alert'>{{{t common.important}}} {{t hosts.delete.popup.body.msg3}}</div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/f9f5b2b0/ambari-web/app/templates/wizard/step10.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/wizard/step10.hbs b/ambari-web/app/templates/wizard/step10.hbs
index 80afa5c..f5ebaed 100644
--- a/ambari-web/app/templates/wizard/step10.hbs
+++ b/ambari-web/app/templates/wizard/step10.hbs
@@ -17,9 +17,9 @@
 }}
 
 <h2>{{t installer.step10.header}}</h2>
-{{#if isNagiosRestartRequired}}
-  <div class="alert alert-danger">
-    {{t installer.step10.nagiosRestartRequired}}
+{{#if view.serviceRestartText}}
+  <div id="step10-alert-message" class="alert alert-danger">
+    {{{view.serviceRestartText}}}
   </div>
 {{/if}}
 <div class="alert alert-info">

http://git-wip-us.apache.org/repos/asf/ambari/blob/f9f5b2b0/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 9bebd3e..8eb916d 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -1420,6 +1420,21 @@ var urls = {
       return d;
     }
   },
+  'wizard.step9.add_service.launch_start_services': {
+    'real': '/clusters/{cluster}/services?ServiceInfo/state=INSTALLED&ServiceInfo/service_name.in({servicesList})&params/reconfigure_client=false',
+    'mock': '/data/wizard/deploy/5_hosts/poll_6.json',
+    'format': function (data) {
+      var d = {
+        type: 'PUT',
+        async: false,
+        data: data.data
+      };
+      if (App.testMode) {
+        d.type = 'GET';
+      }
+      return d;
+    }
+  },
   'wizard.step9.add_host.launch_start_services': {
     'real': '/clusters/{cluster}/host_components',
     'mock': '/data/wizard/deploy/5_hosts/poll_6.json',

http://git-wip-us.apache.org/repos/asf/ambari/blob/f9f5b2b0/ambari-web/app/views/wizard/step10_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step10_view.js b/ambari-web/app/views/wizard/step10_view.js
index a48353b..16f7a5e 100644
--- a/ambari-web/app/views/wizard/step10_view.js
+++ b/ambari-web/app/views/wizard/step10_view.js
@@ -25,6 +25,17 @@ App.WizardStep10View = Em.View.extend({
 
   didInsertElement: function () {
     this.get('controller').loadStep();
-  }
+  },
 
+  serviceRestartText: function () {
+    var controller = this.get('controller');
+    if (controller.get('isNagiosRestartRequired') && controller.get('isAddServiceWizard'))
+      return Em.I18n.t('common.important')  + Em.I18n.t('installer.step10.nagiosRestartRequired')
+ Em.I18n.t('installer.step10.staleServicesRestartRequired');
+    else if (controller.get('isNagiosRestartRequired'))
+      return Em.I18n.t('common.important') + Em.I18n.t('installer.step10.nagiosRestartRequired');
+    else if (controller.get('isAddServiceWizard'))
+      return Em.I18n.t('common.important') + Em.I18n.t('installer.step10.staleServicesRestartRequired');
+    else
+      return '';
+  }.property('controller.isNagiosRestartRequired','controller.isAddServiceWizard')
 });
\ No newline at end of file


Mime
View raw message