incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject svn commit: r1402297 - in /incubator/ambari/branches/AMBARI-666: ./ ambari-web/app/controllers/installer/ ambari-web/app/data/ ambari-web/app/models/ ambari-web/app/templates/installer/ ambari-web/app/views/installer/
Date Thu, 25 Oct 2012 19:47:30 GMT
Author: yusaku
Date: Thu Oct 25 19:47:29 2012
New Revision: 1402297

URL: http://svn.apache.org/viewvc?rev=1402297&view=rev
Log:
AMBARI-908. Add ui option to either create a Postgres database for Hive and Oozie or choose existing database. (Jaimin Jetly via yusaku)

Modified:
    incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step7_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step8_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/data/config_properties.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/data/review_configs.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service_config.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step7.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step7_view.js

Modified: incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt?rev=1402297&r1=1402296&r2=1402297&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt (original)
+++ incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt Thu Oct 25 19:47:29 2012
@@ -12,6 +12,9 @@ AMBARI-666 branch (unreleased changes)
 
   NEW FEATURES
 
+  AMBARI-908. Add ui option to either create a Postgres database for Hive
+  and Oozie or choose existing database. (Jaimin Jetly via yusaku)
+
   AMBARI-915. Implement App Browser for displaying and navigating Pig/Hive
   workflows. (yusaku)
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step7_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step7_controller.js?rev=1402297&r1=1402296&r2=1402297&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step7_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step7_controller.js Thu Oct 25 19:47:29 2012
@@ -135,7 +135,6 @@ App.InstallerStep7Controller = Em.ArrayC
     this.set('selectedService', this.objectAt(0));
   },
 
