You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2015/03/17 18:20:44 UTC

ambari git commit: AMBARI-10104 Enhanced Configs: create models and mappers for tab sections and subsections (additional). (ababiichuk)

Repository: ambari
Updated Branches:
  refs/heads/trunk c34b47410 -> a0dab0ce8


AMBARI-10104 Enhanced Configs: create models and mappers for tab sections and subsections (additional). (ababiichuk)


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

Branch: refs/heads/trunk
Commit: a0dab0ce868f55f668c2a2ed9ce575fb5af3cd46
Parents: c34b474
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Tue Mar 17 19:18:48 2015 +0200
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Tue Mar 17 19:20:23 2015 +0200

----------------------------------------------------------------------
 ambari-web/app/config.js                                   | 3 ++-
 ambari-web/app/controllers/installer.js                    | 6 ++++++
 ambari-web/app/controllers/main/service/add_controller.js  | 6 ++++++
 ambari-web/app/controllers/main/service/info/configs.js    | 3 +++
 ambari-web/app/views/common/configs/service_config_view.js | 9 +++++++--
 5 files changed, 24 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a0dab0ce/ambari-web/app/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/config.js b/ambari-web/app/config.js
index 6a5f564..140e7c3 100644
--- a/ambari-web/app/config.js
+++ b/ambari-web/app/config.js
@@ -72,7 +72,8 @@ App.supports = {
   customizeAgentUserAccount: false,
   installGanglia: false,
   opsDuringRollingUpgrade: false,
-  customizedWidgets: false
+  customizedWidgets: false,
+  enhancedConfigs: false
 };
 
 if (App.enableExperimental) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/a0dab0ce/ambari-web/app/controllers/installer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js
index d723134..26f6ac4 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -658,6 +658,12 @@ App.InstallerController = App.WizardController.extend({
       {
         type: 'sync',
         callback: function () {
+          if (App.get('supports.enhancedConfigs')) {
+            var serviceNames = App.StackService.find().filter(function(s) {
+              return s.get('isSelected');
+            }).mapProperty('serviceName');
+            App.themesMapper.generateAdvancedTabs(serviceNames);
+          }
           this.loadServiceConfigGroups();
           this.loadServiceConfigProperties();
           this.loadCurrentHostGroups();

http://git-wip-us.apache.org/repos/asf/ambari/blob/a0dab0ce/ambari-web/app/controllers/main/service/add_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/add_controller.js b/ambari-web/app/controllers/main/service/add_controller.js
index 97c6031..87c1700 100644
--- a/ambari-web/app/controllers/main/service/add_controller.js
+++ b/ambari-web/app/controllers/main/service/add_controller.js
@@ -115,6 +115,12 @@ App.AddServiceController = App.WizardController.extend(App.AddSecurityConfigs, {
           var self = this;
           var dfd = $.Deferred();
           this.loadKerberosDescriptorConfigs().done(function() {
+            if (App.get('supports.enhancedConfigs')) {
+              var serviceNames = App.StackService.find().filter(function(s) {
+                return s.get('isSelected') || s.get('isInstalled');
+              }).mapProperty('serviceName');
+              App.themesMapper.generateAdvancedTabs(serviceNames);
+            }
             self.loadServiceConfigGroups();
             self.loadServiceConfigProperties();
             dfd.resolve();

http://git-wip-us.apache.org/repos/asf/ambari/blob/a0dab0ce/ambari-web/app/controllers/main/service/info/configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js
index 9f27d94..126c20c 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -257,6 +257,9 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
    */
   loadStep: function () {
     console.log("TRACE: Loading configure for service");
+    if (App.get('supports.enhancedConfigs')) {
+      App.themesMapper.generateAdvancedTabs([this.get('content.serviceName')]);
+    }
     this.clearStep();
     this.loadClusterEnvSite();
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/a0dab0ce/ambari-web/app/views/common/configs/service_config_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/service_config_view.js b/ambari-web/app/views/common/configs/service_config_view.js
index fc58b48..1070ac7 100644
--- a/ambari-web/app/views/common/configs/service_config_view.js
+++ b/ambari-web/app/views/common/configs/service_config_view.js
@@ -44,7 +44,9 @@ App.ServiceConfigView = Em.View.extend({
   supportsConfigLayout: function() {
     var supportedControllers = ['wizardStep7Controller', 'mainServiceInfoConfigsController'];
     var unSupportedServices = ['MISC'];
-
+    if (!App.get('supports.enhancedConfigs')) {
+      return false;
+    }
     return supportedControllers.contains(this.get('controllerName')) || !unSupportedServices.contains(this.get('controller.selectedService.serviceName'));
   }.property('controller.name', 'controller.selectedService'),
 
@@ -91,7 +93,10 @@ App.ServiceConfigView = Em.View.extend({
    * @returns {Ember.A}
    */
   tabs: function() {
-    var tabs = App.Tab.find();
+    if (!App.get('supports.enhancedConfigs')) {
+      return Em.A([]);
+    }
+    var tabs = App.Tab.find().filterProperty('serviceName', this.get('controller.selectedService.serviceName'));
     // make first tab active
     tabs.get('firstObject').set('isActive', true);
     return tabs;