You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2015/04/29 00:30:45 UTC

[1/2] ambari git commit: AMBARI-10792. While host is being registered can click Next button (alexantonenko)

Repository: ambari
Updated Branches:
  refs/heads/trunk 2cf8030e3 -> d0290c095


AMBARI-10792. While host is being registered can click Next button (alexantonenko)


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

Branch: refs/heads/trunk
Commit: d0290c095db04620f10fca7f2365852ae2654158
Parents: fcdc218
Author: Alex Antonenko <hi...@gmail.com>
Authored: Wed Apr 29 01:30:06 2015 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Wed Apr 29 01:30:40 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/wizard/step3_controller.js | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d0290c09/ambari-web/app/controllers/wizard/step3_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step3_controller.js b/ambari-web/app/controllers/wizard/step3_controller.js
index 9e08c39..8f89920 100644
--- a/ambari-web/app/controllers/wizard/step3_controller.js
+++ b/ambari-web/app/controllers/wizard/step3_controller.js
@@ -398,6 +398,7 @@ App.WizardStep3Controller = Em.Controller.extend(App.ReloadPopupMixin, {
     this.set('registrationStartedAt', null);
     this.set('isHostsWarningsLoaded', false);
     this.set('stopChecking', false);
+    this.set('isSubmitDisabled', true);
     if (this.get('content.installOptions.manualInstall')) {
       this.startRegistration();
     } else {


[2/2] ambari git commit: AMBARI-10806. Execute service cheks during deploy only if skip.service.checks=false (alexantonenko)

Posted by al...@apache.org.
AMBARI-10806. Execute service cheks during deploy only if skip.service.checks=false (alexantonenko)


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

Branch: refs/heads/trunk
Commit: fcdc218d60476bdb6871979a7579dcf03935ae01
Parents: 2cf8030
Author: Alex Antonenko <hi...@gmail.com>
Authored: Wed Apr 29 00:36:06 2015 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Wed Apr 29 01:30:40 2015 +0300

----------------------------------------------------------------------
 .../data/requests/host_check/jdk_name.json      | 12 -------
 .../app/assets/data/services/ambari_server.json | 12 +++++--
 .../controllers/global/cluster_controller.js    |  5 ++-
 ambari-web/app/controllers/installer.js         |  5 ++-
 ambari-web/app/controllers/main.js              |  5 ++-
 .../app/controllers/wizard/step3_controller.js  |  5 ++-
 .../app/controllers/wizard/step7_controller.js  |  5 ++-
 .../app/controllers/wizard/step9_controller.js  | 36 ++++++++++++++++++--
 ambari-web/app/routes/installer.js              | 16 +++++----
 ambari-web/app/utils/ajax/ajax.js               | 18 +---------
 10 files changed, 74 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/fcdc218d/ambari-web/app/assets/data/requests/host_check/jdk_name.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/requests/host_check/jdk_name.json b/ambari-web/app/assets/data/requests/host_check/jdk_name.json
deleted file mode 100644
index f5d6f71..0000000
--- a/ambari-web/app/assets/data/requests/host_check/jdk_name.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-  "href" : "http://c6404.ambari.apache.org:8080/api/v1/services/AMBARI/components/AMBARI_SERVER?fields=RootServiceComponents/properties/jdk.name,RootServiceComponents/properties/java.home,RootServiceComponents/properties/jdk_location",
-  "RootServiceComponents" : {
-    "component_name" : "AMBARI_SERVER",
-    "service_name" : "AMBARI",
-    "properties" : {
-      "java.home" : "/usr/jdk64/jdk1.7.0_58",
-      "jdk_location" : "http://c6404.ambari.apache.org:8080/resources/",
-      "jdk.name": "jdk-7u67-linux-x64.tar.gz"
-    }
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/fcdc218d/ambari-web/app/assets/data/services/ambari_server.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/services/ambari_server.json b/ambari-web/app/assets/data/services/ambari_server.json
index 567feb6..8abe331 100644
--- a/ambari-web/app/assets/data/services/ambari_server.json
+++ b/ambari-web/app/assets/data/services/ambari_server.json
@@ -1,6 +1,14 @@
 {
   "RootServiceComponents" : {
-    "properties" : {},
-    "component_version": '1.5.0'
+    "component_name" : "AMBARI_SERVER",
+    "service_name" : "AMBARI",
+    "properties" : {
+      "skip.service.checks" : "false",
+      "java.home" : "/usr/jdk64/jdk1.7.0_58",
+      "jdk_location" : "http://c6404.ambari.apache.org:8080/resources/",
+      "jdk.name": "jdk-7u67-linux-x64.tar.gz",
+      "server.os_type": "redhat"
+    },
+    "component_version": "1.5.0"
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/fcdc218d/ambari-web/app/controllers/global/cluster_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/cluster_controller.js b/ambari-web/app/controllers/global/cluster_controller.js
index 1dafc13..954f155 100644
--- a/ambari-web/app/controllers/global/cluster_controller.js
+++ b/ambari-web/app/controllers/global/cluster_controller.js
@@ -126,8 +126,11 @@ App.ClusterController = Em.Controller.extend({
 
   getServerClock: function () {
     return App.ajax.send({
-      name: 'ambari.service.load_server_clock',
+      name: 'ambari.service',
       sender: this,
+      data: {
+        fields: '?fields=RootServiceComponents/server_clock'
+      },
       success: 'getServerClockSuccessCallback',
       error: 'getServerClockErrorCallback'
     });

http://git-wip-us.apache.org/repos/asf/ambari/blob/fcdc218d/ambari-web/app/controllers/installer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js
index 523963a..bf11c09 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -331,8 +331,11 @@ App.InstallerController = App.WizardController.extend({
   },
   getServerVersion: function () {
     return App.ajax.send({
-      name: 'ambari.service.load_server_version',
+      name: 'ambari.service',
       sender: this,
+      data: {
+        fields: '?fields=RootServiceComponents/component_version,RootServiceComponents/properties/server.os_family&minimal_response=true'
+      },
       success: 'getServerVersionSuccessCallback',
       error: 'getServerVersionErrorCallback'
     });

http://git-wip-us.apache.org/repos/asf/ambari/blob/fcdc218d/ambari-web/app/controllers/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main.js b/ambari-web/app/controllers/main.js
index 8092ea2..09ae8df 100644
--- a/ambari-web/app/controllers/main.js
+++ b/ambari-web/app/controllers/main.js
@@ -134,8 +134,11 @@ App.MainController = Em.Controller.extend({
   },
   getServerVersion: function(){
     return App.ajax.send({
-      name: 'ambari.service.load_server_version',
+      name: 'ambari.service',
       sender: this,
+      data: {
+        fields: '?fields=RootServiceComponents/component_version,RootServiceComponents/properties/server.os_family&minimal_response=true'
+      },
       success: 'getServerVersionSuccessCallback',
       error: 'getServerVersionErrorCallback'
     });

http://git-wip-us.apache.org/repos/asf/ambari/blob/fcdc218d/ambari-web/app/controllers/wizard/step3_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step3_controller.js b/ambari-web/app/controllers/wizard/step3_controller.js
index 34a2728..9e08c39 100644
--- a/ambari-web/app/controllers/wizard/step3_controller.js
+++ b/ambari-web/app/controllers/wizard/step3_controller.js
@@ -745,8 +745,11 @@ App.WizardStep3Controller = Em.Controller.extend(App.ReloadPopupMixin, {
    */
   getJDKName: function () {
     return App.ajax.send({
-      name: 'ambari.service.load_jdk_name',
+      name: 'ambari.service',
       sender: this,
+      data: {
+        fields : '?fields=RootServiceComponents/properties/jdk.name,RootServiceComponents/properties/java.home,RootServiceComponents/properties/jdk_location'
+      },
       success: 'getJDKNameSuccessCallback'
     });
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/fcdc218d/ambari-web/app/controllers/wizard/step7_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js
index 86a3a39..7a069e9 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -1137,7 +1137,10 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E
   checkMySQLHost: function () {
     // get ambari database type and hostname
     return App.ajax.send({
-      name: 'config.ambari.database.info',
+      name: 'ambari.service',
+      data: {
+        fields : "?fields=hostComponents/RootServiceHostComponents/properties/server.jdbc.database_name,hostComponents/RootServiceHostComponents/properties/server.jdbc.url"
+      },
       sender: this,
       success: 'getAmbariDatabaseSuccess'
     });

http://git-wip-us.apache.org/repos/asf/ambari/blob/fcdc218d/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 4422f3f..67ed385 100644
--- a/ambari-web/app/controllers/wizard/step9_controller.js
+++ b/ambari-web/app/controllers/wizard/step9_controller.js
@@ -97,6 +97,8 @@ App.WizardStep9Controller = Em.Controller.extend(App.ReloadPopupMixin, {
    */
   status: 'info',
 
+  skipServiceChecks: false,
+
   /**
    * This computed property is used to determine if the Next button and back button on the page should be disabled. The property is
    * used in the template to grey out Next and Back buttons. Although clicking on the greyed out button do trigger the event and
@@ -497,7 +499,7 @@ App.WizardStep9Controller = Em.Controller.extend(App.ReloadPopupMixin, {
         data = {
           "context": Em.I18n.t("requestInfo.startServices"),
           "ServiceInfo": { "state": "STARTED" },
-          "urlParams": "ServiceInfo/state=INSTALLED&params/run_smoke_test=true&params/reconfigure_client=false"
+          "urlParams": "ServiceInfo/state=INSTALLED&params/run_smoke_test=" + !this.get('skipServiceChecks') + "&params/reconfigure_client=false"
         };
     }
 
@@ -1101,7 +1103,7 @@ App.WizardStep9Controller = Em.Controller.extend(App.ReloadPopupMixin, {
         error: 'isAllComponentsInstalledErrorCallback'
       }).complete(function(){
           dfd.resolve();
-        });
+      });
     }
     return dfd.promise();
   },
@@ -1189,6 +1191,36 @@ App.WizardStep9Controller = Em.Controller.extend(App.ReloadPopupMixin, {
     if (!App.get('testMode')) {
       App.router.get(this.get('content.controllerName')).saveInstalledHosts(context);
     }
+  },
+
+  /**
+   * Load ambari property to determine if we should run service checks on deploy
+   */
+  loadDoServiceChecksFlag: function () {
+    var def = $.Deferred();
+    App.ajax.send({
+      name: 'ambari.service',
+      sender: this,
+      data: {
+        fields: '?fields=RootServiceComponents/properties/skip.service.checks'
+      },
+      success: 'loadDoServiceChecksFlagSuccessCallback'
+    }).complete(function(){
+      def.resolve();
+    });
+    return def.promise();
+  },
+
+  /**
+   *  Callback function Load ambari property to determine if we should run service checks on deploy
+   * @param {Object} data
+   * @method loadDoServiceChecksFlagSuccessCallback
+   */
+  loadDoServiceChecksFlagSuccessCallback: function (data) {
+    var properties = Em.get(data, 'RootServiceComponents.properties');
+    if(properties.hasOwnProperty('skip.service.checks')){
+      this.set('skipServiceChecks', properties['skip.service.checks'] === 'true');
+    }
   }
 
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/fcdc218d/ambari-web/app/routes/installer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/installer.js b/ambari-web/app/routes/installer.js
index 7af829f..1b6e286 100644
--- a/ambari-web/app/routes/installer.js
+++ b/ambari-web/app/routes/installer.js
@@ -351,15 +351,17 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
     route: '/step9',
     connectOutlets: function (router, context) {
       console.log('in installer.step9:connectOutlets');
-      var controller = router.get('installerController');
+      var controller = router.get('installerController'),
+          wizardStep9Controller = router.get('wizardStep9Controller');
       controller.setCurrentStep('9');
       controller.loadAllPriorSteps().done(function () {
-        if (!App.get('testMode')) {
-          controller.setLowerStepsDisable(9);
-        }
-        var wizardStep9Controller = router.get('wizardStep9Controller');
-        wizardStep9Controller.set('wizardController', controller);
-        controller.connectOutlet('wizardStep9', controller.get('content'));
+        wizardStep9Controller.loadDoServiceChecksFlag().done(function () {
+          if (!App.get('testMode')) {
+            controller.setLowerStepsDisable(9);
+          }
+          wizardStep9Controller.set('wizardController', controller);
+          controller.connectOutlet('wizardStep9', controller.get('content'));
+        });
       });
     },
     back: Em.Router.transitionTo('step8'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/fcdc218d/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 9911562..8cdc12e 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -725,10 +725,6 @@ var urls = {
     'real': '/clusters/{clusterName}?fields=Clusters/desired_configs,config_groups/*{urlParams}',
     'mock': '/data/clusters/tags_and_groups.json'
   },
-  'config.ambari.database.info': {
-    'real': '/services/AMBARI/components/AMBARI_SERVER?fields=hostComponents/RootServiceHostComponents/properties/server.jdbc.database_name,hostComponents/RootServiceHostComponents/properties/server.jdbc.url',
-    'mock': ''
-  },
   'config_groups.all_fields': {
     'real': '/clusters/{clusterName}/config_groups?fields=*',
     'mock': ''
@@ -1937,22 +1933,10 @@ var urls = {
     'real': '/logout',
     'mock': ''
   },
-  'ambari.service.load_jdk_name': {
-    'real': '/services/AMBARI/components/AMBARI_SERVER?fields=RootServiceComponents/properties/jdk.name,RootServiceComponents/properties/java.home,RootServiceComponents/properties/jdk_location',
-    'mock': '/data/requests/host_check/jdk_name.json'
-  },
-  'ambari.service.load_server_version': {
-    'real': '/services/AMBARI/components/AMBARI_SERVER?fields=RootServiceComponents/component_version,RootServiceComponents/properties/server.os_family&minimal_response=true',
-    'mock': '/data/ambari_components/component_version.json'
-  },
   'ambari.service': {
-    'real': '/services/AMBARI/components/AMBARI_SERVER',
+    'real': '/services/AMBARI/components/AMBARI_SERVER{fields}',
     'mock': '/data/services/ambari_server.json'
   },
-  'ambari.service.load_server_clock': {
-    'real': '/services/AMBARI/components/AMBARI_SERVER?fields=RootServiceComponents/server_clock',
-    'mock': ''
-  },
 
   'config_groups.create': {
     'real': '/clusters/{clusterName}/config_groups',