-
   submit: function () {
     if (!this.get('isSubmitDisabled')) {
       // TODO:
@@ -145,7 +144,8 @@ App.InstallerStep7Controller = Em.ArrayC
         var config = [];
         config = _content.get('configs');
         config.forEach(function (_configProperties) {
-          var configProperty = {name: _configProperties.get('name'),
+          var configProperty = {
+            name: _configProperties.get('name'),
             value: _configProperties.get('value')};
           serviceConfigProperties.push(configProperty);
         }, this);
@@ -217,8 +217,8 @@ App.SlaveComponentGroupsController = Emb
         templateName: require('templates/installer/slave_component_hosts_popup')
       }),
       onPrimary: function (event) {
-        if (component.tempSelectedGroups !== undefined && component.tempSelectedGroups.length){
-          component.tempSelectedGroups.forEach(function(item){
+        if (component.tempSelectedGroups !== undefined && component.tempSelectedGroups.length) {
+          component.tempSelectedGroups.forEach(function (item) {
             var changed = component.hosts.filterProperty('hostname', item.hostName);
             changed.setEach('group', item.groupName);
           })
@@ -237,14 +237,14 @@ App.SlaveComponentGroupsController = Emb
     });
   },
 
-  changeHostGroup: function(host, groupName){
+  changeHostGroup: function (host, groupName) {
     var component = this.get('selectedSlaveComponent');
-    if (component.tempSelectedGroups === undefined){
+    if (component.tempSelectedGroups === undefined) {
       component.tempSelectedGroups = [];
     }
     var values = component.tempSelectedGroups.filterProperty('hostName', host.hostname);
     if (values.length === 0)
-      component.tempSelectedGroups.pushObject({hostName: host.hostname, groupName:groupName});
+      component.tempSelectedGroups.pushObject({hostName: host.hostname, groupName: groupName});
     else
       values.setEach('groupName', groupName);
 
@@ -258,7 +258,7 @@ App.SlaveComponentGroupsController = Emb
     if (newGroups.length === 0)
       component.newGroupIndex = 0;
     else {
-      if(component.newGroupIndex === undefined)
+      if (component.newGroupIndex === undefined)
         component.newGroupIndex = 0;
       this.checkGroupName();
       newGroupName = 'New Group ' + component.newGroupIndex;
@@ -268,12 +268,12 @@ App.SlaveComponentGroupsController = Emb
     $('.remove-group-error').hide();
   },
 
-  checkGroupName: function(){
+  checkGroupName: function () {
     var component = this.get('selectedSlaveComponent');
     component.newGroupIndex++;
     var newGroupName = 'New Group ' + component.newGroupIndex;
     var groups = component.groups.filterProperty('name', newGroupName);
-    if (groups.length !== 0){
+    if (groups.length !== 0) {
       this.checkGroupName();
     }
   },
@@ -304,7 +304,7 @@ App.SlaveComponentGroupsController = Emb
     if (this.get('selectedComponentName') !== null) {
       var component = this.get('selectedSlaveComponent');
       if (component !== undefined && component !== null) {
-        if (component.groups === undefined){
+        if (component.groups === undefined) {
           component.groups = [];
           var defaultGroup = {name: 'Default', index: 'default', type: 'default', active: true};
           component.groups.pushObject(defaultGroup);
@@ -314,39 +314,39 @@ App.SlaveComponentGroupsController = Emb
     }
   }.property('selectedSlaveComponent'),
 
-  getHostsByGroup: function(group){
+  getHostsByGroup: function (group) {
     var component = this.get('selectedSlaveComponent');
     return component.hosts.filterProperty('group', group.name);
   },
 
-  getGroupsForDropDown: function(){
-     return this.get('componentGroups').getEach('name');
+  getGroupsForDropDown: function () {
+    return this.get('componentGroups').getEach('name');
   }.property('selectedComponentName', 'componentGroups.@each.name'),
 
-  activeGroup: function(){
-    if (this.get('componentGroups') !== undefined){
+  activeGroup: function () {
+    if (this.get('componentGroups') !== undefined) {
       var active = this.get('componentGroups').findProperty('active', true);
       if (active !== undefined)
         return active;
     }
   }.property('selectedComponentName', 'componentGroups.@each.active', 'componentGroups.@each.name'),
 
-  showSlaveComponentGroup: function(event){
+  showSlaveComponentGroup: function (event) {
     var component = this.get('selectedSlaveComponent');
     component.groups.setEach('active', false);
     var group = component.groups.filterProperty('name', event.context.name);
     group.setEach('active', true);
     var assignedHosts = component.hosts.filterProperty('group', event.context.name);
-    if (assignedHosts.length === 0){
+    if (assignedHosts.length === 0) {
       $('.remove-group-error').hide();
     }
   },
 
-  removeSlaveComponentGroup: function(event){
+  removeSlaveComponentGroup: function (event) {
     var group = event.context;
     var component = this.get('selectedSlaveComponent');
     var assignedHosts = component.hosts.filterProperty('group', group.name);
-    if (assignedHosts.length !== 0){
+    if (assignedHosts.length !== 0) {
       $('.remove-group-error').show();
     } else {
       $('.remove-group-error').hide();
@@ -360,17 +360,17 @@ App.SlaveComponentGroupsController = Emb
         var lastNewGroup = newGroups[newGroups.length - 1];
         component.newGroupIndex = lastNewGroup.index;
       }
-      if (group.active){
+      if (group.active) {
         var lastGroup;
         if (key === component.groups.length)
-          lastGroup = component.groups.slice(key-1, key);
-        else lastGroup = component.groups.slice(key, key+1);
+          lastGroup = component.groups.slice(key - 1, key);
+        else lastGroup = component.groups.slice(key, key + 1);
         lastGroup.setEach('active', true);
       }
     }
   },
 
-  changeSlaveGroupName: function(group, newGroupName){
+  changeSlaveGroupName: function (group, newGroupName) {
     var component = this.get('selectedSlaveComponent');
     var isExist = component.groups.filterProperty('name', newGroupName);
     if (isExist.length !== 0)

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step8_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step8_controller.js?rev=1402297&r1=1402296&r2=1402297&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step8_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step8_controller.js Thu Oct 25 19:47:29 2012
@@ -223,7 +223,13 @@ App.InstallerStep8Controller = Em.ArrayC
 	},
 
 	loadHiveDbValue: function (dbComponent) {
-		dbComponent.set('component_value', 'MySQL');
+    var hiveDb = App.db.getServiceConfigProperties().findProperty('name', 'hive_database');
+    if (hiveDb.value === 'New PostgreSQL Database') {
+      dbComponent.set('component_value', 'PostgreSQL (New Database)');
+    } else {
+      var db =    App.db.getServiceConfigProperties().findProperty('name', 'hive_existing_database');
+      dbComponent.set('component_value', db.value +' (' + hiveDb.value + ')');
+    }
 	},
 
 	loadHbase: function (hbaseObj) {
@@ -292,6 +298,9 @@ App.InstallerStep8Controller = Em.ArrayC
 				case 'Server':
 					this.loadOozieServerValue(_component);
 					break;
+        case 'Database':
+          this.loadOozieDbValue(_component);
+          break;
 				default:
 			}
 		}, this);
@@ -303,6 +312,16 @@ App.InstallerStep8Controller = Em.ArrayC
 		oozieServer.set('component_value', oozieServerName.hostName);
 	},
 
+  loadOozieDbValue: function(dbComponent) {
+    var oozieDb = App.db.getServiceConfigProperties().findProperty('name', 'oozie_database');
+    if (oozieDb.value === 'New PostgreSQL Database') {
+      dbComponent.set('component_value', 'PostgreSQL (New Database)');
+    } else {
+      var db = App.db.getServiceConfigProperties().findProperty('name', 'oozie_existing_database');
+      dbComponent.set('component_value', db.value +' (' + oozieDb.value + ')');
+    }
+  },
+
 	loadNagios: function (nagiosObj) {
 		nagiosObj.service_components.forEach(function (_component) {
 			switch (_component.display_name) {

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/data/config_properties.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/data/config_properties.js?rev=1402297&r1=1402296&r2=1402297&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/data/config_properties.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/data/config_properties.js Thu Oct 25 19:47:29 2012
@@ -71,6 +71,7 @@ module.exports =
       "defaultValue": "",
       "description": "The host that has been assigned to run HBase Master",
       "displayType": "masterHost",
+      "isVisible":  true,
       "serviceName": "HBASE",
       "category": "HBase Master"
     },
@@ -81,6 +82,7 @@ module.exports =
       "defaultValue": "",
       "description": "The hosts that have been assigned to run RegionServer",
       "displayType": "slaveHosts",
+      "isVisible":  true,
       "serviceName": "HBASE",
       "category": "RegionServer"
     },
@@ -91,6 +93,7 @@ module.exports =
       "defaultValue": "/var/log/hbase",
       "isReconfigurable": false,
       "displayType": "directory",
+      "isVisible":  true,
       "serviceName": "HBASE",
       "category": "Advanced"
     },
@@ -101,6 +104,7 @@ module.exports =
       "defaultValue": "/var/run/hbase",
       "isReconfigurable": false,
       "displayType": "directory",
+      "isVisible":  true,
       "serviceName": "HBASE",
       "category": "Advanced"
     },
@@ -111,6 +115,7 @@ module.exports =
       "defaultValue": "1024",
       "displayType": "int",
       "unit": "MB",
+      "isVisible":  true,
       "serviceName": "HBASE",
       "category": "RegionServer"
     },
@@ -121,6 +126,7 @@ module.exports =
       "defaultValue": "1024",
       "displayType": "int",
       "unit": "MB",
+      "isVisible":  true,
       "serviceName": "HBASE",
       "category": "HBase Master"
     },
@@ -130,6 +136,7 @@ module.exports =
       "description": "If more than this number of HStoreFiles in any one HStore then a compaction is run to rewrite all HStoreFiles files as one.",
       "defaultValue": "3",
       "displayType": "int",
+      "isVisible":  true,
       "serviceName": "HBASE"
     },
     {
@@ -138,6 +145,7 @@ module.exports =
       "description": "Percentage of maximum heap (-Xmx setting) to allocate to block cache used by HFile/StoreFile. Set to 0 to disable but it's not recommended.",
       "defaultValue": "0.25",
       "displayType": "float",
+      "isVisible":  true,
       "serviceName": "HBASE"
     },
     {
@@ -147,6 +155,7 @@ module.exports =
       "defaultValue": "1073741824",
       "displayType": "int",
       "unit": "bytes",
+      "isVisible":  true,
       "serviceName": "HBASE"
     },
     {
@@ -155,6 +164,7 @@ module.exports =
       "description": "Count of RPC Listener instances spun up on RegionServers",
       "defaultValue": "30",
       "displayType": "int",
+      "isVisible":  true,
       "serviceName": "HBASE",
       "category": "RegionServer"
     },
@@ -165,6 +175,7 @@ module.exports =
       "defaultValue": "86400000",
       "displayType": "int",
       "unit": "ms",
+      "isVisible":  true,
       "serviceName": "HBASE",
       "category": "RegionServer"
     },
@@ -174,6 +185,7 @@ module.exports =
       "description": "Block updates if memstore has \"Multiplier * HBase Region Memstore Flush Size\" bytes. Useful preventing runaway memstore during spikes in update traffic",
       "defaultValue": "2",
       "displayType": "int",
+      "isVisible":  true,
       "serviceName": "HBASE",
       "category": "RegionServer"
     },
@@ -184,6 +196,7 @@ module.exports =
       "defaultValue": "134217728",
       "displayType": "int",
       "unit": "bytes",
+      "isVisible":  true,
       "serviceName": "HBASE",
       "category": "RegionServer"
     },
@@ -194,6 +207,7 @@ module.exports =
       "defaultValue": "100",
       "displayType": "int",
       "unit": "rows",
+      "isVisible":  true,
       "serviceName": "HBASE"
     },
     {
@@ -203,6 +217,7 @@ module.exports =
       "defaultValue": "60000",
       "displayType": "int",
       "unit": "ms",
+      "isVisible":  true,
       "serviceName": "HBASE"
     },
     {
@@ -212,6 +227,7 @@ module.exports =
       "defaultValue": "10485760",
       "displayType": "int",
       "unit": "bytes",
+      "isVisible":  true,
       "serviceName": "HBASE"
     },
     {
@@ -221,6 +237,7 @@ module.exports =
       "defaultValue": "",
       "isRequired": false,
       "displayType": "custom",
+      "isVisible":  true,
       "serviceName": "HBASE",
       "category": "Advanced"
     },
@@ -231,6 +248,7 @@ module.exports =
       "defaultValue": "",
       "description": "The host that has been assigned to run NameNode",
       "displayType": "masterHost",
+      "isVisible":  true,
       "serviceName": "HDFS",
       "category": "NameNode"
     },
@@ -241,6 +259,7 @@ module.exports =
       "defaultValue": "",
       "isReconfigurable": false,
       "displayType": "directories",
+      "isVisible":  true,
       "serviceName": "HDFS",
       "category": "NameNode"
     },
@@ -251,6 +270,7 @@ module.exports =
       "defaultValue": "",
       "description": "The host that has been assigned to run SecondaryNameNode",
       "displayType": "masterHost",
+      "isVisible":  true,
       "serviceName": "HDFS",
       "category": "SNameNode"
     },
@@ -261,6 +281,7 @@ module.exports =
       "defaultValue": "",
       "isReconfigurable": false,
       "displayType": "directory",
+      "isVisible":  true,
       "serviceName": "HDFS",
       "category": "SNameNode"
     },
@@ -271,6 +292,7 @@ module.exports =
       "defaultValue": "",
       "description": "The hosts that have been assigned to run DataNode",
       "displayType": "slaveHosts",
+      "isVisible":  true,
       "serviceName": "HDFS",
       "category": "DataNode"
     },
@@ -281,6 +303,7 @@ module.exports =
       "defaultValue": "",
       "isReconfigurable": false,
       "displayType": "directories",
+      "isVisible":  true,
       "serviceName": "HDFS",
       "category": "DataNode"
     },
@@ -291,6 +314,7 @@ module.exports =
       "defaultValue": "/var/log/hadoop",
       "isReconfigurable": false,
       "displayType": "directory",
+      "isVisible":  true,
       "serviceName": "HDFS",
       "category": "Advanced"
     },
@@ -301,6 +325,7 @@ module.exports =
       "defaultValue": "/var/run/hadoop",
       "isReconfigurable": false,
       "displayType": "directory",
+      "isVisible":  true,
       "serviceName": "HDFS",
       "category": "Advanced"
     },
@@ -310,6 +335,7 @@ module.exports =
       "description": "Whether to enable HDFS Append feature",
       "defaultValue": true,
       "displayType": "checkbox",
+      "isVisible":  true,
       "serviceName": "HDFS"
     },
     {
@@ -318,6 +344,7 @@ module.exports =
       "description": "Whether to enable WebHDFS feature",
       "defaultValue": false,
       "displayType": "checkbox",
+      "isVisible":  true,
       "serviceName": "HDFS"
     },
     {
@@ -327,6 +354,7 @@ module.exports =
       "defaultValue": "1024",
       "displayType": "int",
       "unit": "MB",
+      "isVisible":  true,
       "serviceName": "HDFS"
     },
     {
@@ -336,6 +364,7 @@ module.exports =
       "defaultValue": "1024",
       "displayType": "int",
       "unit": "MB",
+      "isVisible":  true,
       "serviceName": "HDFS",
       "category": "NameNode"
     },
