ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject [2/2] ambari git commit: AMBARI-9619 Kerberos: integrate FE option to not generate kerb client krb5.conf. (ababiichuk)
Date Fri, 13 Feb 2015 13:57:50 GMT
AMBARI-9619 Kerberos: integrate FE option to not generate kerb client krb5.conf. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: 14cc17d5f0f7fe8642552a842d02c2f9ac343460
Parents: 9bb05ec
Author: aBabiichuk <ababiichuk@cybervisiontech.com>
Authored: Fri Feb 13 13:47:38 2015 +0200
Committer: aBabiichuk <ababiichuk@cybervisiontech.com>
Committed: Fri Feb 13 15:57:43 2015 +0200

----------------------------------------------------------------------
 .../main/admin/kerberos/step2_controller.js     |  4 ++-
 ambari-web/app/data/HDP2/site_properties.js     | 16 ++++++++++--
 ambari-web/app/views/common/controls_view.js    | 27 +++++++++++++++-----
 3 files changed, 37 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/14cc17d5/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js b/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
index b8f598b..5ec3be4 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
@@ -206,8 +206,10 @@ App.KerberosWizardStep2Controller = App.WizardStep7Controller.extend({
     var service = App.StackService.find().findProperty('serviceName', 'KERBEROS');
     var serviceConfigTags = [];
     var tag = 'version' + (new Date).getTime();
+    var configs = this.get('stepConfigs')[0].get('configs')
+    var skipKrbConfProperties = configs && Em.get(configs.findProperty('name', 'manage_krb5_conf'),
'value') === "false";
     Object.keys(service.get('configTypes')).forEach(function (type) {
-      if (!serviceConfigTags.someProperty('type', type)) {
+      if (!serviceConfigTags.someProperty('type', type) && !(type === "krb5-conf"
&& skipKrbConfProperties)) {
         var obj = this.createKerberosSiteObj(type, tag);
         obj.service_config_version_note = Em.I18n.t('admin.kerberos.wizard.configuration.note');
         serviceConfigTags.pushObject(obj);

http://git-wip-us.apache.org/repos/asf/ambari/blob/14cc17d5/ambari-web/app/data/HDP2/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js
index 60bcbe0..f2da00f 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -1940,6 +1940,7 @@ var hdp2properties = [
     "displayName": "Encryption Types",
     "serviceName": "KERBEROS",
     "filename": "kerberos-env.xml",
+    "displayType": "multiLine",
     "category": "Advanced kerberos-env"
   },
   {
@@ -1995,6 +1996,17 @@ var hdp2properties = [
   },
   {
     "id": "puppet var",
+    "name": "manage_krb5_conf",
+    "displayName": "Manage Kerberos client krb5.conf",
+    "displayType": "checkbox",
+    "dependentConfigPattern": "CATEGORY",
+    "serviceName": "KERBEROS",
+    "filename": "krb5-conf.xml",
+    "category": "Advanced krb5-conf",
+    "index": 0
+  },
+  {
+    "id": "puppet var",
     "name": "conf_dir",
     "displayName": "krb5-conf directory path",
     "value": "",
@@ -2007,7 +2019,7 @@ var hdp2properties = [
     "serviceName": "KERBEROS",
     "filename": "krb5-conf.xml",
     "category": "Advanced krb5-conf",
-    "index": 0
+    "index": 1
   },
   {
     "id": "puppet var",
@@ -2023,7 +2035,7 @@ var hdp2properties = [
     "serviceName": "KERBEROS",
     "filename": "krb5-conf.xml",
     "category": "Advanced krb5-conf",
-    "index": 1
+    "index": 2
   },
 /********************************************* flume-agent *****************************/
   {

http://git-wip-us.apache.org/repos/asf/ambari/blob/14cc17d5/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 083a226..bd5e7e6 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -273,17 +273,30 @@ App.ServiceConfigCheckboxWithDependencies = App.ServiceConfigCheckbox.extend({
 
   didInsertElement: function() {
     this._super();
-    this.showHideDependentConfigs();
+    this.toggleDependentConfigs();
   },
 
-  showHideDependentConfigs: function() {
+  toggleDependentConfigs: function() {
     if (this.get('serviceConfig.dependentConfigPattern')) {
-      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);
+      if (this.get('serviceConfig.dependentConfigPattern') === "CATEGORY") {
+        this.disableEnableCategoryCongis();
+      } else {
+        this.showHideDependentConfigs();
+      }
     }
-  }.observes('checked')
+  }.observes('checked'),
+
+  disableEnableCategoryCongis: function () {
+    this.get('categoryConfigsAll').setEach('isEditable', this.get('checked'));
+    this.set('serviceConfig.isEditable', true);
+  },
+
+  showHideDependentConfigs: function () {
+    this.get('categoryConfigsAll').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);
+  }
 });
 
 App.ServiceConfigRadioButtons = Ember.View.extend(App.ServiceConfigCalculateId, {


Mime
View raw message