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/05/13 15:42:31 UTC

[1/2] ambari git commit: AMBARI-11095 Configs: filtering issues and changes. (ababiichuk)

Repository: ambari
Updated Branches:
  refs/heads/trunk 88947af23 -> 833caa343


AMBARI-11095 Configs: filtering issues and changes. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: ed138a290a5e9f342ba40708e7b8dc68df8c701c
Parents: 88947af
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Wed May 13 16:01:51 2015 +0300
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Wed May 13 16:41:59 2015 +0300

----------------------------------------------------------------------
 .../controllers/main/service/info/configs.js    |  9 ++---
 .../app/controllers/wizard/step7_controller.js  | 17 ++++-----
 ambari-web/app/messages.js                      |  6 +++-
 .../mixins/common/configs/enhanced_configs.js   |  5 ++-
 .../configs/objects/service_config_property.js  |  9 +++++
 ambari-web/app/models/configs/tab.js            | 14 ++++++--
 .../templates/common/configs/service_config.hbs |  7 +++-
 .../common/configs/service_config_wizard.hbs    |  7 +++-
 .../templates/common/filter_combo_cleanable.hbs |  8 +++++
 .../views/common/configs/service_config_view.js | 37 ++++++++++++++++++++
 .../configs/service_configs_by_category_view.js |  4 +--
 .../app/views/common/filter_combo_cleanable.js  | 17 +++++++++
 .../test/controllers/wizard/step7_test.js       |  4 +--
 .../test/mappers/configs/themes_mapper_test.js  | 12 ++++---
 .../service_configs_by_category_view_test.js    |  4 +--
 15 files changed, 125 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ed138a29/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 318a26c..52e6785 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -229,14 +229,9 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
       dependentOn: 'isCompareMode'
     },
     {
-      attributeName: 'isValid',
-      attributeValue: false,
-      caption: 'common.combobox.dropdown.issues'
-    },
-    {
-      attributeName: 'warn',
+      attributeName: 'hasIssues',
       attributeValue: true,
-      caption: 'common.combobox.dropdown.warnings'
+      caption: 'common.combobox.dropdown.issues'
     }
   ],
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ed138a29/ambari-web/app/controllers/wizard/step7_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js
index d62a12f..4a7c2df 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -217,31 +217,26 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E
       caption: 'common.combobox.dropdown.final'
     },
     {
-      attributeName: 'isValid',
-      attributeValue: false,
-      caption: 'common.combobox.dropdown.issues'
-    },
-    {
-      attributeName: 'warn',
+      attributeName: 'hasIssues',
       attributeValue: true,
-      caption: 'common.combobox.dropdown.warnings'
+      caption: 'common.combobox.dropdown.issues'
     }
   ],
 
   issuesFilterText: function () {
     return (this.get('isSubmitDisabled') && !this.get('submitButtonClicked') &&
-      this.get('filterColumns').findProperty('attributeName', 'isValid').get('selected')) ?
+      this.get('filterColumns').findProperty('attributeName', 'hasIssues').get('selected')) ?
         Em.I18n.t('installer.step7.showingPropertiesWithIssues') : '';
   }.property('isSubmitDisabled', 'submitButtonClicked', 'filterColumns.@each.selected'),
 
   issuesFilterLinkText: function () {
-    if (this.get('filterColumns').findProperty('attributeName', 'isValid').get('selected')) {
+    if (this.get('filterColumns').findProperty('attributeName', 'hasIssues').get('selected')) {
       return Em.I18n.t('installer.step7.showAllProperties');
     }
 
     return (this.get('isSubmitDisabled') && !this.get('submitButtonClicked')) ?
       (
-        this.get('filterColumns').findProperty('attributeName', 'isValid').get('selected') ?
+        this.get('filterColumns').findProperty('attributeName', 'hasIssues').get('selected') ?
           Em.I18n.t('installer.step7.showAllProperties') : Em.I18n.t('installer.step7.showPropertiesWithIssues')
       ) : '';
   }.property('isSubmitDisabled', 'submitButtonClicked', 'filterColumns.@each.selected'),
@@ -1315,6 +1310,6 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E
   },
 
   toggleIssuesFilter: function () {
-    this.get('filterColumns').findProperty('attributeName', 'isValid').toggleProperty('selected');
+    this.get('filterColumns').findProperty('attributeName', 'hasIssues').toggleProperty('selected');
   }
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/ed138a29/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 18238bd..0fbdcec 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -357,7 +357,10 @@ Em.I18n.translations = {
   'popup.dependent.configs.select.config.group.header': 'Select Config Group',
   'popup.dependent.configs.select.config.group': 'Please select to which config group would you like to save dependent properties',
 
-  'popup.dependent.configs.dependencies.info': 'There are {0} configs was changed in {1} services.',
+  'popup.dependent.configs.dependencies.config.singular': 'There is {0} configuration change ',
+  'popup.dependent.configs.dependencies.config.plural': 'There are {0} configuration changes ',
+  'popup.dependent.configs.dependencies.service.singular': 'in {0} service',
+  'popup.dependent.configs.dependencies.service.plural': 'in {0} services',
 
   'login.header':'Sign in',
   'login.username':'Username',
@@ -1706,6 +1709,7 @@ Em.I18n.translations = {
   'services.service.info.summary.hostsRunningMonitor':'{0}/{1}',
   'services.service.info.summary.serversHostCount':'{0} more',
 
+  'services.service.config.nothing.to.display': 'No properties to display.',
   'services.service.config.final':'Final',
   'services.service.config.saved':'Save Configuration Changes',
   'services.service.config.notSaved':'Unable to Save Configuration Changes',

http://git-wip-us.apache.org/repos/asf/ambari/blob/ed138a29/ambari-web/app/mixins/common/configs/enhanced_configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js b/ambari-web/app/mixins/common/configs/enhanced_configs.js
index 7ed9a14..90e3a31 100644
--- a/ambari-web/app/mixins/common/configs/enhanced_configs.js
+++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js
@@ -42,7 +42,10 @@ App.EnhancedConfigsMixin = Em.Mixin.create({
    */
   dependenciesMessage: function() {
     var changedServices = this.get('changedProperties').mapProperty('serviceName').uniq();
-    return Em.I18n.t('popup.dependent.configs.dependencies.info').format( this.get('changedProperties.length'), changedServices.length);
+    var cfgLen = this.get('changedProperties.length') === 1 ? 'singular' : 'plural';
+    var sLen = changedServices.length === 1 ? 'singular' : 'plural';
+    return Em.I18n.t('popup.dependent.configs.dependencies.config.' + cfgLen).format(this.get('changedProperties.length'))
+      + Em.I18n.t('popup.dependent.configs.dependencies.service.' + sLen).format(changedServices.length);
   }.property('changedProperties'),
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/ed138a29/ambari-web/app/models/configs/objects/service_config_property.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/configs/objects/service_config_property.js b/ambari-web/app/models/configs/objects/service_config_property.js
index 455485a..4079e0c 100644
--- a/ambari-web/app/models/configs/objects/service_config_property.js
+++ b/ambari-web/app/models/configs/objects/service_config_property.js
@@ -64,6 +64,15 @@ App.ServiceConfigProperty = Em.Object.extend({
   showLabel: true,
   error: false,
   warn: false,
+
+  /**
+   * true if property has warning or error
+   * @type {boolean}
+   */
+  hasIssues: function () {
+    return (this.get('errorMessage') + this.get('warnMessage')) !== "";
+  }.property('errorMessage', 'warnMessage'),
+
   overrideErrorTrigger: 0, //Trigger for overridable property error
   isRestartRequired: false,
   restartRequiredMessage: 'Restart required',

http://git-wip-us.apache.org/repos/asf/ambari/blob/ed138a29/ambari-web/app/models/configs/tab.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/configs/tab.js b/ambari-web/app/models/configs/tab.js
index d7c2156..fe3bd06 100644
--- a/ambari-web/app/models/configs/tab.js
+++ b/ambari-web/app/models/configs/tab.js
@@ -27,6 +27,7 @@ App.Tab = DS.Model.extend({
   isAdvanced: DS.attr('boolean', {defaultValue: false}),
   serviceName: DS.attr('string'),
   sections: DS.hasMany('App.Section'),
+  isAdvancedHidden: DS.attr('boolean', {defaultValue: false}),
 
   /**
    * Number of the errors in all sections in the current tab
@@ -48,13 +49,22 @@ App.Tab = DS.Model.extend({
   }.property('id'),
 
   /**
+   * tooltip message.
+   * for now used when tab is disabled
+   * @type {String}
+   */
+  tooltipMsg: function() {
+    return this.get('isHiddenByFilter') ? Em.I18n.t('services.service.config.nothing.to.display') : '';
+  }.property('isHiddenByFilter'),
+
+  /**
    * Determines if tab is filtered out (all it's sections should be hidden)
    * If it's an Advanced Tab it can't be hidden
    * @type {boolean}
    */
   isHiddenByFilter: function () {
-    return this.get('isAdvanced') ? false : this.get('sections').everyProperty('isHiddenByFilter', true);
-  }.property('isAdvanced', 'sections.@each.isHiddenByFilter')
+    return this.get('isAdvanced') ? this.get('isAdvancedHidden') : this.get('sections').everyProperty('isHiddenByFilter', true);
+  }.property('isAdvanced', 'sections.@each.isHiddenByFilter', 'isAdvancedHidden')
 
 });
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ed138a29/ambari-web/app/templates/common/configs/service_config.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/service_config.hbs b/ambari-web/app/templates/common/configs/service_config.hbs
index 6b31b58..ca35c09 100644
--- a/ambari-web/app/templates/common/configs/service_config.hbs
+++ b/ambari-web/app/templates/common/configs/service_config.hbs
@@ -96,7 +96,7 @@
   {{#if view.supportsConfigLayout}}
     <ul class="nav nav-tabs mbm config-tabs">
       {{#each tab in view.tabs}}
-        <li {{bindAttr class="tab.isActive:active tab.isHiddenByFilter:disabled" }}>
+        <li rel='tooltip' {{bindAttr class="tab.isActive:active tab.isHiddenByFilter:disabled" data-original-title="tab.tooltipMsg"}}>
           <a href="#" {{action "setActiveTab" tab target="view"}} {{bindAttr data-target="tab.headingClass"}} data-toggle="tab">
             {{tab.displayName}}
               {{#if tab.isAdvanced}}
@@ -143,6 +143,11 @@
       </div>
     {{/each}}
   {{/if}}
+  {{#if view.isAllConfigsHidden}}
+    <div class="alert alert-info col-sm-12">
+      {{t services.service.config.nothing.to.display}}
+    </div>
+  {{/if}}
 {{else}}
   <div class="spinner"></div>
 {{/if}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/ed138a29/ambari-web/app/templates/common/configs/service_config_wizard.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/service_config_wizard.hbs b/ambari-web/app/templates/common/configs/service_config_wizard.hbs
index 46d0928..cd970e7 100644
--- a/ambari-web/app/templates/common/configs/service_config_wizard.hbs
+++ b/ambari-web/app/templates/common/configs/service_config_wizard.hbs
@@ -51,7 +51,7 @@
 {{#if view.supportsConfigLayout}}
   <ul class="nav nav-tabs mbm config-tabs">
     {{#each tab in view.tabs}}
-      <li {{bindAttr class="tab.isActive:active tab.isHiddenByFilter:disabled" }}>
+      <li rel='tooltip' {{bindAttr class="tab.isActive:active tab.isHiddenByFilter:disabled" data-original-title="tab.tooltipMsg"}}>
         <a href="#" {{action "setActiveTab" tab target="view"}} {{bindAttr data-target="tab.headingClass"}} data-toggle="tab">
           {{tab.displayName}}
           {{#if tab.isAdvanced}}
@@ -90,3 +90,8 @@
     {{/each}}
   </div>
 {{/if}}
+{{#if view.isAllConfigsHidden}}
+  <div class="alert alert-info col-sm-12">
+    {{t services.service.config.nothing.to.display}}
+  </div>
+{{/if}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/ed138a29/ambari-web/app/templates/common/filter_combo_cleanable.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/filter_combo_cleanable.hbs b/ambari-web/app/templates/common/filter_combo_cleanable.hbs
index 36e3efb..b08faf4 100644
--- a/ambari-web/app/templates/common/filter_combo_cleanable.hbs
+++ b/ambari-web/app/templates/common/filter_combo_cleanable.hbs
@@ -34,5 +34,13 @@
                 </a>
             </li>
         {{/each}}
+        {{#if view.showClearFilter}}
+          <li class="divider"></li>
+          <li>
+            <a href="#" {{action clearFilterColumn target="view"}}>
+            {{t tableView.filters.clearFilters}}
+            </a>
+          </li>
+        {{/if}}
       </ul>
   </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/ed138a29/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 0ef0f7a..a33c5d6 100644
--- a/ambari-web/app/views/common/configs/service_config_view.js
+++ b/ambari-web/app/views/common/configs/service_config_view.js
@@ -44,6 +44,42 @@ App.ServiceConfigView = Em.View.extend({
   classNameBindings: ['isOnTheServicePage:serviceConfigs'],
 
   /**
+   * flag defines if any config match filter
+   * true if all configs should be hidden
+   * @type {boolean}
+   */
+  isAllConfigsHidden: false,
+
+  /**
+   * method that runs <code>updateFilterCounters<code> to
+   * update filter counters for advanced tab
+   * @method showHideAdvancedByFilter
+   */
+  showHideAdvancedByFilter: function () {
+    Em.run.once(this, 'updateFilterCounters');
+  }.observes('controller.selectedService.configs.@each.isHiddenByFilter'),
+
+  /**
+   * updates filter counters for advanced tab
+   * @method updateFilterCounters
+   */
+  updateFilterCounters: function() {
+    if (this.get('controller.selectedService.configs')) {
+      var categories = this.get('controller.selectedService.configCategories').mapProperty('name');
+      var configsToShow = this.get('controller.selectedService.configs').filter(function(config) {
+        return config.get('isHiddenByFilter') == false && categories.contains(config.get('category')) && config.get('isVisible');
+      });
+      var isAllConfigsHidden = configsToShow.get('length') == 0;
+      var isAdvancedHidden = isAllConfigsHidden || configsToShow.filter(function (config) {
+        return Em.isNone(config.get('widget'));
+      }).get('length') == 0;
+      this.set('isAllConfigsHidden', isAllConfigsHidden);
+      var advancedTab = App.Tab.find().filterProperty('serviceName', this.get('controller.selectedService.serviceName')).findProperty('isAdvanced');
+      advancedTab && advancedTab.set('isAdvancedHidden', isAdvancedHidden);
+    }
+  },
+
+  /**
    * Check for layout config supports.
    * @returns {Boolean}
    */
@@ -74,6 +110,7 @@ App.ServiceConfigView = Em.View.extend({
     }
     App.tooltip($(".restart-required-property"), {html: true});
     App.tooltip($(".icon-lock"), {placement: 'right'});
+    App.tooltip($("[rel=tooltip]"));
     this.checkCanEdit();
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ed138a29/ambari-web/app/views/common/configs/service_configs_by_category_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/service_configs_by_category_view.js b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
index 2e9e6e5..ae77abe 100644
--- a/ambari-web/app/views/common/configs/service_configs_by_category_view.js
+++ b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
@@ -92,8 +92,8 @@ App.ServiceConfigsByCategoryView = Em.View.extend(App.UserPref, App.ConfigOverri
     var isCustomPropertiesCategory = this.get('category.customCanAddProperty');
     var emptyFiltered = this.get('categoryConfigs').filterProperty('isHiddenByFilter', false).length > 0;
     var isWidgetsOnlyCategory = this.get('categoryConfigs.length') == this.get('categoryConfigs').filterProperty('widget').length;
-    return isCustomPropertiesCategory || (emptyFiltered && !isWidgetsOnlyCategory);
-  }.property('category.customCanAddProperty', 'categoryConfigs.@each.isHiddenByFilter', 'categoryConfigs.@each.widget'),
+    return isCustomPropertiesCategory && this.get('controller.filter') === '' && !this.get('parentView.columns').someProperty('selected') || (emptyFiltered && !isWidgetsOnlyCategory);
+  }.property('category.customCanAddProperty', 'categoryConfigs.@each.isHiddenByFilter', 'categoryConfigs.@each.widget', 'controller.filter', 'parentView.columns.@each.selected'),
 
   /**
    * Re-order the configs to list content displayType properties at last in the category

http://git-wip-us.apache.org/repos/asf/ambari/blob/ed138a29/ambari-web/app/views/common/filter_combo_cleanable.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/filter_combo_cleanable.js b/ambari-web/app/views/common/filter_combo_cleanable.js
index 3dcee1d..ecf744e 100644
--- a/ambari-web/app/views/common/filter_combo_cleanable.js
+++ b/ambari-web/app/views/common/filter_combo_cleanable.js
@@ -56,6 +56,23 @@ App.FilterComboCleanableView = Ember.View.extend({
   }.property('filter'),
 
   /**
+   * true if any of filter columns is selected
+   * in this case clear filter row should be shown
+   * @type {boolean}
+   */
+  showClearFilter: function() {
+    return this.get('columns').someProperty('selected');
+  }.property('columns.@each.selected'),
+
+  /**
+   * clears all filter columns.
+   * @method clearFilterColumn
+   */
+  clearFilterColumn: function() {
+    this.get('columns').setEach('selected', false);
+  },
+
+  /**
    * clear Filter textfield
    */
   clearFilter: function() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/ed138a29/ambari-web/test/controllers/wizard/step7_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard/step7_test.js b/ambari-web/test/controllers/wizard/step7_test.js
index d81d262..2ea90cb 100644
--- a/ambari-web/test/controllers/wizard/step7_test.js
+++ b/ambari-web/test/controllers/wizard/step7_test.js
@@ -94,7 +94,7 @@ var installerStep7Controller,
     controller.reopen({
       isSubmitDisabled: testCase.isSubmitDisabled
     });
-    controller.get('filterColumns').findProperty('attributeName', 'isValid').set('selected', testCase.isIssuesFilterActive);
+    controller.get('filterColumns').findProperty('attributeName', 'hasIssues').set('selected', testCase.isIssuesFilterActive);
   };
 
 describe('App.InstallerStep7Controller', function () {
@@ -1926,7 +1926,7 @@ describe('App.InstallerStep7Controller', function () {
 
   describe('#toggleIssuesFilter', function () {
     it('should toggle issues filter', function () {
-      var issuesFilter = installerStep7Controller.get('filterColumns').findProperty('attributeName', 'isValid');
+      var issuesFilter = installerStep7Controller.get('filterColumns').findProperty('attributeName', 'hasIssues');
       issuesFilter.set('selected', false);
       installerStep7Controller.toggleIssuesFilter();
       expect(issuesFilter.get('selected')).to.be.true;

http://git-wip-us.apache.org/repos/asf/ambari/blob/ed138a29/ambari-web/test/mappers/configs/themes_mapper_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/mappers/configs/themes_mapper_test.js b/ambari-web/test/mappers/configs/themes_mapper_test.js
index 7daaced..aadaf71 100644
--- a/ambari-web/test/mappers/configs/themes_mapper_test.js
+++ b/ambari-web/test/mappers/configs/themes_mapper_test.js
@@ -133,7 +133,7 @@ describe('App.themeMapper', function () {
                                             }
                                             ]
                               }
-                },
+                }
               }
             }
           }
@@ -160,7 +160,8 @@ describe('App.themeMapper', function () {
         columns: "2",
         rows: "1",
         is_advanced: false,
-        service_name: 'HDFS'
+        service_name: 'HDFS',
+        "is_advanced_hidden": false
       });
 
       //checking section
@@ -208,7 +209,7 @@ describe('App.themeMapper', function () {
     });
   });
 
-  describe('generateAdvancedTabs', function () {
+  describe('#generateAdvancedTabs', function () {
     it('generates advanced tabs', function () {
       App.themesMapper.generateAdvancedTabs(['HDFS']);
       expect(App.Tab.find('HDFS_advanced').toJSON()).to.eql({
@@ -218,12 +219,13 @@ describe('App.themeMapper', function () {
         "columns": 1,
         "rows": 1,
         "is_advanced": true,
-        "service_name": "HDFS"
+        "service_name": "HDFS",
+        "is_advanced_hidden": false
       });
     });
   });
 
-  describe('getConfigId', function () {
+  describe('#getConfigId', function () {
     it('gets configs id from json', function () {
       expect(App.themesMapper.getConfigId({config: "c1/p1"})).to.equal("p1_c1");
     });

http://git-wip-us.apache.org/repos/asf/ambari/blob/ed138a29/ambari-web/test/views/common/configs/service_configs_by_category_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/common/configs/service_configs_by_category_view_test.js b/ambari-web/test/views/common/configs/service_configs_by_category_view_test.js
index 30f1749..7c14dac 100644
--- a/ambari-web/test/views/common/configs/service_configs_by_category_view_test.js
+++ b/ambari-web/test/views/common/configs/service_configs_by_category_view_test.js
@@ -291,8 +291,8 @@ describe('App.ServiceConfigsByCategoryView', function () {
         {
           categoryConfigs: Em.A([]),
           category: Em.Object.create({ customCanAddProperty: true}),
-          m: 'Category with custom properties. Panel should be shown',
-          e: true
+          m: 'Category with custom properties. Panel shouldn\'t be shown',
+          e: false
         },
         {
           categoryConfigs: Em.A([


[2/2] ambari git commit: AMBARI-11105 yarn.resourcemanager.zk-address is not updated when adding/removing ZKs. (ababiichuk)

Posted by ab...@apache.org.
AMBARI-11105 yarn.resourcemanager.zk-address is not updated when adding/removing ZKs. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: 833caa343703e8d0736924c7844c3802a00e00f6
Parents: ed138a2
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Wed May 13 16:36:20 2015 +0300
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Wed May 13 16:42:00 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/main/host/details.js       | 1 +
 ambari-web/test/controllers/main/host/details_test.js | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/833caa34/ambari-web/app/controllers/main/host/details.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js
index 05335aa..1d1f965 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -1184,6 +1184,7 @@ App.MainHostDetailsController = Em.Controller.extend({
       }
       if (configs['yarn-site']) {
         configs['yarn-site']['hadoop.registry.zk.quorum'] = zksWithPort;
+        configs['yarn-site']['yarn.resourcemanager.zk-address'] = zksWithPort;
       }
     }
     return true;

http://git-wip-us.apache.org/repos/asf/ambari/blob/833caa34/ambari-web/test/controllers/main/host/details_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/host/details_test.js b/ambari-web/test/controllers/main/host/details_test.js
index 1a7c2ca..f0df0f2 100644
--- a/ambari-web/test/controllers/main/host/details_test.js
+++ b/ambari-web/test/controllers/main/host/details_test.js
@@ -891,7 +891,8 @@ describe('App.MainHostDetailsController', function () {
       App.set('currentStackVersion', 'HDP-2.2.0');
       expect(controller.setZKConfigs(configs, 'host1:2181', [])).to.be.true;
       expect(configs).to.eql({"yarn-site": {
-        'hadoop.registry.zk.quorum': "host1:2181"
+        'hadoop.registry.zk.quorum': "host1:2181",
+        'yarn.resourcemanager.zk-address': "host1:2181"
       }});
       App.set('currentStackVersion', version);
     });