@@ -346,6 +375,7 @@ module.exports =
       "defaultValue": "200",
       "displayType": "int",
       "unit": "MB",
+      "isVisible":  true,
       "serviceName": "HDFS",
       "category": "NameNode"
     },
@@ -356,6 +386,7 @@ module.exports =
       "defaultValue": "1",
       "displayType": "int",
       "unit": "GB",
+      "isVisible":  true,
       "serviceName": "HDFS"
     },
     {
@@ -365,6 +396,7 @@ module.exports =
       "defaultValue": "1024",
       "displayType": "int",
       "unit": "MB",
+      "isVisible":  true,
       "serviceName": "HDFS",
       "category": "DataNode"
     },
@@ -374,6 +406,7 @@ module.exports =
       "description": "The number of volumes that are allowed to fail before a DataNode stops offering service",
       "defaultValue": "0",
       "displayType": "int",
+      "isVisible":  true,
       "serviceName": "HDFS",
       "category": "DataNode"
     },
@@ -385,6 +418,7 @@ module.exports =
       "isReconfigurable": false,
       "displayType": "int",
       "unit": "seconds",
+      "isVisible":  true,
       "serviceName": "HDFS"
     },
     {
@@ -395,6 +429,7 @@ module.exports =
       "isReconfigurable": false,
       "displayType": "float",
       "unit": "GB",
+      "isVisible":  true,
       "serviceName": "HDFS"
     },
     {
@@ -404,6 +439,7 @@ module.exports =
       "defaultValue": "",
       "isRequired": false,
       "displayType": "custom",
+      "isVisible":  true,
       "serviceName": "HDFS",
       "category": "Advanced"
     },
@@ -414,47 +450,110 @@ module.exports =
       "defaultValue": "",
       "description": "The host that has been assigned to run Hive Metastore",
       "displayType": "masterHost",
+      "isVisible":  true,
       "serviceName": "HIVE",
       "category": "Hive Metastore"
     },
     {
-      "name": "hive_mysql_host",
-      "displayName": "MySQL host",
-      "description": "MySQL host on which the Hive Metastore is hosted. If left empty, the metastore will be set up on the same host as the Hive Server using the database name and user credentials specified",
+      "name": "hive_database",
+      "displayName": "Hive Database",
+      "value": "",
+      "defaultValue": "New PostgreSQL Database",
+      "options":  [
+        {
+          displayName: 'New PostgreSQL Database',
+          foreignKeys: ['hive_ambari_database','hive_ambari_host']
+        },
+        {
+          displayName: 'Existing Database',
+          foreignKeys: ['hive_existing_database','hive_existing_host']
+        }
+      ],
+      "description": "PostgreSQL will be installed by ambari. Any other database will have to be installed by the user.",
+      "displayType": "radio button",
+      "radioName": "hive-database",
+      "isVisible":  true,
+      "serviceName": "HIVE",
+      "category": "Hive Metastore"
+    },
+    {
+      "name": "hive_existing_database",
+      "displayName": "Hive Database",
+      "value": "",
+      "defaultValue": "MySQL",
+      "description": "Select the database, if you already have existing one for Hive Metastore.",
+      "displayType": "combobox",
+      "isVisible":  false,
+      "options": ['MySQL', 'PostgreSQL'],
+      "serviceName": "HIVE",
+      "category": "Hive Metastore"
+    },
+    {
+      "name": "hive_existing_host",
+      "displayName": "Database host",
+      "description": "Select the host on which the existing database is hosted.",
       "defaultValue": "",
-      "isRequired": false,
       "isReconfigurable": false,
       "displayType": "host",
+      "isVisible":  false,
+      "serviceName": "HIVE",
+      "category": "Hive Metastore"
+    },
+    {
+      "name": "hive_ambari_database",
+      "displayName": "Hive Database",
+      "value": "",
+      "defaultValue": "PostgreSQL",
+      "description": "PostgreSQL will be installed by ambari.",
+      "displayType": "masterHost",
+      "isVisible":  true,
+      "serviceName": "HIVE",
+      "category": "Hive Metastore"
+    },
+    {
+      "name": "hive_ambari_host",
+      "value": "",
+      "defaultValue": "",
+      "displayName": "PostgreSQL host",
+      "description": "Host  on which the PostgreSQL database will be created by ambari. ",
+      "defaultValue": "",
+      "isReconfigurable": false,
+      "displayType": "masterHost",
+      "isVisible":  true,
       "serviceName": "HIVE",
       "category": "Hive Metastore"
     },
