You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2013/04/27 05:03:59 UTC

svn commit: r1476474 - in /incubator/ambari/trunk: ./ ambari-web/app/controllers/main/service/info/ ambari-web/app/data/ ambari-web/app/models/ ambari-web/app/views/common/configs/

Author: yusaku
Date: Sat Apr 27 03:03:58 2013
New Revision: 1476474

URL: http://svn.apache.org/r1476474
Log:
AMBARI-2028. Customize Services: make the services display consistent. (yusaku)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-web/app/controllers/main/service/info/configs.js
    incubator/ambari/trunk/ambari-web/app/data/config_properties.js
    incubator/ambari/trunk/ambari-web/app/data/service_configs.js
    incubator/ambari/trunk/ambari-web/app/models/service_config.js
    incubator/ambari/trunk/ambari-web/app/views/common/configs/services_config.js

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1476474&r1=1476473&r2=1476474&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Sat Apr 27 03:03:58 2013
@@ -269,6 +269,9 @@ Trunk (unreleased changes):
 
  IMPROVEMENTS
 
+ AMBARI-2028. Customize Services: make the services display consistent.
+ (yusaku)
+
  AMBARI-2027. Add validation checks for Add Property on custom site configs.
  (yusaku)
 

Modified: incubator/ambari/trunk/ambari-web/app/controllers/main/service/info/configs.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/service/info/configs.js?rev=1476474&r1=1476473&r2=1476474&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main/service/info/configs.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main/service/info/configs.js Sat Apr 27 03:03:58 2013
@@ -1356,6 +1356,16 @@ App.MainServiceInfoConfigsController = E
         hbaseMasterHost.defaultValue = this.get('content.hostComponents').filterProperty('componentName', 'HBASE_MASTER').mapProperty('host.hostName');
         globalConfigs.push(hbaseMasterHost);
         break;
+      case 'HUE':
+        var hueServerHost = serviceConfigs.findProperty('name', 'hueserver_host');
+        hueServerHost.defaultValue = this.get('content.hostComponents').findProperty('componentName', 'HUE_SERVER').get('host.hostName');
+        globalConfigs.push(hueServerHost);
+        break;
+      case 'WEBHCAT':
+        var webhcatMasterHost = serviceConfigs.findProperty('name', 'webhcatserver_host');
+        webhcatMasterHost.defaultValue = this.get('content.hostComponents').filterProperty('componentName', 'WEBHCAT_SERVER').mapProperty('host.hostName');
+        globalConfigs.push(webhcatMasterHost);
+        break;
     }
   },
   

