Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B686911D1F for ; Mon, 1 Sep 2014 12:54:53 +0000 (UTC) Received: (qmail 43927 invoked by uid 500); 1 Sep 2014 12:54:53 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 43896 invoked by uid 500); 1 Sep 2014 12:54:53 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 43887 invoked by uid 99); 1 Sep 2014 12:54:53 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2014 12:54:53 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 3415195765F; Mon, 1 Sep 2014 12:54:53 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: atkach@apache.org To: commits@ambari.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: AMBARI-7100 Configs: ability to filter by changed properties. (atkach) Date: Mon, 1 Sep 2014 12:54:53 +0000 (UTC) Repository: ambari Updated Branches: refs/heads/trunk b21759ea4 -> ad1d6a364 AMBARI-7100 Configs: ability to filter by changed properties. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ad1d6a36 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ad1d6a36 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ad1d6a36 Branch: refs/heads/trunk Commit: ad1d6a3647b10068794471d3a9c28f8b82faffb1 Parents: b21759e Author: atkach Authored: Mon Sep 1 15:52:16 2014 +0300 Committer: atkach Committed: Mon Sep 1 15:52:16 2014 +0300 ---------------------------------------------------------------------- .../controllers/main/service/info/configs.js | 29 ++++++++++++++------ ambari-web/app/messages.js | 1 + 2 files changed, 22 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/ad1d6a36/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 10ed830..4ffe244 100644 --- a/ambari-web/app/controllers/main/service/info/configs.js +++ b/ambari-web/app/controllers/main/service/info/configs.js @@ -42,6 +42,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM customConfig: [], isApplyingChanges: false, saveConfigsFlag: true, + isCompareMode: false, compareServiceVersion: null, // contain Service Config Property, when user proceed from Select Config Group dialog overrideToAdd: null, @@ -130,6 +131,11 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM { attributeName: 'isFinal', caption: 'common.combobox.dropdown.final' + }, + { + attributeName: 'hasCompareDiffs', + caption: 'common.combobox.dropdown.changed', + dependentOn: 'isCompareMode' } ], @@ -143,18 +149,23 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM */ heapsizeRegExp: /_heapsize|_newsize|_maxnewsize$/, -/** + /** * Dropdown menu items in filter combobox */ filterColumns: function () { - return this.get('propertyFilters').map(function(filter) { - return Ember.Object.create({ - attributeName: filter.attributeName, - name: this.t(filter.caption), - selected: false - }) + var filterColumns = []; + + this.get('propertyFilters').forEach(function(filter) { + if (Em.isNone(filter.dependentOn) || this.get(filter.dependentOn)) { + filterColumns.push(Ember.Object.create({ + attributeName: filter.attributeName, + name: this.t(filter.caption), + selected: false + })); + } }, this); - }.property('propertyFilters'), + return filterColumns; + }.property('propertyFilters', 'isCompareMode'), /** * clear and set properties to default value @@ -512,12 +523,14 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM this.getCompareVersionConfigs(compareServiceVersion).done(function (json) { self.initCompareConfig(allConfigs, json); self.set('compareServiceVersion', null); + self.set('isCompareMode', true); dfd.resolve(true); }).fail(function () { self.set('compareServiceVersion', null); dfd.resolve(true); }); } else { + self.set('isCompareMode', false); allConfigs.setEach('isComparison', false); dfd.resolve(false); } http://git-wip-us.apache.org/repos/asf/ambari/blob/ad1d6a36/ambari-web/app/messages.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index fd9772f..97dd8db 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -2256,6 +2256,7 @@ Em.I18n.translations = { 'common.combobox.placeholder': 'Filter...', 'common.combobox.dropdown.overridden': 'Overridden properties', 'common.combobox.dropdown.final': 'Final properties', + 'common.combobox.dropdown.changed': 'Changed properties', 'quick.links.error.label': 'Hostname is undefined', 'quick.links.publicHostName': '{0} ({1})',