+
     {
       "name": "hive_database_name",
-      "displayName": "MySQL database name",
-      "description": "MySQL database name used as the Hive Metastore",
+      "displayName": "Database name",
+      "description": "Database name used as the Hive Metastore",
       "defaultValue": "hive",
       "isReconfigurable": false,
       "displayType": "host",
+      "isVisible":  true,
       "serviceName": "HIVE",
       "category": "Hive Metastore"
     },
     {
       "name": "hive_metastore_user_name",
-      "displayName": "MySQL user",
-      "description": "MySQL user to use to connect to the MySQL database",
+      "displayName": "Database user",
+      "description": "Database user name to use to connect to the database",
       "defaultValue": "hive",
       "isReconfigurable": false,
       "displayType": "user",
+      "isVisible":  true,
       "serviceName": "HIVE",
       "category": "Hive Metastore"
     },
     {
       "name": "hive_metastore_user_passwd",
-      "displayName": "MySQL password",
-      "description": "MySQL password to use to connect to the MySQL database",
+      "displayName": "Database password",
+      "description": "Database password to use to connect to the PostgreSQL database",
       "defaultValue": "",
       "isReconfigurable": false,
       "displayType": "password",
+      "isVisible":  true,
       "serviceName": "HIVE",
       "category": "Hive Metastore"
     },
@@ -465,6 +564,7 @@ module.exports =
       "defaultValue": "/var/log/hive",
       "isReconfigurable": false,
       "displayType": "directory",
+      "isVisible":  false,
       "serviceName": "HIVE",
       "category": "Advanced"
     },
@@ -475,6 +575,7 @@ module.exports =
       "defaultValue": "/var/run/hive",
       "isReconfigurable": false,
       "displayType": "directory",
+      "isVisible":  true,
       "serviceName": "HIVE",
       "category": "Advanced"
     },
@@ -485,6 +586,7 @@ module.exports =
       "defaultValue": "/var/log/hcatalog",
       "isReconfigurable": false,
       "displayType": "directory",
+      "isVisible":  true,
       "serviceName": "HIVE",
       "category": "Advanced"
     },
@@ -495,6 +597,7 @@ module.exports =
       "defaultValue": "/var/run/hcatalog",
       "isReconfigurable": false,
       "displayType": "directory",
+      "isVisible":  true,
       "serviceName": "HIVE",
       "category": "Advanced"
     },
@@ -505,6 +608,7 @@ module.exports =
       "defaultValue": "",
       "isRequired": false,
       "displayType": "custom",
+      "isVisible":  true,
       "serviceName": "HIVE",
       "category": "Advanced"
     },
@@ -515,6 +619,7 @@ module.exports =
       "defaultValue": "",
       "description": "The host that has been assigned to run JobTracker",
       "displayType": "masterHost",
+      "isVisible":  true,
       "serviceName": "MAPREDUCE",
       "category": "JobTracker"
     },
@@ -525,6 +630,7 @@ module.exports =
       "defaultValue": "",
       "description": "The hosts that have been assigned to run TaskTracker",
       "displayType": "slaveHosts",
+      "isVisible":  true,
       "serviceName": "MAPREDUCE",
       "category": "TaskTracker"
     },
@@ -535,6 +641,7 @@ module.exports =
       "defaultValue": "",
       "displayType": "directories",
       "isReconfigurable": false,
+      "isVisible":  true,
       "serviceName": "MAPREDUCE"
     },
     {
@@ -543,6 +650,7 @@ module.exports =
       "description": "The scheduler to use for scheduling of MapReduce jobs",
       "defaultValue": "org.apache.hadoop.mapred.CapacityTaskScheduler",
       "displayType": "directory",
+      "isVisible":  true,
       "serviceName": "MAPREDUCE"
     },
     {
@@ -552,6 +660,7 @@ module.exports =
       "defaultValue": "200",
       "displayType": "int",
       "unit": "MB",
+      "isVisible":  true,
       "serviceName": "MAPREDUCE",
       "category": "JobTracker"
     },
@@ -562,6 +671,7 @@ module.exports =
       "defaultValue": "200",
       "displayType": "int",
       "unit": "MB",
+      "isVisible":  true,
       "serviceName": "MAPREDUCE",
       "category": "JobTracker"
     },
@@ -572,6 +682,7 @@ module.exports =
       "defaultValue": "1024",
       "displayType": "int",
       "unit": "MB",
+      "isVisible":  true,
       "serviceName": "MAPREDUCE",
       "category": "JobTracker"
     },
@@ -581,6 +692,7 @@ module.exports =
       "description": "Number of slots that Map tasks that run simultaneously can occupy on a TaskTracker",
       "defaultValue": "4",
       "displayType": "int",
+      "isVisible":  true,
       "serviceName": "MAPREDUCE",
       "category": "TaskTracker"
     },
@@ -590,6 +702,7 @@ module.exports =
       "description": "Number of slots that Reduce tasks that run simultaneously can occupy on a TaskTracker.",
       "defaultValue": "2",
       "displayType": "int",
+      "isVisible":  true,
       "serviceName": "MAPREDUCE",
       "category": "TaskTracker"
     },
@@ -600,6 +713,7 @@ module.exports =
       "defaultValue": "-1",
       "displayType": "int",
       "unit": "MB",
+      "isVisible":  true,
       "serviceName": "MAPREDUCE"
     },
     {
@@ -609,6 +723,7 @@ module.exports =
       "defaultValue": "-1",
       "displayType": "int",
       "unit": "MB",
+      "isVisible":  true,
       "serviceName": "MAPREDUCE"
     },
     {
@@ -618,6 +733,7 @@ module.exports =
       "defaultValue": "-1",
       "displayType": "int",
       "unit": "MB",
+      "isVisible":  true,
       "serviceName": "MAPREDUCE"
     },
     {
@@ -627,6 +743,7 @@ module.exports =
       "defaultValue": "-1",
       "displayType": "int",
       "unit": "MB",
+      "isVisible":  true,
       "serviceName": "MAPREDUCE"
     },
     {
@@ -636,6 +753,7 @@ module.exports =
       "defaultValue": "-1",
       "displayType": "int",
       "unit": "MB",
+      "isVisible":  true,
       "serviceName": "MAPREDUCE"
     },
     {
@@ -645,6 +763,7 @@ module.exports =
       "defaultValue": "-1",
       "displayType": "int",
       "unit": "MB",
+      "isVisible":  true,
       "serviceName": "MAPREDUCE"
     },
     {
@@ -654,6 +773,7 @@ module.exports =
       "defaultValue": "768",
       "displayType": "int",
       "unit": "MB",
+      "isVisible":  true,
       "serviceName": "MAPREDUCE"
     },
     {
@@ -663,6 +783,7 @@ module.exports =
       "defaultValue": "200",
       "displayType": "int",
       "unit": "MB",
+      "isVisible":  true,
       "serviceName": "MAPREDUCE"
     },
     {
@@ -671,6 +792,7 @@ module.exports =
       "description": "Percentage of sort buffer used for record collection (Expert-only configuration)",
       "defaultValue": "0.9",
       "displayType": "float",
+      "isVisible":  true,
       "serviceName": "MAPREDUCE"
     },
     {
@@ -680,6 +802,7 @@ module.exports =
       "defaultValue": "24",
       "displayType": "int",
       "unit": "hours",
+      "isVisible":  true,
       "serviceName": "MAPREDUCE"
     },
     {
@@ -688,6 +811,7 @@ module.exports =
       "description": "Maximum number of tasks for a single Job",
       "defaultValue": "-1",
       "displayType": "int",
+      "isVisible":  true,
       "serviceName": "MAPREDUCE"
     },
     {
@@ -696,6 +820,7 @@ module.exports =
       "description": "LZO compression enabled",
       "defaultValue": false,
       "displayType": "checkbox",
+      "isVisible":  true,
       "serviceName": "MAPREDUCE"
     },
     {
@@ -705,6 +830,7 @@ module.exports =
       "defaultValue": true,
       "isReconfigurable": false,
       "displayType": "checkbox",
+      "isVisible":  true,
       "serviceName": "MAPREDUCE"
     },
     {
@@ -714,6 +840,7 @@ module.exports =
       "defaultValue": "",
       "isRequired": false,
       "displayType": "custom",
+      "isVisible":  true,
       "serviceName": "MAPREDUCE",
       "category": "Advanced"
     },
