ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject [1/2] ambari git commit: AMBARI-9471 Ambari Web UI changes required to support Ranger Installation part 2 (recommit). (ababiichuk)
Date Wed, 11 Feb 2015 17:01:11 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk fb0903e50 -> 1d6379345


AMBARI-9471 Ambari Web UI changes required to support Ranger Installation part 2 (recommit).
(ababiichuk)


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

Branch: refs/heads/trunk
Commit: 7656f2fb28dce988999906664e2f2a5f527a8bd1
Parents: fb0903e
Author: aBabiichuk <ababiichuk@cybervisiontech.com>
Authored: Wed Feb 11 17:53:26 2015 +0200
Committer: aBabiichuk <ababiichuk@cybervisiontech.com>
Committed: Wed Feb 11 19:00:55 2015 +0200

----------------------------------------------------------------------
 ambari-web/app/data/HDP2.2/site_properties.js | 308 ++++++++++++++-------
 ambari-web/app/models/stack_service.js        |   6 +-
 ambari-web/app/utils/config.js                |   1 +
 ambari-web/app/views/common/controls_view.js  |   6 +-
 4 files changed, 220 insertions(+), 101 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7656f2fb/ambari-web/app/data/HDP2.2/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2.2/site_properties.js b/ambari-web/app/data/HDP2.2/site_properties.js
