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 32F8311CD3 for ; Wed, 13 Aug 2014 20:01:12 +0000 (UTC) Received: (qmail 77906 invoked by uid 500); 13 Aug 2014 20:01:11 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 77799 invoked by uid 500); 13 Aug 2014 20:01:11 -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 77703 invoked by uid 99); 13 Aug 2014 20:01:11 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Aug 2014 20:01:11 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id A0A409A5EE1; Wed, 13 Aug 2014 20:01:11 +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: Wed, 13 Aug 2014 20:01:13 -0000 Message-Id: <77954853aa0b44af82427380402b6102@git.apache.org> In-Reply-To: <679a0c8e0c314752b013129701d3efd6@git.apache.org> References: <679a0c8e0c314752b013129701d3efd6@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/6] git commit: AMBARI-6841. Config History: implement UI tweaks.(xiwang) AMBARI-6841. Config History: implement UI tweaks.(xiwang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2a617da8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2a617da8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2a617da8 Branch: refs/heads/branch-alerts-dev Commit: 2a617da83e2483f3733b57cf2600df34784888a6 Parents: efc6eee Author: Xi Wang Authored: Tue Aug 12 18:51:36 2014 -0700 Committer: Xi Wang Committed: Wed Aug 13 11:19:11 2014 -0700 ---------------------------------------------------------------------- .../main/dashboard/config_history_controller.js | 1 + ambari-web/app/messages.js | 6 +- ambari-web/app/models/service_config_version.js | 6 +- ambari-web/app/styles/application.less | 126 +++++++++---------- .../common/configs/compare_property.hbs | 6 +- .../common/configs/config_history_flow.hbs | 48 +++---- .../templates/main/dashboard/config_history.hbs | 15 ++- .../views/common/configs/config_history_flow.js | 4 +- .../views/main/dashboard/config_history_view.js | 1 - 9 files changed, 108 insertions(+), 105 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/2a617da8/ambari-web/app/controllers/main/dashboard/config_history_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/dashboard/config_history_controller.js b/ambari-web/app/controllers/main/dashboard/config_history_controller.js index 936634a..aeb3fbc 100644 --- a/ambari-web/app/controllers/main/dashboard/config_history_controller.js +++ b/ambari-web/app/controllers/main/dashboard/config_history_controller.js @@ -16,6 +16,7 @@ * limitations under the License. */ +var App = require('app'); var customDatePopup = require('/views/common/custom_date_popup'); App.MainConfigHistoryController = Em.ArrayController.extend(App.TableServerMixin, { http://git-wip-us.apache.org/repos/asf/ambari/blob/2a617da8/ambari-web/app/messages.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index eb2d0d2..75ef3fc 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -1974,16 +1974,18 @@ Em.I18n.translations = { 'dashboard.services.zookeeper.server' : 'ZooKeeper Server', 'dashboard.configHistory.title': 'Configs', - 'dashboard.configHistory.table.version.title' : 'Service: version', + 'dashboard.configHistory.table.version.title' : 'Service', 'dashboard.configHistory.table.modified.title' : 'Modified', 'dashboard.configHistory.table.empty' : 'No history to display', + 'dashboard.configHistory.table.version.versionText' : 'V{0}', 'dashboard.configHistory.table.filteredHostsInfo': '{0} of {1} versions showing', 'dashboard.configHistory.info-bar.authoredOn': 'authored on', 'dashboard.configHistory.info-bar.changesToHandle': 'Changes to handle', 'dashboard.configHistory.info-bar.showMore': 'Show more', 'dashboard.configHistory.info-bar.save.popup.title': 'Save Configuration', 'dashboard.configHistory.info-bar.save.popup.placeholder': 'What did you change?', - 'dashboard.configHistory.info-bar.revert.button': 'Revert to this version', + 'dashboard.configHistory.info-bar.revert.button': 'Make current', + 'timeRange.presets.1hour':'1h', 'timeRange.presets.12hour':'12h', http://git-wip-us.apache.org/repos/asf/ambari/blob/2a617da8/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 f11859c..4ff3057 100644 --- a/ambari-web/app/models/service_config_version.js +++ b/ambari-web/app/models/service_config_version.js @@ -35,9 +35,9 @@ App.ServiceConfigVersion = DS.Model.extend({ var length = this.get('isCurrent') ? 20 : 40; return (typeof this.get('notes') === 'string') ? this.get('notes').slice(0, length) : ""; }.property('notes', 'isCurrent'), - serviceVersion: function () { - return this.get('serviceName') + ': ' + this.get('version'); - }.property('serviceName', 'version'), + versionText: function () { + return Em.I18n.t('dashboard.configHistory.table.version.versionText').format(this.get('version')); + }.property('version'), modifiedDate: function () { return dateUtil.dateFormat(this.get('appliedTime')); }.property('createTime'), http://git-wip-us.apache.org/repos/asf/ambari/blob/2a617da8/ambari-web/app/styles/application.less ---------------------------------------------------------------------- diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less index bab0daa..5479c1d 100644 --- a/ambari-web/app/styles/application.less +++ b/ambari-web/app/styles/application.less @@ -4913,67 +4913,41 @@ ul.inline li { } #config_history_flow { - margin-bottom: 100px; + margin-bottom: 80px; .version-slider { width: 100%; height: 100px; margin: 10px 0; .flow-element { - width: 20%; + width: 18%; height: 100%; .box { position: relative; - width: 73%; - height: 100%; - background-color: #f1f1f1; - border: 1px solid #000000; - font-size: 0.9em; - .top-right-label { - font-size: @default-font-size; - background-color: white; - position: absolute; - top: 0; - left: 0; + width: 72%; + height: 90%; + background-color: #ffffff; + border: 1px solid #dddddd; + font-size: @default-font-size; + .top-label { min-width: 20px; - border: solid #000000; - border-width: 0 1px 1px 0; padding: 5px; - text-align: center; - } - .date { - margin-left: 35px; - line-height: 30px; - white-space: nowrap; } .content { padding: 0 5px; - line-height: 16px; - } - .current-label { - position: absolute; - border-top: 1px solid black; - bottom: 0; - left: 0; - width: 100%; text-align: center; - font-weight: bold; - border-radius: 0; - padding: 0; - font-size: 14px; - line-height: 20px; + color: #555555; } } .displayed { - background-color: #dcdcdc; + background-color: #eeeeee; + border: 1px solid #dddddd; } .arrow-box { - width: 25%; - height: 100%; + width: 20%; margin-left: 1px; - .big-arrow-right { - height: 100%; - background-size: 100% 25%; - background-position: 50% center; + margin-top: 20px; + .icon-arrow-right { + color: #c3c3c3; } } } @@ -4984,45 +4958,50 @@ ul.inline li { .box { width: 100%; } - width: 15%; + width: 13%; } - .arrow-right { - margin: 20px -15px 20px 10px; - border-top: 30px solid transparent; - border-bottom: 30px solid transparent; - } - .arrow-left { - margin: 20px 10px 20px -15px; - border-top: 30px solid transparent; - border-bottom: 30px solid transparent; - } - .visibleArrow { - border-right-color: black; - border-left-color: black; + .icon-chevron-box { + margin-top: 25px; + width: 5%; + .icon-chevron-right, + .icon-chevron-left{ + color: #c3c3c3; + } + .icon-chevron-left:hover, + .icon-chevron-right:hover{ + color: #808080; + } } } .version-info-bar { - height: 60px; - border: 2px solid #a9a9a9; - background-color: #dcdcdc; + background-image: -moz-linear-gradient(top, @top-nav-bg-color-from, @top-nav-bg-color-to); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@top-nav-bg-color-from), to(@top-nav-bg-color-to)); + background-image: -webkit-linear-gradient(top, @top-nav-bg-color-from, @top-nav-bg-color-to); + background-image: -o-linear-gradient(top, @top-nav-bg-color-from, @top-nav-bg-color-to); + background-image: linear-gradient(to bottom, @top-nav-bg-color-from, @top-nav-bg-color-to); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr= @top-nav-bg-color-from, endColorstr=@top-nav-bg-color-to); //for IE9- + -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); margin: 5px 0; padding: 5px; position: fixed; - width: 52%; z-index: 2; - min-width: 743px; + width: 747px; .label-wrapper { line-height: 30px; margin-left: 10px; + color: #d3d3d3; .label { font-size: 14px; padding: 5px; } } .dropdown-menu { - min-width: 660px; + min-width: 400px; + margin-top: 4px; li { line-height: 30px; } @@ -6038,11 +6017,26 @@ i.icon-asterisks { } } } - - - - - + #config_history_flow { + .version-slider { + .flow-element { + .box { + width: 75%; + } + .arrow-box { + margin-left: 5px; + } + } + .first { + .box { + width: 100%; + } + } + } + .version-info-bar { + width: 960px; + } + } .summary-metric-graphs { [class*="span"] { float: left; http://git-wip-us.apache.org/repos/asf/ambari/blob/2a617da8/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 6e1a691..f2b2a45 100644 --- a/ambari-web/app/templates/common/configs/compare_property.hbs +++ b/ambari-web/app/templates/common/configs/compare_property.hbs @@ -19,10 +19,6 @@
{{view view.serviceConfigProperty.compareConfig.viewClass serviceConfigBinding="view.serviceConfigProperty.compareConfig"}} {{#unless view.serviceConfigProperty.compareConfig.isMock}} - - {{view.serviceConfigProperty.compareConfig.serviceVersion.author}}  - {{t dashboard.configHistory.info-bar.authoredOn}}  - {{view.serviceConfigProperty.compareConfig.serviceVersion.modifiedDate}} - + {{view.serviceConfigProperty.compareConfig.serviceVersion.versionText}} {{/unless}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/2a617da8/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 70acde3..7f80c7a 100644 --- a/ambari-web/app/templates/common/configs/config_history_flow.hbs +++ b/ambari-web/app/templates/common/configs/config_history_flow.hbs @@ -19,24 +19,26 @@
-
- {{#each serviceVersion in view.visibleServiceVersion}} -
-
-
-
{{serviceVersion.version}}
-

{{serviceVersion.shortModifiedDate}}

-

{{serviceVersion.author}}: {{serviceVersion.briefNotes}}

- {{#if serviceVersion.isCurrent}} -
- {{t common.latest}} - -
- {{/if}} -
+
+ {{#each serviceVersion in view.visibleServiceVersion}} +
+
+
+
+ {{serviceVersion.versionText}} + {{#if serviceVersion.isCurrent}} + + {{t common.current}} + + + {{/if}}
- {{/each}} -
+
{{serviceVersion.author}}
+
{{serviceVersion.shortModifiedDate}}
+
+
+ {{/each}} +
@@ -49,10 +51,9 @@ {{#each serviceVersion in view.dropDownList}}
- {{t common.latest}}: {{view.displayedServiceVersion.version}} + {{view.displayedServiceVersion.versionText}} + {{#if view.displayedServiceVersion.isCurrent}} + {{t common.current}} + {{/if}} {{view.displayedServiceVersion.author}} {{t dashboard.configHistory.info-bar.authoredOn}} {{view.displayedServiceVersion.modifiedDate}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/2a617da8/ambari-web/app/templates/main/dashboard/config_history.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/dashboard/config_history.hbs b/ambari-web/app/templates/main/dashboard/config_history.hbs index 6306078..dc7dd22 100644 --- a/ambari-web/app/templates/main/dashboard/config_history.hbs +++ b/ambari-web/app/templates/main/dashboard/config_history.hbs @@ -38,11 +38,16 @@ {{#if view.pageContent}} {{#each item in view.pageContent}} - - {{item.serviceVersion}} - {{#if item.isCurrent}} ({{t common.latest}}){{/if}} - - + + + {{item.serviceName}} + + {{item.versionText}} + {{#if item.isCurrent}} + {{t common.current}} + {{/if}} + + {{item.modifiedDate}} {{item.author}} {{item.notes}} http://git-wip-us.apache.org/repos/asf/ambari/blob/2a617da8/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 9521eab..2b305b5 100644 --- a/ambari-web/app/views/common/configs/config_history_flow.js +++ b/ambari-web/app/views/common/configs/config_history_flow.js @@ -101,7 +101,9 @@ App.ConfigHistoryFlowView = Em.View.extend({ var startIndex = 0; serviceVersions.setEach('isDisplayed', false); - serviceVersions.findProperty('isCurrent').set('isDisplayed', true); + if (serviceVersions.findProperty('isCurrent')) { + serviceVersions.findProperty('isCurrent').set('isDisplayed', true); + } if (serviceVersions.length > 0) { if (serviceVersions.length > this.VERSIONS_IN_FLOW) { http://git-wip-us.apache.org/repos/asf/ambari/blob/2a617da8/ambari-web/app/views/main/dashboard/config_history_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/config_history_view.js b/ambari-web/app/views/main/dashboard/config_history_view.js index 1c6105b..8c68477 100644 --- a/ambari-web/app/views/main/dashboard/config_history_view.js +++ b/ambari-web/app/views/main/dashboard/config_history_view.js @@ -151,7 +151,6 @@ App.MainConfigHistoryView = App.TableView.extend({ updateFilter: function (iColumn, value, type) { var self = this; - this.set('controller.resetStartIndex', false); this.saveFilterConditions(iColumn, value, type, false); if (!this.get('filteringComplete')) {