@@ -725,6 +852,7 @@ module.exports =
       "isRequired": false,
       "isReconfigurable": false,
       "displayType": "url",
+      "isVisible":  true,
       "serviceName": "MISC"
     },
     {
@@ -735,6 +863,7 @@ module.exports =
       "isRequired": false,
       "isReconfigurable": false,
       "displayType": "directory",
+      "isVisible":  true,
       "serviceName": "MISC"
     },
     /*
@@ -745,7 +874,7 @@ module.exports =
      "defaultValue": "/var/log/hadoop",
      "isReconfigurable": false,
      "displayType": "directory",
-     "serviceName": "MISC",
+     "isVisible":  true, "serviceName": "MISC",
      "category": "Advanced"
      },
      {
@@ -755,7 +884,7 @@ module.exports =
      "defaultValue": "/var/run/hadoop",
      "isReconfigurable": false,
      "displayType": "directory",
-     "serviceName": "MISC",
+     "isVisible":  true, "serviceName": "MISC",
      "category": "Advanced"
      },
      */
@@ -766,6 +895,7 @@ module.exports =
       "defaultValue": false,
       "isReconfigurable": false,
       "displayType": "checkbox",
+      "isVisible":  true,
       "serviceName": "MISC"
     },
     {
@@ -775,6 +905,7 @@ module.exports =
       "defaultValue": "/etc/yum.repos.d/hdp.repo",
       "isReconfigurable": false,
       "displayType": "directory",
+      "isVisible":  true,
       "serviceName": "MISC"
     },
     {
@@ -784,6 +915,7 @@ module.exports =
       "defaultValue": "hdfs",
       "isReconfigurable": false,
       "displayType": "user",
+      "isVisible":  true,
       "serviceName": "MISC",
       "category": "Users/Groups"
     },
@@ -794,6 +926,7 @@ module.exports =
       "defaultValue": "mapred",
       "isReconfigurable": false,
       "displayType": "user",
+      "isVisible":  true,
       "serviceName": "MISC",
       "category": "Users/Groups"
     },
@@ -804,6 +937,7 @@ module.exports =
       "defaultValue": "hbase",
       "isReconfigurable": false,
       "displayType": "user",
+      "isVisible":  true,
       "serviceName": "MISC",
       "category": "Users/Groups"
     },
@@ -814,6 +948,7 @@ module.exports =
       "defaultValue": "hive",
       "isReconfigurable": false,
       "displayType": "user",
+      "isVisible":  true,
       "serviceName": "MISC",
       "category": "Users/Groups"
     },
@@ -824,6 +959,7 @@ module.exports =
       "defaultValue": "hcat",
       "isReconfigurable": false,
       "displayType": "user",
+      "isVisible":  true,
       "serviceName": "MISC",
       "category": "Users/Groups"
     },
@@ -834,6 +970,7 @@ module.exports =
       "defaultValue": "oozie",
       "isReconfigurable": false,
       "displayType": "user",
+      "isVisible":  true,
       "serviceName": "MISC",
       "category": "Users/Groups"
     },
@@ -844,6 +981,7 @@ module.exports =
       "defaultValue": "pig",
       "isReconfigurable": false,
       "displayType": "user",
+      "isVisible":  true,
       "serviceName": "MISC",
       "category": "Users/Groups"
     },
@@ -854,6 +992,7 @@ module.exports =
       "defaultValue": "sqoop",
       "isReconfigurable": false,
       "displayType": "user",
+      "isVisible":  true,
       "serviceName": "MISC",
       "category": "Users/Groups"
     },
@@ -864,6 +1003,7 @@ module.exports =
       "defaultValue": "zookeeper",
       "isReconfigurable": false,
       "displayType": "user",
+      "isVisible":  true,
       "serviceName": "MISC",
       "category": "Users/Groups"
     },
@@ -874,6 +1014,7 @@ module.exports =
       "defaultValue": "hadoop",
       "isReconfigurable": false,
       "displayType": "user",
+      "isVisible":  true,
       "serviceName": "MISC",
       "category": "Users/Groups"
     },
@@ -884,6 +1025,7 @@ module.exports =
       "defaultValue": "nagiosadmin",
       "isReconfigurable": false,
       "displayType": "user",
+      "isVisible":  true,
       "serviceName": "NAGIOS"
     },
     {
@@ -893,6 +1035,7 @@ module.exports =
       "defaultValue": "",
       "isReconfigurable": false,
       "displayType": "password",
+      "isVisible":  true,
       "serviceName": "NAGIOS"
     },
     {
@@ -901,6 +1044,7 @@ module.exports =
       "description": "Hadoop Administrator email for alert notification",
       "defaultValue": "",
       "displayType": "email",
+      "isVisible":  true,
       "serviceName": "NAGIOS"
     },
     {
@@ -910,6 +1054,110 @@ module.exports =
       "defaultValue": "",
       "description": "The host that has been assigned to run Oozie Server",
       "displayType": "masterHost",
+      "isVisible":  true,
+      "serviceName": "OOZIE",
+      "category": "Oozie Server"
+    },
+    {
+      "name": "oozie_database",
+      "displayName": "Oozie Database",
+      "value": "",
+      "defaultValue": "New PostgreSQL Database",
+      "options":  [
+        {
+          displayName: 'New PostgreSQL Database',
+          foreignKeys: ['oozie_ambari_database','oozie_ambari_host']
+        },
+        {
+          displayName: 'Existing Database',
+          foreignKeys: ['oozie_existing_database','oozie_existing_host']
+        }
+      ],
+      "description": "PostgreSQL will be installed by ambari. Any other database will have to be installed by the user.",
+      "displayType": "radio button",
+      "radioName": "oozie-database",
+      "isVisible":  true,
+      "serviceName": "OOZIE",
+      "category": "Oozie Server"
+    },
+    {
+      "name": "oozie_existing_database",
+      "displayName": "Oozie Database",
+      "value": "",
+      "defaultValue": "MySQL",
+      "description": "Select the database, if you already have existing one for Oozie.",
+      "displayType": "combobox",
+      "isVisible":  false,
+      "options": ['MySQL','PostgreSQL'],
+      "serviceName": "OOZIE",
+      "category": "Oozie Server"
+    },
+    {
+      "name": "oozie_existing_host",
+      "displayName": "Database host",
+      "description": "Select the host on which the existing database is hosted.",
+      "defaultValue": "",
+      "isReconfigurable": false,
+      "displayType": "host",
+      "isVisible":  false,
+      "serviceName": "OOZIE",
+      "category": "Oozie Server"
+    },
+    {
+      "name": "oozie_ambari_database",
+      "displayName": "Oozie Database",
+      "value": "",
+      "defaultValue": "PostgreSQL",
+      "description": "PostgreSQL will be installed by ambari.",
+      "displayType": "masterHost",
+      "isVisible":  true,
+      "serviceName": "OOZIE",
+      "category": "Oozie Server"
+    },
+    {
+      "name": "oozie_ambari_host",
+      "value": "",
+      "defaultValue": "",
+      "displayName": "PostgreSQL host",
+      "description": "Host  on which the PostgreSQL database will be created by ambari. ",
+      "defaultValue": "",
+      "isReconfigurable": false,
+      "displayType": "masterHost",
+      "isVisible":  true,
+      "serviceName": "OOZIE",
+      "category": "Oozie Server"
+    },
+
+    {
+      "name": "oozie_database_name",
+      "displayName": "Database name",
+      "description": "Database name used for the Oozie",
+      "defaultValue": "oozie",
+      "isReconfigurable": false,
+      "displayType": "host",
+      "isVisible":  true,
+      "serviceName": "OOZIE",
+      "category": "Oozie Server"
+    },
+    {
+      "name": "oozie_metastore_user_name",
+      "displayName": "Database user",
+      "description": "Database user name to use to connect to the database",
+      "defaultValue": "oozie",
+      "isReconfigurable": false,
+      "displayType": "user",
+      "isVisible":  true,
+      "serviceName": "OOZIE",
+      "category": "Oozie Server"
+    },
+    {
+      "name": "oozie_metastore_user_passwd",
+      "displayName": "Database password",
+      "description": "Database password to use to connect to the PostgreSQL database",
+      "defaultValue": "",
+      "isReconfigurable": false,
+      "displayType": "password",
+      "isVisible":  true,
       "serviceName": "OOZIE",
       "category": "Oozie Server"
     },