index 8873a25..c4f792a 100644
--- a/ambari-web/app/data/HDP2.2/site_properties.js
+++ b/ambari-web/app/data/HDP2.2/site_properties.js
@@ -136,20 +136,30 @@ hdp22properties.push(
     "serviceName": "HDFS"
   },
   {
-    "id": "puppet var",
-    "name": "RANGER_HOST",
-    "displayName": "Policy Admin URL",
-    "value": "",
-    "defaultValue": "",
-    "description": "The host that has been assigned to run Ranger Server",
-    "displayType": "masterHost",
-    "isOverridable": false,
-    "isVisible": true,
-    "isRequiredByAgent": false,
-    "isRequired": false,
-    "serviceName": "HDFS",
+    "id": "site property",
+    "name": "POLICY_USER",
+    "value": "ambari-qa",
+    "defaultValue": "ambari-qa",
+    "displayName": "policy User for HDFS",
     "filename": "ranger-hdfs-plugin-properties.xml",
-    "category": "Advanced ranger-hdfs-plugin-properties"
+    "category": "Advanced ranger-hdfs-plugin-properties",
+    "serviceName": "HDFS"
+  },
+  {
+    "id": "site property",
+    "name": "REPOSITORY_CONFIG_PASSWORD",
+    "displayName": "Ranger repository config password",
+    "filename": "ranger-hdfs-plugin-properties.xml",
+    "category": "Advanced ranger-hdfs-plugin-properties",
+    "serviceName": "HDFS"
+  },
+  {
+    "id": "site property",
+    "name": "REPOSITORY_CONFIG_USERNAME",
+    "displayName": "Ranger repository config user",
+    "filename": "ranger-hdfs-plugin-properties.xml",
+    "category": "Advanced ranger-hdfs-plugin-properties",
+    "serviceName": "HDFS"
   },
   /*********RANGER FOR HIVE************/
   {
@@ -183,29 +193,39 @@ hdp22properties.push(
   },
   {
     "id": "site property",
-    "name": "UPDATE_XAPOLICIES_ON_GRANT_REVOKE",
-    "defaultValue": true,
-    "displayName": "Should Hive GRANT/REVOKE update XA policies?",
-    "displayType": "checkbox",
+    "name": "POLICY_USER",
+    "value": "ambari-qa",
+    "defaultValue": "ambari-qa",
+    "displayName": "policy User for HIVE",
     "filename": "ranger-hive-plugin-properties.xml",
     "category": "Advanced ranger-hive-plugin-properties",
     "serviceName": "HIVE"
   },
   {
-    "id": "puppet var",
-    "name": "RANGER_HOST",
-    "displayName": "Policy Admin URL",
-    "value": "",
-    "defaultValue": "",
-    "description": "The host that has been assigned to run Ranger Server",
-    "displayType": "masterHost",
-    "isOverridable": false,
-    "isVisible": true,
-    "isRequiredByAgent": false,
-    "isRequired": false,
-    "serviceName": "HIVE",
+    "id": "site property",
+    "name": "REPOSITORY_CONFIG_PASSWORD",
+    "displayName": "Ranger repository config password",
     "filename": "ranger-hive-plugin-properties.xml",
-    "category": "Advanced ranger-hive-plugin-properties"
+    "category": "Advanced ranger-hive-plugin-properties",
+    "serviceName": "HIVE"
+  },
+  {
+    "id": "site property",
+    "name": "REPOSITORY_CONFIG_USERNAME",
+    "displayName": "Ranger repository config user",
+    "filename": "ranger-hive-plugin-properties.xml",
+    "category": "Advanced ranger-hive-plugin-properties",
+    "serviceName": "HIVE"
+  },
+  {
+    "id": "site property",
+    "name": "UPDATE_XAPOLICIES_ON_GRANT_REVOKE",
+    "defaultValue": true,
+    "displayType": "checkbox",
+    "displayName": "Should Hive GRANT/REVOKE update XA policies?",
+    "filename": "ranger-hive-plugin-properties.xml",
+    "category": "Advanced ranger-hive-plugin-properties",
+    "serviceName": "HIVE"
   },
   /*********RANGER FOR HBASE************/
   {
@@ -239,6 +259,32 @@ hdp22properties.push(
   },
   {
     "id": "site property",
+    "name": "POLICY_USER",
+    "value": "ambari-qa",
+    "defaultValue": "ambari-qa",
+    "displayName": "policy User for HBASE",
+    "filename": "ranger-hbase-plugin-properties.xml",
+    "category": "Advanced ranger-hbase-plugin-properties",
+    "serviceName": "HBASE"
+  },
+  {
+    "id": "site property",
+    "name": "REPOSITORY_CONFIG_PASSWORD",
+    "displayName": "Ranger repository config password",
+    "filename": "ranger-hbase-plugin-properties.xml",
+    "category": "Advanced ranger-hbase-plugin-properties",
+    "serviceName": "HBASE"
+  },
+  {
+    "id": "site property",
+    "name": "REPOSITORY_CONFIG_USERNAME",
+    "displayName": "Ranger repository config user",
+    "filename": "ranger-hbase-plugin-properties.xml",
+    "category": "RepositoryConfigs",
+    "serviceName": "HBASE"
+  },
+  {
+    "id": "site property",
     "name": "UPDATE_XAPOLICIES_ON_GRANT_REVOKE",
     "defaultValue": true,
     "displayName": "Should HBase GRANT/REVOKE update XA policies?",
@@ -247,22 +293,6 @@ hdp22properties.push(
     "category": "Advanced ranger-hbase-plugin-properties",
     "serviceName": "HBASE"
   },
-  {
-    "id": "puppet var",
-    "name": "RANGER_HOST",
-    "displayName": "Policy Admin URL",
-    "value": "",
-    "defaultValue": "",
-    "description": "The host that has been assigned to run Ranger Server",
-    "displayType": "masterHost",
-    "isOverridable": false,
-    "isVisible": true,
-    "isRequiredByAgent": false,
-    "isRequired": false,
-    "serviceName": "HBASE",
-    "filename": "ranger-hbase-plugin-properties.xml",
-    "category": "Advanced ranger-hbase-plugin-properties"
-  },
   /*********RANGER FOR STORM************/
   {
     "id": "site property",
@@ -280,7 +310,7 @@ hdp22properties.push(
     "displayName": "Audit to DB",
     "displayType": "checkbox",
     "filename": "ranger-storm-plugin-properties.xml",
-    "category": "Advanced storm-hbase-plugin-properties",
+    "category": "Advanced ranger-storm-plugin-properties",
     "serviceName": "STORM"
   },
   {
@@ -294,20 +324,30 @@ hdp22properties.push(
     "serviceName": "STORM"
   },
   {
-    "id": "puppet var",
-    "name": "RANGER_HOST",
-    "displayName": "Policy Admin URL",
-    "value": "",
-    "defaultValue": "",
-    "description": "The host that has been assigned to run Ranger Server",
-    "displayType": "masterHost",
-    "isOverridable": false,
-    "isVisible": true,
-    "isRequiredByAgent": false,
-    "isRequired": false,
-    "serviceName": "STORM",
+    "id": "site property",
+    "name": "POLICY_USER",
+    "value": "ambari-qa",
+    "defaultValue": "ambari-qa",
+    "displayName": "policy User for STORM",
     "filename": "ranger-storm-plugin-properties.xml",
-    "category": "Advanced ranger-strom-plugin-properties"
+    "category": "Advanced ranger-storm-plugin-properties",
+    "serviceName": "STORM"
+  },
+  {
+    "id": "site property",
+    "name": "REPOSITORY_CONFIG_PASSWORD",
+    "displayName": "Ranger repository config password",
+    "filename": "ranger-storm-plugin-properties.xml",
+    "category": "Advanced ranger-storm-plugin-properties",
+    "serviceName": "STORM"
+  },
+  {
+    "id": "site property",
+    "name": "REPOSITORY_CONFIG_USERNAME",
+    "displayName": "Ranger repository config user",
+    "filename": "ranger-storm-plugin-properties.xml",
+    "category": "Advanced ranger-storm-plugin-properties",
+    "serviceName": "STORM"
   },
   /*********RANGER FOR KNOX************/
   {
@@ -340,40 +380,34 @@ hdp22properties.push(
     "serviceName": "KNOX"
   },
   {
-    "id": "puppet var",
-    "name": "RANGER_HOST",
-    "displayName": "Policy Admin URL",
-    "value": "",
-    "defaultValue": "",
-    "description": "The host that has been assigned to run Ranger Server",
-    "displayType": "masterHost",
-    "isOverridable": false,
-    "isVisible": true,
-    "isRequiredByAgent": false,
-    "isRequired": false,
-    "serviceName": "KNOX",
+    "id": "site property",
+    "name": "POLICY_USER",
+    "value": "ambari-qa",
+    "defaultValue": "ambari-qa",
+    "displayName": "policy User for KNOX",
     "filename": "ranger-knox-plugin-properties.xml",
-    "category": "Advanced ranger-knox-plugin-properties"
+    "category": "Advanced ranger-knox-plugin-properties",
+    "serviceName": "KNOX"
   },
-  /**********************************************RANGER***************************************/
   {
-    "id": "puppet var",
-    "name": "RANGER_HOST",
-    "displayName": "Policy Admin URL",
-    "value": "",
-    "defaultValue": "",
-    "description": "The host that has been assigned to run Ranger Server",
-    "displayType": "masterHost",
-    "isOverridable": false,
-    "isVisible": true,
-    "isRequiredByAgent": false,
-    "isRequired": false,
-    "serviceName": "RANGER",
-    "filename": "admin-properties.xml",
-    "category": "Advanced admin-properties"
+    "id": "site property",
+    "name": "REPOSITORY_CONFIG_PASSWORD",
+    "displayName": "Ranger repository config password",
+    "filename": "ranger-knox-plugin-properties.xml",
+    "category": "Advanced ranger-knox-plugin-properties",
+    "serviceName": "KNOX"
   },
   {
     "id": "site property",
+    "name": "REPOSITORY_CONFIG_USERNAME",
+    "displayName": "Ranger repository config user",
+    "filename": "ranger-knox-plugin-properties.xml",
+    "category": "Advanced ranger-knox-plugin-properties",
+    "serviceName": "KNOX"
+  },
+  /**********************************************RANGER***************************************/
+  {
+    "id": "site property",
     "name": "ambari_user_password",
     "displayName": "Ranger Admin user's password for Ambari",
     "defaultValue": "ambari",
@@ -563,7 +597,7 @@ hdp22properties.push(
     "isVisible": true,
     "serviceName": "RANGER",
     "filename": "admin-properties.xml",
-    "category": "Advanced admin-properties"
+    "category": "RangerSettings"
   },
   {
     "id": "puppet var",
@@ -576,7 +610,7 @@ hdp22properties.push(
     "isVisible": true,
     "serviceName": "RANGER",
     "filename": "admin-properties.xml",
-    "category": "Advanced admin-properties"
+    "category": "RangerSettings"
   },
   {
     "id": "puppet var",
@@ -589,7 +623,7 @@ hdp22properties.push(
     "isVisible": true,
     "serviceName": "RANGER",
     "filename": "admin-properties.xml",
-    "category": "Advanced admin-properties"
+    "category": "RangerSettings"
   },
   {
     "id": "puppet var",
@@ -602,7 +636,7 @@ hdp22properties.push(
     "isVisible": true,
     "serviceName": "RANGER",
     "filename": "admin-properties.xml",
-    "category": "Advanced admin-properties"
+    "category": "RangerSettings"
   },
   {
     "id": "site property",
@@ -620,7 +654,7 @@ hdp22properties.push(
       },
       {
         displayName: 'UNIX',
-        foreignKeys: ['remoteLoginEnabled', 'authServiceHostName','authServicePort']
+        foreignKeys: ['remoteLoginEnabled', 'authServiceHostName', 'authServicePort']
       },
       {
         displayName: 'NONE'
@@ -633,10 +667,10 @@ hdp22properties.push(
     "isVisible": true,
     "serviceName": "RANGER",
     "filename": "admin-properties.xml",
-    "category": "Advanced admin-properties"
+    "category": "RangerSettings"
   },
   {
-    "id": "puppet var",
+    "id": "site property",
     "name": "remoteLoginEnabled",
     "displayName": "Allow remote Login",
     "defaultValue": true,
@@ -646,13 +680,93 @@ hdp22properties.push(
     "isVisible": true,
     "serviceName": "RANGER",
     "filename": "admin-properties.xml",
-    "category": "Advanced admin-properties"
+    "category": "UnixAuthenticationSettings"
+  },
+  {
+    "id": "site property",
+    "name": "authServiceHostName",
+    "displayName": "authServiceHostName",
+    "defaultValue": 'localhost',
+    "isReconfigurable": true,
+    "isOverridable": false,
+    "isVisible": true,
+    "serviceName": "RANGER",
+    "filename": "admin-properties.xml",
+    "category": "UnixAuthenticationSettings"
+  },
+  {
+    "id": "site property",
+    "name": "authServicePort",
+    "displayName": "authServicePort",
+    "defaultValue": '5151',
+    "isReconfigurable": true,
+    "displayType": "int",
+    "isOverridable": false,
+    "isVisible": true,
+    "serviceName": "RANGER",
+    "filename": "admin-properties.xml",
+    "category": "UnixAuthenticationSettings"
+  },
+  {
+    "id": "site property",
+    "name": "xa_ldap_url",
+    "displayName": "xa_ldap_url",
+    "isReconfigurable": true,
+    "isOverridable": false,
+    "isVisible": true,
+    "serviceName": "RANGER",
+    "filename": "admin-properties.xml",
+    "category": "LDAPSettings"
+  },
+  {
+    "id": "site property",
+    "name": "xa_ldap_userDNpattern",
+    "displayName": "xa_ldap_userDNpattern",
+    "isReconfigurable": true,
+    "isOverridable": false,
+    "isVisible": true,
+    "serviceName": "RANGER",
+    "filename": "admin-properties.xml",
+    "category": "LDAPSettings"
+  },
+  {
+    "id": "site property",
+    "name": "xa_ldap_groupRoleAttribute",
+    "displayName": "xa_ldap_groupRoleAttribute",
+    "isReconfigurable": true,
+    "isOverridable": false,
+    "isVisible": true,
+    "serviceName": "RANGER",
+    "filename": "admin-properties.xml",
+    "category": "LDAPSettings"
+  },
+  {
+    "id": "site property",
+    "name": "xa_ldap_ad_domain",
+    "displayName": "xa_ldap_ad_domain",
+    "isReconfigurable": true,
+    "isOverridable": false,
+    "isVisible": true,
+    "serviceName": "RANGER",
+    "filename": "admin-properties.xml",
+    "category": "ADSettings"
+  },
+  {
+    "id": "site property",
+    "name": "xa_ldap_ad_url",
+    "displayName": "xa_ldap_ad_url",
+    "isReconfigurable": true,
+    "isOverridable": false,
+    "isVisible": true,
+    "serviceName": "RANGER",
+    "filename": "admin-properties.xml",
+    "category": "ADSettings"
   }
 );
 
 var additionalProperties = [];
 
-hdp22SepcificProperties.forEach(function(config) {
+hdp22SepcificProperties.forEach(function (config) {
   if (!hdp22properties.findProperty('name', config.name)) additionalProperties.push(config);
   else {
     hdp22properties.findProperty('name', config.name).category = config.category;

http://git-wip-us.apache.org/repos/asf/ambari/blob/7656f2fb/ambari-web/app/models/stack_service.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/stack_service.js b/ambari-web/app/models/stack_service.js
index c950e48..8df3882 100644
--- a/ambari-web/app/models/stack_service.js
+++ b/ambari-web/app/models/stack_service.js
@@ -328,7 +328,11 @@ App.StackService.configCategories = function () {
     case 'RANGER':
       serviceConfigCategories.pushObjects([
         App.ServiceConfigCategory.create({ name: 'AdminSettings', displayName: 'Admin Settings'}),
-        App.ServiceConfigCategory.create({ name: 'DBSettings', displayName: 'DB Settings'})
+        App.ServiceConfigCategory.create({ name: 'DBSettings', displayName: 'DB Settings'}),
+        App.ServiceConfigCategory.create({ name: 'RangerSettings', displayName: 'Ranger Settings'}),
+        App.ServiceConfigCategory.create({ name: 'UnixAuthenticationSettings', displayName:
'Unix Authentication Settings'}),
+        App.ServiceConfigCategory.create({ name: 'ADSettings', displayName: 'AD Settings'}),
+        App.ServiceConfigCategory.create({ name: 'LDAPSettings', displayName: 'LDAP Settings'})
       ]);
       break;
     case 'PIG':

http://git-wip-us.apache.org/repos/asf/ambari/blob/7656f2fb/ambari-web/app/utils/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index 24cfbb7..febfa1b 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -425,6 +425,7 @@ App.config = Em.Object.create({
     serviceConfigObj.belongsToService = configsPropertyDef.belongsToService;
     serviceConfigObj.category = configsPropertyDef.category;
     serviceConfigObj.showLabel = configsPropertyDef.showLabel !== false;
+    serviceConfigObj.dependentConfigPattern = configsPropertyDef.dependentConfigPattern
   },
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/7656f2fb/ambari-web/app/views/common/controls_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/controls_view.js b/ambari-web/app/views/common/controls_view.js
index f1f108d..083a226 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -278,7 +278,7 @@ App.ServiceConfigCheckboxWithDependencies = App.ServiceConfigCheckbox.extend({
 
   showHideDependentConfigs: function() {
     if (this.get('serviceConfig.dependentConfigPattern')) {
-      this.get('categoryConfigsAll').forEach(function(c) {
+      this.get('parentView.serviceConfigs').forEach(function(c) {
         if (c.get('name').match(this.get('serviceConfig.dependentConfigPattern')) &&
c.get('name') != this.get('serviceConfig.name'))
           c.set('isVisible', this.get('checked'))
       }, this);
@@ -580,8 +580,8 @@ App.ServiceConfigRadioButton = Ember.Checkbox.extend({
         components.forEach(function (_component) {
           if (_component.foreignKeys) {
             _component.foreignKeys.forEach(function (_componentName) {
-              if (this.get('parentView.categoryConfigsAll').someProperty('name', _componentName))
{
-                var component = this.get('parentView.categoryConfigsAll').findProperty('name',
_componentName);
+              if (this.get('parentView.parentView.serviceConfigs').someProperty('name', _componentName))
{
+                var component = this.get('parentView.parentView.serviceConfigs').findProperty('name',
_componentName);
                 component.set('isVisible', _component.displayName === this.get('value'));
               }
             }, this);


Mime
View raw message