You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2015/01/02 19:55:19 UTC

ambari git commit: AMBARI-8421. "New MySQL Database" hive database option should not be displayed for suse11. (2nd patch) (jaimin)

Repository: ambari
Updated Branches:
  refs/heads/trunk 4aa2090ad -> 50342566d


AMBARI-8421. "New MySQL Database" hive database option should not be displayed for suse11. (2nd patch) (jaimin)


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

Branch: refs/heads/trunk
Commit: 50342566d51457147b0926ec30448eb4c4d4ff4b
Parents: 4aa2090
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Fri Jan 2 10:54:21 2015 -0800
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Fri Jan 2 10:54:21 2015 -0800

----------------------------------------------------------------------
 ambari-web/app/controllers/installer.js       |  2 +-
 ambari-web/app/controllers/main.js            |  2 +-
 ambari-web/app/utils/ajax/ajax.js             |  2 +-
 ambari-web/app/utils/config.js                |  6 +++---
 ambari-web/test/controllers/installer_test.js | 10 +++++-----
 ambari-web/test/controllers/main_test.js      | 10 +++++-----
 ambari-web/test/utils/config_test.js          | 10 +++++-----
 7 files changed, 21 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/50342566/ambari-web/app/controllers/installer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js
index 8ae7225..953a647 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -345,7 +345,7 @@ App.InstallerController = App.WizardController.extend({
     } else {
       this.set('isServerClientVersionMismatch', false);
     }
-    App.set('isManagedMySQLForHiveEnabled', App.config.isManagedMySQLForHiveAllowed(data.RootServiceComponents.properties['server.os_type']));
+    App.set('isManagedMySQLForHiveEnabled', App.config.isManagedMySQLForHiveAllowed(data.RootServiceComponents.properties['server.os_family']));
   },
   getServerVersionErrorCallback: function () {
     console.log('ERROR: Cannot load Ambari server version');

http://git-wip-us.apache.org/repos/asf/ambari/blob/50342566/ambari-web/app/controllers/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main.js b/ambari-web/app/controllers/main.js
index d3d70ad..8092ea2 100644
--- a/ambari-web/app/controllers/main.js
+++ b/ambari-web/app/controllers/main.js
@@ -150,7 +150,7 @@ App.MainController = Em.Controller.extend({
     } else {
       this.set('isServerClientVersionMismatch', false);
     }
-    App.set('isManagedMySQLForHiveEnabled', App.config.isManagedMySQLForHiveAllowed(data.RootServiceComponents.properties['server.os_type']));
+    App.set('isManagedMySQLForHiveEnabled', App.config.isManagedMySQLForHiveAllowed(data.RootServiceComponents.properties['server.os_family']));
   },
   getServerVersionErrorCallback: function () {
     console.log('ERROR: Cannot load Ambari server version');

http://git-wip-us.apache.org/repos/asf/ambari/blob/50342566/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 f60ff5d..1024d09 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -1687,7 +1687,7 @@ var urls = {
     '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_type&minimal_response=true',
+    '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': {

http://git-wip-us.apache.org/repos/asf/ambari/blob/50342566/ambari-web/app/utils/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index 4d6fe89..2045264 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -49,12 +49,12 @@ App.config = Em.Object.create({
 
   /**
    * Check if Hive installation with new MySQL database created via Ambari is allowed
-   * @param osType
+   * @param osFamily
    * @returns {boolean}
    */
-  isManagedMySQLForHiveAllowed: function (osType) {
+  isManagedMySQLForHiveAllowed: function (osFamily) {
     var osList = ['redhat5', 'suse11'];
-    return !osList.contains(osType);
+    return !osList.contains(osFamily);
   },
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/50342566/ambari-web/test/controllers/installer_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/installer_test.js b/ambari-web/test/controllers/installer_test.js
index 958beab..14a323d 100644
--- a/ambari-web/test/controllers/installer_test.js
+++ b/ambari-web/test/controllers/installer_test.js
@@ -45,27 +45,27 @@ describe('App.InstallerController', function () {
 
     var cases = [
         {
-          osType: 'redhat5',
+          osFamily: 'redhat5',
           expected: false
         },
         {
-          osType: 'redhat6',
+          osFamily: 'redhat6',
           expected: true
         },
         {
-          osType: 'suse11',
+          osFamily: 'suse11',
           expected: false
         }
       ],
       title = 'App.isManagedMySQLForHiveEnabled should be {0} for {1}';
 
     cases.forEach(function (item) {
-      it(title.format(item.expected, item.osType), function () {
+      it(title.format(item.expected, item.osFamily), function () {
         installerController.getServerVersionSuccessCallback({
           'RootServiceComponents': {
             'component_version': '',
             'properties': {
-              'server.os_type': item.osType
+              'server.os_family': item.osFamily
             }
           }
         });

http://git-wip-us.apache.org/repos/asf/ambari/blob/50342566/ambari-web/test/controllers/main_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main_test.js b/ambari-web/test/controllers/main_test.js
index 9b3b2f3..43ec400 100644
--- a/ambari-web/test/controllers/main_test.js
+++ b/ambari-web/test/controllers/main_test.js
@@ -26,27 +26,27 @@ describe('App.InstallerController', function () {
     var controller = App.MainController.create(),
       cases = [
         {
-          osType: 'redhat5',
+          osFamily: 'redhat5',
           expected: false
         },
         {
-          osType: 'redhat6',
+          osFamily: 'redhat6',
           expected: true
         },
         {
-          osType: 'suse11',
+          osFamily: 'suse11',
           expected: false
         }
       ],
       title = 'App.isManagedMySQLForHiveEnabled should be {0} for {1}';
 
     cases.forEach(function (item) {
-      it(title.format(item.expected, item.osType), function () {
+      it(title.format(item.expected, item.osFamily), function () {
         controller.getServerVersionSuccessCallback({
           'RootServiceComponents': {
             'component_version': '',
             'properties': {
-              'server.os_type': item.osType
+              'server.os_family': item.osFamily
             }
           }
         });

http://git-wip-us.apache.org/repos/asf/ambari/blob/50342566/ambari-web/test/utils/config_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/utils/config_test.js b/ambari-web/test/utils/config_test.js
index 530f18d..1e4b0b4 100644
--- a/ambari-web/test/utils/config_test.js
+++ b/ambari-web/test/utils/config_test.js
@@ -595,23 +595,23 @@ describe('App.config', function () {
 
     var cases = [
       {
-        osType: 'redhat5',
+        osFamily: 'redhat5',
         expected: false
       },
       {
-        osType: 'redhat6',
+        osFamily: 'redhat6',
         expected: true
       },
       {
-        osType: 'suse11',
+        osFamily: 'suse11',
         expected: false
       }
     ],
       title = 'should be {0} for {1}';
 
     cases.forEach(function (item) {
-      it(title.format(item.expected, item.osType), function () {
-        expect(App.config.isManagedMySQLForHiveAllowed(item.osType)).to.equal(item.expected);
+      it(title.format(item.expected, item.osFamily), function () {
+        expect(App.config.isManagedMySQLForHiveAllowed(item.osFamily)).to.equal(item.expected);
       });
     });