@@ -920,6 +1168,7 @@ module.exports =
       "defaultValue": "",
       "isReconfigurable": false,
       "displayType": "directory",
+      "isVisible":  true,
       "serviceName": "OOZIE",
       "category": "Oozie Server"
     },
@@ -930,6 +1179,7 @@ module.exports =
       "defaultValue": "/var/log/oozie",
       "isReconfigurable": false,
       "displayType": "directory",
+      "isVisible":  true,
       "serviceName": "OOZIE",
       "category": "Advanced"
     },
@@ -940,6 +1190,7 @@ module.exports =
       "defaultValue": "/var/run/oozie",
       "isReconfigurable": false,
       "displayType": "directory",
+      "isVisible":  true,
       "serviceName": "OOZIE",
       "category": "Advanced"
     },
@@ -950,6 +1201,7 @@ module.exports =
       "defaultValue": "",
       "isRequired": false,
       "displayType": "custom",
+      "isVisible":  true,
       "serviceName": "OOZIE",
       "category": "Advanced"
     },
@@ -960,6 +1212,7 @@ module.exports =
       "defaultValue": "",
       "description": "The host that has been assigned to run ZooKeeper Server",
       "displayType": "masterHosts",
+      "isVisible":  true,
       "serviceName": "ZOOKEEPER",
       "category": "ZooKeeper Server"
     },
@@ -970,6 +1223,7 @@ module.exports =
       "defaultValue": "",
       "isReconfigurable": false,
       "displayType": "directory",
+      "isVisible":  true,
       "serviceName": "ZOOKEEPER",
       "category": "ZooKeeper Server"
     },
@@ -980,6 +1234,7 @@ module.exports =
       "defaultValue": "/var/log/zookeeper",
       "isReconfigurable": false,
       "displayType": "directory",
+      "isVisible":  true,
       "serviceName": "ZOOKEEPER",
       "category": "Advanced"
     },
@@ -990,6 +1245,7 @@ module.exports =
       "defaultValue": "/var/run/zookeeper",
       "isReconfigurable": false,
       "displayType": "directory",
+      "isVisible":  true,
       "serviceName": "ZOOKEEPER",
       "category": "Advanced"
     },
@@ -1000,6 +1256,7 @@ module.exports =
       "defaultValue": "2000",
       "displayType": "int",
       "unit": "ms",
+      "isVisible":  true,
       "serviceName": "ZOOKEEPER",
       "category": "ZooKeeper Server"
     },
@@ -1009,6 +1266,7 @@ module.exports =
       "description": "Amount of time, in ticks to allow followers to connect and sync to a leader",
       "defaultValue": "10",
       "displayType": "int",
+      "isVisible":  true,
       "serviceName": "ZOOKEEPER",
       "category": "ZooKeeper Server"
     },
@@ -1018,6 +1276,7 @@ module.exports =
       "description": "Amount of time, in ticks to allow followers to connect",
       "defaultValue": "5",
       "displayType": "int",
+      "isVisible":  true,
       "serviceName": "ZOOKEEPER",
       "category": "ZooKeeper Server"
     },
@@ -1027,6 +1286,7 @@ module.exports =
       "description": "Port for running ZooKeeper server",
       "defaultValue": "2181",
       "displayType": "int",
