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 2BD5711B0D for ; Mon, 1 Sep 2014 11:41:01 +0000 (UTC) Received: (qmail 97490 invoked by uid 500); 1 Sep 2014 11:41:01 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 97438 invoked by uid 500); 1 Sep 2014 11:41:01 -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 97394 invoked by uid 99); 1 Sep 2014 11:41:00 -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 11:41:00 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id A638E9573F3; Mon, 1 Sep 2014 11:41:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jonathanhurley@apache.org To: commits@ambari.apache.org Date: Mon, 01 Sep 2014 11:41:00 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [01/29] git commit: AMBARI-7069. Configs: make comparision bar info more clear.(xiwang) Repository: ambari Updated Branches: refs/heads/branch-alerts-dev 2f5c78e7f -> c13730a06 AMBARI-7069. Configs: make comparision bar info more clear.(xiwang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/663e0d6f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/663e0d6f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/663e0d6f Branch: refs/heads/branch-alerts-dev Commit: 663e0d6f087b5a8ed912712d642d1b8fdd04c50a Parents: 869b00c Author: Xi Wang Authored: Thu Aug 28 17:19:06 2014 -0700 Committer: Xi Wang Committed: Thu Aug 28 18:04:29 2014 -0700 ---------------------------------------------------------------------- ambari-web/app/messages.js | 3 +++ ambari-web/app/models/service_config.js | 3 +++ ambari-web/app/models/service_config_version.js | 3 +++ ambari-web/app/styles/application.less | 9 +++++++++ .../templates/common/configs/compare_property.hbs | 2 +- .../common/configs/config_history_flow.hbs | 10 +++++++--- .../templates/common/configs/overriddenProperty.hbs | 2 +- .../common/configs/service_config_category.hbs | 2 +- .../app/views/common/configs/config_history_flow.js | 16 ++++++++++++++++ 9 files changed, 44 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/663e0d6f/ambari-web/app/messages.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 4c9abd9..bc8736e 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -1412,7 +1412,9 @@ Em.I18n.translations = { 'services.service.config.configHistory.configGroup': 'Config Group', 'services.service.config.configHistory.leftArrow.tooltip': 'Show earlier versions', 'services.service.config.configHistory.rightArrow.tooltip': 'Show later versions', + 'services.service.config.configHistory.dismissIcon.tooltip': 'Dismiss', 'services.service.config.configHistory.makeCurrent.message': 'Created from service config version {0}', + 'services.service.config.configHistory.comparing': 'Comparing', 'services.add.header':'Add Service Wizard', 'services.reassign.header':'Move Master Wizard', @@ -2007,6 +2009,7 @@ Em.I18n.translations = { 'dashboard.configHistory.info-bar.makeCurrent.popup.title': 'Make Current Confirmation', 'dashboard.configHistory.info-bar.save.popup.placeholder': 'What did you change?', 'dashboard.configHistory.info-bar.revert.button': 'Make Current', + 'dashboard.configHistory.info-bar.revert.versionButton': 'Make {0} Current', 'dashboard.configHistory.info-bar.view.button.disabled': 'You are currently viewing this version.', 'dashboard.configHistory.info-bar.compare.button.disabled': 'You cannot compare against the same version.', 'dashboard.configHistory.info-bar.revert.button.disabled': 'This is the current version.', http://git-wip-us.apache.org/repos/asf/ambari/blob/663e0d6f/ambari-web/app/models/service_config.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/models/service_config.js b/ambari-web/app/models/service_config.js index 8326dd4..891b54f 100644 --- a/ambari-web/app/models/service_config.js +++ b/ambari-web/app/models/service_config.js @@ -151,6 +151,9 @@ App.ServiceConfigProperty = Ember.Object.extend({ isEditable: true, // by default a config property is editable isNotEditable: Ember.computed.not('isEditable'), isFinal: false, + hideFinalIcon: function () { + return (!this.get('isFinal'))&& this.get('isNotEditable'); + }.property('isFinal', 'isNotEditable'), defaultIsFinal: false, supportsFinal: false, isVisible: true, http://git-wip-us.apache.org/repos/asf/ambari/blob/663e0d6f/ambari-web/app/models/service_config_version.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/models/service_config_version.js b/ambari-web/app/models/service_config_version.js index 93da4aa..1f34261 100644 --- a/ambari-web/app/models/service_config_version.js +++ b/ambari-web/app/models/service_config_version.js @@ -44,6 +44,9 @@ App.ServiceConfigVersion = DS.Model.extend({ versionText: function () { return Em.I18n.t('dashboard.configHistory.table.version.versionText').format(this.get('version')); }.property('version'), + makeCurrentButtonText: function() { + return Em.I18n.t('dashboard.configHistory.info-bar.revert.versionButton').format(this.get('versionText')); + }.property('versionText'), modifiedDate: function () { return dateUtil.dateFormat(this.get('createTime')); }.property('createTime'), http://git-wip-us.apache.org/repos/asf/ambari/blob/663e0d6f/ambari-web/app/styles/application.less ---------------------------------------------------------------------- diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less index 37716c0..c5ad816 100644 --- a/ambari-web/app/styles/application.less +++ b/ambari-web/app/styles/application.less @@ -5092,10 +5092,19 @@ ul.inline li { -webkit-box-shadow: inset 0 0 0 rgba(0, 0, 0, 0.1), 0 1px 10px rgba(0, 0, 0, 0.1); -moz-box-shadow: inset 0 0 0 rgba(0, 0, 0, 0.1), 0 1px 10px rgba(0, 0, 0, 0.1); box-shadow: inset 0 0 0 rgba(0, 0, 0, 0.1), 0 1px 10px rgba(0, 0, 0, 0.1); + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; margin: 5px 0; padding: 5px; width: 747px; + .icon-remove-circle { + color: #ffffff; + padding-left: 10px; + padding-top: 7px; + display: inline-block; + } .label-wrapper { line-height: 30px; margin-left: 10px; http://git-wip-us.apache.org/repos/asf/ambari/blob/663e0d6f/ambari-web/app/templates/common/configs/compare_property.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/common/configs/compare_property.hbs b/ambari-web/app/templates/common/configs/compare_property.hbs index 2d0137f..9c8e73e 100644 --- a/ambari-web/app/templates/common/configs/compare_property.hbs +++ b/ambari-web/app/templates/common/configs/compare_property.hbs @@ -24,7 +24,7 @@ {{t common.current}} {{/if}} {{#if view.serviceConfigProperty.compareConfig.supportsFinal}} - + {{/if}} http://git-wip-us.apache.org/repos/asf/ambari/blob/663e0d6f/ambari-web/app/templates/common/configs/config_history_flow.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/common/configs/config_history_flow.hbs b/ambari-web/app/templates/common/configs/config_history_flow.hbs index d52a8cc..52846b9 100644 --- a/ambari-web/app/templates/common/configs/config_history_flow.hbs +++ b/ambari-web/app/templates/common/configs/config_history_flow.hbs @@ -59,10 +59,14 @@
-
+
+
+ {{t services.service.config.configHistory.comparing}} + {{view.displayedServiceVersion.versionText}} + ... {{view.compareServiceVersion.versionText}} {{#if view.compareServiceVersion.isCurrent}} {{t common.current}} @@ -75,7 +79,7 @@
- +
@@ -130,7 +134,7 @@
- + http://git-wip-us.apache.org/repos/asf/ambari/blob/663e0d6f/ambari-web/app/templates/common/configs/overriddenProperty.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/common/configs/overriddenProperty.hbs b/ambari-web/app/templates/common/configs/overriddenProperty.hbs index 21df4fa..fb438f3 100644 --- a/ambari-web/app/templates/common/configs/overriddenProperty.hbs +++ b/ambari-web/app/templates/common/configs/overriddenProperty.hbs @@ -21,7 +21,7 @@ {{view overriddenSCP.viewClass serviceConfigBinding="overriddenSCP" categoryConfigsBinding="view.categoryConfigs"}} {{#if overriddenSCP.supportsFinal}} http://git-wip-us.apache.org/repos/asf/ambari/blob/663e0d6f/ambari-web/app/templates/common/configs/service_config_category.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/common/configs/service_config_category.hbs b/ambari-web/app/templates/common/configs/service_config_category.hbs index dcbdba6..10c7428 100644 --- a/ambari-web/app/templates/common/configs/service_config_category.hbs +++ b/ambari-web/app/templates/common/configs/service_config_category.hbs @@ -56,7 +56,7 @@ {{/if}} {{#if supportsFinal}} http://git-wip-us.apache.org/repos/asf/ambari/blob/663e0d6f/ambari-web/app/views/common/configs/config_history_flow.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/configs/config_history_flow.js b/ambari-web/app/views/common/configs/config_history_flow.js index e9fab25..a115223 100644 --- a/ambari-web/app/views/common/configs/config_history_flow.js +++ b/ambari-web/app/views/common/configs/config_history_flow.js @@ -253,6 +253,22 @@ App.ConfigHistoryFlowView = Em.View.extend({ this.set('compareServiceVersion', event.context); this.get('controller').onConfigGroupChange(); }, + removeCompareVersionBar: function () { + var displayedVersion = this.get('displayedServiceVersion.version'); + var versionIndex = 0; + + this.set('compareServiceVersion', null); + this.get('serviceVersions').forEach(function (serviceVersion, index) { + if (serviceVersion.get('version') === displayedVersion) { + serviceVersion.set('isDisplayed', true); + versionIndex = index; + } else { + serviceVersion.set('isDisplayed', false); + } + }); + this.shiftFlowOnSwitch(versionIndex); + this.get('controller').loadSelectedVersion(displayedVersion); + }, /** * revert config values to chosen version and apply reverted configs to server */