Modified: incubator/ambari/trunk/ambari-web/app/data/config_properties.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/data/config_properties.js?rev=1476474&r1=1476473&r2=1476474&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/data/config_properties.js (original)
+++ incubator/ambari/trunk/ambari-web/app/data/config_properties.js Sat Apr 27 03:03:58 2013
@@ -1186,6 +1186,20 @@ module.exports =
     */
     {
       "id": "puppet var",
+      "name": "webhcatserver_host",
+      "displayName": "WebHCat Server host",
+      "value": "",
+      "defaultValue": "",
+      "description": "The host that has been assigned to run WebHCat Server",
+      "displayType": "masterHost",
+      "isOverridable": false,
+      "isVisible": true,
+      "domain": "global",
+      "serviceName": "WEBHCAT",
+      "category": "WebHCat Server"
+    },
+    {
+      "id": "puppet var",
       "name": "hcat_log_dir",
       "displayName": "WebHCat Log Dir",
       "description": "Directory for WebHCat log files",
@@ -2631,6 +2645,20 @@ module.exports =
     },
     {
       "id": "puppet var",
+      "name": "hueserver_host",
+      "displayName": "Hue Server host",
+      "value": "",
+      "defaultValue": "",
+      "description": "The host that has been assigned to run Hue Server",
+      "displayType": "masterHost",
+      "isOverridable": false,
+      "isVisible": true,
+      "domain": "global",
+      "serviceName": "HUE",
+      "category": "Hue Server"
+    },
+    {
+      "id": "puppet var",
       "name": "hue_log_dir",
       "displayName": "HUE Log Dir",
       "description": "Directory for HUE logs",

Modified: incubator/ambari/trunk/ambari-web/app/data/service_configs.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/data/service_configs.js?rev=1476474&r1=1476473&r2=1476474&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/data/service_configs.js (original)
+++ incubator/ambari/trunk/ambari-web/app/data/service_configs.js Sat Apr 27 03:03:58 2013
@@ -73,6 +73,7 @@ module.exports = [
     displayName: 'WebHCat',
     filename: 'webhcat-site',
     configCategories: [
+      App.ServiceConfigCategory.create({ name: 'WebHCat Server', displayName : 'WebHCat Server'}),
       App.ServiceConfigCategory.create({ name: 'Advanced', displayName : 'Advanced'}),
       App.ServiceConfigCategory.create({ name: 'AdvancedWebHCatSite', displayName : 'Custom webhcat-site.xml', siteFileName: 'webhcat-site.xml', canAddProperty: true})
     ],
@@ -134,6 +135,7 @@ module.exports = [
     displayName: 'Hue',
     filename: 'hue-site',
     configCategories: [
+      App.ServiceConfigCategory.create({ name: 'Hue Server', displayName : 'Hue Server'}),
       App.ServiceConfigCategory.create({ name: 'Advanced', displayName : 'Advanced'})
     ],
     sites: ['hue-site'],

Modified: incubator/ambari/trunk/ambari-web/app/models/service_config.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/models/service_config.js?rev=1476474&r1=1476473&r2=1476474&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/models/service_config.js (original)
+++ incubator/ambari/trunk/ambari-web/app/models/service_config.js Sat Apr 27 03:03:58 2013
@@ -264,6 +264,12 @@ App.ServiceConfigProperty = Ember.Object
       case 'oozieserver_host':
         this.set('value', masterComponentHostsInDB.findProperty('component', 'OOZIE_SERVER').hostName);
         break;
+      case 'webhcatserver_host':
+        this.set('value', masterComponentHostsInDB.findProperty('component', 'WEBHCAT_SERVER').hostName);
+        break;
+      case 'hueserver_host':
+        this.set('value', masterComponentHostsInDB.findProperty('component', 'HUE_SERVER').hostName);
+        break;
       case 'oozie_ambari_host':
         this.set('value', masterComponentHostsInDB.findProperty('component', 'OOZIE_SERVER').hostName);
         break;

Modified: incubator/ambari/trunk/ambari-web/app/views/common/configs/services_config.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/common/configs/services_config.js?rev=1476474&r1=1476473&r2=1476474&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/common/configs/services_config.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/common/configs/services_config.js Sat Apr 27 03:03:58 2013
@@ -115,37 +115,7 @@ App.ServiceConfigsByCategoryView = Ember
 
       return searchString.toLowerCase().indexOf(filter) > -1;
     });
-
-    // modify the display order of Oozie/Hive server category to make it look in the same order
-    if(filteredResult.someProperty('displayName', 'Oozie Database')) {
-      var displayNameArray = ['Oozie Database', 'Database Type', 'Database Name', 'Database Username', 'Database Password', 'Database Host', 'Oozie Data Dir', 'Oozie Server host'];
-      var sortedArray = [];
-      displayNameArray.forEach(function(item){
-        var obj = filteredResult.findProperty('displayName', item);
-        if(obj) {
-          sortedArray.push(obj);
-        }
-      }, this);
-      return sortedArray;
-
-    }
-    else {
-      if(filteredResult.someProperty('displayName', 'Hive Database')) {
-        var displayNameArray = ['Hive Database', 'Database Type', 'Database Name', 'Database Username', 'Database Password', 'Database Host', 'Hive Metastore host'];
-        var sortedArray = [];
-        displayNameArray.forEach(function(item){
-          var obj = filteredResult.findProperty('displayName', item);
-          if(obj) {
-            sortedArray.push(obj);
-          }
-        }, this);
-        return sortedArray;
-      }
-      else {
-        return filteredResult;
-      }
-    }
-
+    return filteredResult;
   }.property('categoryConfigs','parentView.filter', 'parentView.columns.@each.selected'),
 
   /**