+      "isVisible":  true,
       "serviceName": "ZOOKEEPER",
       "category": "ZooKeeper Server"
     }

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/data/review_configs.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/data/review_configs.js?rev=1402297&r1=1402296&r2=1402297&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/data/review_configs.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/data/review_configs.js Thu Oct 25 19:47:29 2012
@@ -18,139 +18,143 @@
 
 module.exports = [
 
-	{
-		config_name: 'cluster',
-		display_name: 'Cluster Name',
-		config_value: ''
-	},
-	{
-		config_name: 'hosts',
-		display_name: 'Total Hosts',
-		config_value: ''
-	},
-	{
-		config_name: 'Repo',
-		display_name: 'Local Repository',
-		config_value: ''
-	},
-	{
-		config_name: 'services',
-		display_name: 'Services',
-		config_value: [
-			Ember.Object.create({
-				service_name: 'HDFS',
-				display_name: 'HDFS',
-				service_components: [
-					Ember.Object.create({
-						display_name: 'NameNode',
-						component_value: ''
-					}),
-					Ember.Object.create({
-						display_name: 'SecondaryNameNode',
-						component_value: ''
-					}),
-					Ember.Object.create({
-						display_name: 'DataNodes',
-						component_value: ''
-					})
-				]
-			}),
-			Ember.Object.create({
-				service_name: 'MAPREDUCE',
-				display_name: 'MapReduce',
-				service_components: [
-					Ember.Object.create({
-						display_name: 'JobTracker',
-						component_value: ''
-					}),
-					Ember.Object.create({
-						display_name: 'TaskTrackers',
-						component_value: ''
-					})
-				]
-			}),
-			Ember.Object.create({
-				service_name: 'HIVE',
-				display_name: 'Hive + HCatalog',
-				service_components: [
-					Ember.Object.create({
-						display_name: 'Hive Metastore Server',
-						component_value: ''
-					}),
-					Ember.Object.create({
-						display_name: 'Database',
-						component_value: ''
-					})
-				]
-			}),
-			Ember.Object.create({
-				service_name: 'HBASE',
-				display_name: 'HBase',
-				service_components: [
-					Ember.Object.create({
-						display_name: 'Master',
-						component_value: ''
-					}),
-					Ember.Object.create({
-						display_name: 'Region Servers',
-						component_value: ''
-					})
-				]
-			}),
-			Ember.Object.create({
-				service_name: 'ZOOKEEPER',
-				display_name: 'ZooKeeper',
-				service_components: [
-					Ember.Object.create({
-						display_name: 'Servers',
-						component_value: ''
-					})
-				]
-			}),
-			Ember.Object.create({
-				service_name: 'OOZIE',
-				display_name: 'Oozie',
-				service_components: [
-					Ember.Object.create({
-						display_name: 'Server',
-						component_value: ''
-					})
-				]
-			}),
-			Ember.Object.create({
-				service_name: 'NAGIOS',
-				display_name: 'Nagios',
-				service_components: [
-					Ember.Object.create({
-						display_name: 'Server',
-						component_value: ''
-					}),
-					Ember.Object.create({
-						display_name: 'Administrator',
-						component_value: ''
-					})
-				]
-			}),
-			Ember.Object.create({
-				service_name: 'GANGLIA',
-				display_name: 'Ganglia',
-				service_components: [
-					Ember.Object.create({
-						display_name: 'Server',
-						component_value: ''
-					})
-				]
-			}),
-			Ember.Object.create({
-				service_name: 'HCATALOG',
-				display_name: 'HCatalog',
-				service_components: [
-					Ember.Object.create({
+  {
+    config_name: 'cluster',
+    display_name: 'Cluster Name',
+    config_value: ''
+  },
+  {
+    config_name: 'hosts',
+    display_name: 'Total Hosts',
+    config_value: ''
+  },
+  {
+    config_name: 'Repo',
+    display_name: 'Local Repository',
+    config_value: ''
+  },
+  {
+    config_name: 'services',
+    display_name: 'Services',
+    config_value: [
+      Ember.Object.create({
+        service_name: 'HDFS',
+        display_name: 'HDFS',
+        service_components: [
+          Ember.Object.create({
+            display_name: 'NameNode',
+            component_value: ''
+          }),
+          Ember.Object.create({
+            display_name: 'SecondaryNameNode',
+            component_value: ''
+          }),
+          Ember.Object.create({
+            display_name: 'DataNodes',
+            component_value: ''
+          })
+        ]
+      }),
+      Ember.Object.create({
+        service_name: 'MAPREDUCE',
+        display_name: 'MapReduce',
+        service_components: [
+          Ember.Object.create({
+            display_name: 'JobTracker',
+            component_value: ''
+          }),
+          Ember.Object.create({
+            display_name: 'TaskTrackers',
+            component_value: ''
+          })
+        ]
+      }),
+      Ember.Object.create({
+        service_name: 'HIVE',
+        display_name: 'Hive + HCatalog',
+        service_components: [
+          Ember.Object.create({
+            display_name: 'Hive Metastore Server',
+            component_value: ''
+          }),
+          Ember.Object.create({
+            display_name: 'Database',
+            component_value: ''
+          })
+        ]
+      }),
+      Ember.Object.create({
+        service_name: 'HBASE',
+        display_name: 'HBase',
+        service_components: [
+          Ember.Object.create({
+            display_name: 'Master',
+            component_value: ''
+          }),
+          Ember.Object.create({
+            display_name: 'Region Servers',
+            component_value: ''
+          })
+        ]
+      }),
+      Ember.Object.create({
+        service_name: 'ZOOKEEPER',
+        display_name: 'ZooKeeper',
+        service_components: [
+          Ember.Object.create({
+            display_name: 'Servers',
+            component_value: ''
+          })
+        ]
+      }),
+      Ember.Object.create({
+        service_name: 'OOZIE',
+        display_name: 'Oozie',
+        service_components: [
+          Ember.Object.create({
+            display_name: 'Server',
+            component_value: ''
+          }),
+          Ember.Object.create({
+            display_name: 'Database',
+            component_value: ''
+          })
+        ]
+      }),
+      Ember.Object.create({
+        service_name: 'NAGIOS',
+        display_name: 'Nagios',
+        service_components: [
+          Ember.Object.create({
+            display_name: 'Server',
+            component_value: ''
+          }),
+          Ember.Object.create({
+            display_name: 'Administrator',
+            component_value: ''
+          })
+        ]
+      }),
+      Ember.Object.create({
+        service_name: 'GANGLIA',
+        display_name: 'Ganglia',
+        service_components: [
+          Ember.Object.create({
+            display_name: 'Server',
+            component_value: ''
+          })
+        ]
+      }),
+      Ember.Object.create({
+        service_name: 'HCATALOG',
+        display_name: 'HCatalog',
+        service_components: [
+          Ember.Object.create({
 
-					})
-				]
-			})
+          })
+        ]
+      })
 
-		]
-	}
+    ]
+  }
 ];
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service_config.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service_config.js?rev=1402297&r1=1402296&r2=1402297&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service_config.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service_config.js Thu Oct 25 19:47:29 2012
@@ -29,8 +29,8 @@ App.ServiceConfig = Ember.Object.extend(
   configs: null,
 
   errorCount: function () {
-    return this.get('configs').filterProperty('isValid', false).get('length');
-  }.property('configs.@each.isValid')
+    return this.get('configs').filterProperty('isValid', false).filterProperty('isVisible',true).get('length');
+  }.property('configs.@each.isValid','configs.@each.isVisible')
 });
 
 App.ServiceConfigCategory = Ember.Object.extend({
@@ -128,9 +128,15 @@ App.ServiceConfigProperty = Ember.Object
       case 'hivemetastore.host':
         this.set('value', masterComponentHostsInDB.findProperty('component','Hive Metastore').hostName);
         break;
+      case 'hive_ambari_host':
+        this.set('value', masterComponentHostsInDB.findProperty('component','Hive Metastore').hostName);
+        break;
       case 'oozieserver.host':
         this.set('value', masterComponentHostsInDB.findProperty('component','Oozie Server').hostName);
         break;
+      case 'oozie_ambari_host':
+        this.set('value', masterComponentHostsInDB.findProperty('component','Oozie Server').hostName);
+        break;
     }
   },
 
@@ -144,6 +150,11 @@ App.ServiceConfigProperty = Ember.Object
         return App.ServiceConfigCheckbox;
       case 'password':
         return App.ServiceConfigPasswordField;
+      case 'combobox':
+        return App.ServiceConfigComboBox;
+      case 'radio button':
+        return App.ServiceConfigRadioButtons;
+        break;
       case 'directories':
         return App.ServiceConfigTextArea;
       case 'custom':

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step7.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step7.hbs?rev=1402297&r1=1402296&r2=1402297&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step7.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/installer/step7.hbs Thu Oct 25 19:47:29 2012
@@ -26,8 +26,8 @@
     {{#each service in controller}}
     {{#view App.ServiceConfigTab}}
     <a class="active" href="#{{unbound service.serviceName}}"
-           data-toggle="tab" {{action selectService service target="view"}}>{{service.displayName}}{{#if service.errorCount}}<span
-      class="badge badge-important">{{service.errorCount}}</span>{{/if}}</a>
+       data-toggle="tab" {{action selectService service target="view"}}>{{service.displayName}}{{#if service.errorCount}}<span
+            class="badge badge-important">{{service.errorCount}}</span>{{/if}}</a>
     {{/view}}
     {{/each}}
   </ul>
@@ -44,12 +44,12 @@
         <div class="accordion-inner">
           {{#if category.isForSlaveComponent}}
           <div class="slave-component-group-menu">
-          {{view App.SlaveComponentGroupsMenu}}
+            {{view App.SlaveComponentGroupsMenu}}
           </div>
           {{#view App.AddSlaveComponentGroupButton slaveComponentNameBinding="category.name"}}
           <a
-            class="btn add-slave-component-group btn-large" {{action addSlaveComponentGroup category.name target="App.router.slaveComponentGroupsController"}}><i
-            class="icon-plus"></i></a>
+                  class="btn add-slave-component-group btn-large" {{action addSlaveComponentGroup category.name target="App.router.slaveComponentGroupsController"}}><i
+                  class="icon-plus"></i></a>
           {{/view}}
           <div class="remove-group-error control-group warning">
             <span class="help-inline">You cannot delete this group since there are hosts assigned to it. You must assign them to another group before you can delete this group.</span>
@@ -58,24 +58,27 @@
           <form class="form-horizontal">
             {{#if category.isForSlaveComponent}}
             {{#view App.SlaveComponentChangeGroupNameView}}
-              <label class="control-label">Group name</label>
-              <div class="controls">
-                <div class="span6">
-                  <input class="span9" type="text" {{bindAttr value="view.content.name"}}>
-                  <button class="btn" {{action changeGroupName target="view"}}>Save</button>
-                </div>
-                <span class="help-inline">{{view.errorMessage}}</span>
+            <label class="control-label">Group name</label>
+
+            <div class="controls">
+              <div class="span6">
+                <input class="span9" type="text" {{bindAttr value="view.content.name"}}>
+                <button class="btn" {{action changeGroupName target="view"}}>Save</button>
               </div>
+              <span class="help-inline">{{view.errorMessage}}</span>
+            </div>
             {{/view}}
             {{/if}}
             {{#each view.categoryConfigs}}
+            {{#if isVisible}}
             <div {{bindAttr class="errorMessage:error: :control-group"}}>
               <label class="control-label">{{displayName}}</label>
               <div class="controls">
-                {{view viewClass serviceConfigBinding="this"}}
+                {{view viewClass serviceConfigBinding="this" categoryConfigsBinding="view.categoryConfigs"}}
                 <span class="help-inline">{{errorMessage}}</span>
               </div>
             </div>
+            {{/if}}
             {{/each}}
           </form>
         </div>

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step7_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step7_view.js?rev=1402297&r1=1402296&r2=1402297&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step7_view.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/installer/step7_view.js Thu Oct 25 19:47:29 2012
@@ -149,6 +149,65 @@ App.ServiceConfigCheckbox = Ember.Checkb
 
 });
 
+
+<!-- {{bindAttr name="view.name" value="option"}}  '<input type="radio" {{bindAttr name = "view.name" value="view.obj"}}>',-->
+App.ServiceConfigRadioButtons = Ember.View.extend({
+  template: Ember.Handlebars.compile([
+    '{{#each option in view.options}}',
+    '<label class="radio">',
+    '{{#view App.ServiceConfigRadioButton nameBinding = "view.name" valueBinding = "option.displayName"}}',
+    '{{/view}}',
+    '{{option.displayName}} &nbsp;',
+    '</label>',
+    '{{/each}}'
+  ].join('\n')),
+  serviceConfig: null,
+  categoryConfigs: null,
+  nameBinding: 'serviceConfig.radioName',
+  optionsBinding: 'serviceConfig.options'
+});
+
+App.ServiceConfigRadioButton = Ember.Checkbox.extend({
+  tagName: 'input',
+  attributeBindings: ['type', 'name', 'value', 'checked'],
+  checked: false,
+  type: 'radio',
+  name: null,
+  value: null,
+
+  didInsertElement: function () {
+    if (this.get('parentView.serviceConfig.value') === this.get('value')) {
+      this.set('checked', true);
+    }
+  },
+
+  click: function () {
+    this.set('checked', true);
+    this.onChecked();
+  },
+
+  onChecked: function () {
+    this.set('parentView.serviceConfig.value', this.get('value'));
+    var components = this.get('parentView.serviceConfig.options');
+    components.forEach(function (_component) {
+      _component.foreignKeys.forEach(function (_componentName) {
+        var component = this.get('parentView.categoryConfigs').findProperty('name', _componentName);
+        if (_component.displayName === this.get('value')) {
+          component.set('isVisible', true);
+        } else {
+          component.set('isVisible', false);
+        }
+      }, this);
+    }, this);
+  }.observes('checked')
+});
+
+App.ServiceConfigComboBox = Ember.Select.extend(App.ServiceConfigPopoverSupport, {
+  contentBinding: 'serviceConfig.options',
+  selectionBinding: 'serviceConfig.value',
+  classNames: [ 'span3' ]
+});
+
 App.ServiceConfigHostPopoverSupport = Ember.Mixin.create({
   didInsertElement: function () {
     this.$().popover({
@@ -232,33 +291,32 @@ App.AddSlaveComponentGroupButton = Ember
       trigger: 'hover'
     });
   }
-
 });
 
 App.SlaveComponentGroupsMenu = Em.CollectionView.extend({
   controllerBinding: 'App.router.slaveComponentGroupsController',
-  content: function(){
+  content: function () {
     return this.get('controller.componentGroups');
   }.property('controller.componentGroups'),
-  tagName:'ul',
+  tagName: 'ul',
   classNames: ["nav", "nav-tabs"],
 
-  itemViewClass:Em.View.extend({
-    classNameBindings:["active"],
-    active:function(){
+  itemViewClass: Em.View.extend({
+    classNameBindings: ["active"],
+    active: function () {
       return this.get('content.active');
     }.property('content.active'),
-    template:Ember.Handlebars.compile('<a {{action showSlaveComponentGroup view.content target="controller"}} href="#"> {{view.content.name}}</a><i {{action removeSlaveComponentGroup view.content target="controller"}} class="icon-remove"></i>')  })
+    template: Ember.Handlebars.compile('<a {{action showSlaveComponentGroup view.content target="controller"}} href="#"> {{view.content.name}}</a><i {{action removeSlaveComponentGroup view.content target="controller"}} class="icon-remove"></i>')  })
 });
 
 App.ServiceConfigSlaveHostsView = Ember.View.extend(App.ServiceConfigMultipleHostsDisplay, {
   classNames: ['slave-hosts', 'span6'],
   controllerBinding: 'App.router.slaveComponentGroupsController',
   valueBinding: 'hosts',
-  group: function(){
+  group: function () {
     return this.get('controller.activeGroup');
   }.property('controller.activeGroup'),
-  hosts: function(){
+  hosts: function () {
     if (this.get('group') !== undefined)
       return this.get('controller').getHostsByGroup(this.get('group'))
   }.property('controller.hosts.@each.group', 'group'),
@@ -271,11 +329,11 @@ App.ServiceConfigSlaveHostsView = Ember.
 App.SlaveComponentDropDownGroupView = Ember.View.extend({
   controllerBinding: 'App.router.slaveComponentGroupsController',
   optionTag: Ember.View.extend({
-    selected: function(){
+    selected: function () {
       var parent = this._parentView.templateData.view;
       return parent.get('content.group') === this.get('content');
     }.property('content'),
-    changeGroup: function(event) {
+    changeGroup: function (event) {
       var parent = this._parentView.templateData.view;
       var groupName = this.get('content');
       var host = parent.get('content');
@@ -290,15 +348,15 @@ App.SlaveComponentChangeGroupNameView = 
   classNames: ['control-group'],
   classNameBindings: 'error',
   error: false,
-  setError: function(){
+  setError: function () {
     this.set('error', false);
   }.observes('controller.activeGroup'),
-  errorMessage: function(){
+  errorMessage: function () {
     return this.get('error') ? 'group with this name already exist' : '';
   }.property('error'),
-  changeGroupName: function(event) {
-    var inputVal = $('#'+this.get('elementId') + ' input[type="text"]').val();
-    if (inputVal !== this.get('content.name')){
+  changeGroupName: function (event) {
+    var inputVal = $('#' + this.get('elementId') + ' input[type="text"]').val();
+    if (inputVal !== this.get('content.name')) {
       var result = this.get('controller').changeSlaveGroupName(this.get('content'), inputVal);
       this.set('error', result);
     }



Mime
View raw message