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

ambari git commit: AMBARI-12139. Note field for configuration history should be HTML-escaped when rendering. (yusaku)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 387228c6d -> d4dfe0d3e


AMBARI-12139. Note field for configuration history should be HTML-escaped when rendering. (yusaku)


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

Branch: refs/heads/branch-2.1
Commit: d4dfe0d3e8f973889e0b6652f00075b9365064a6
Parents: 387228c
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Wed Jun 24 22:05:22 2015 -0700
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Thu Jun 25 09:44:03 2015 -0700

----------------------------------------------------------------------
 ambari-web/app/messages.js                                     | 2 +-
 .../app/templates/common/configs/config_history_flow.hbs       | 2 +-
 .../app/templates/common/configs/service_version_box.hbs       | 2 +-
 ambari-web/app/templates/main/dashboard/config_history.hbs     | 6 +++---
 ambari-web/app/views/common/configs/config_history_flow.js     | 3 ++-
 ambari-web/app/views/main/dashboard/config_history_view.js     | 2 +-
 6 files changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d4dfe0d3/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 619c64d..aad4a70 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -2517,7 +2517,7 @@ Em.I18n.translations = {
   'dashboard.configHistory.table.empty' : 'No history to display',
   'dashboard.configHistory.table.notes.default': 'Initial configurations for {0}',
   'dashboard.configHistory.table.notes.addService': 'Configuration updated while adding service',
-  'dashboard.configHistory.table.notes.no': '<i>No notes</i>',
+  'dashboard.configHistory.table.notes.no': '',
   'dashboard.configHistory.table.version.versionText' : 'V{0}',
   'dashboard.configHistory.table.version.prefix' : 'V',
   'dashboard.configHistory.table.current.tooltip' : 'Current config for {0}:{1}',

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4dfe0d3/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 ce8cba9..b48b4b8 100644
--- a/ambari-web/app/templates/common/configs/config_history_flow.hbs
+++ b/ambari-web/app/templates/common/configs/config_history_flow.hbs
@@ -75,7 +75,7 @@
                         <span class="stack">{{serviceVersion.stackVersion}}</span>
                         <div class="group"><strong>{{serviceVersion.configGroupName}}</strong></div>
                         <div class="date"><strong>{{serviceVersion.author}}</strong>&nbsp;{{t dashboard.configHistory.info-bar.authoredOn}}&nbsp;<strong>{{serviceVersion.createdDate}}</strong></div>
-                        <div class="notes">{{{serviceVersion.fullNotes}}}</div>
+                        <div class="notes">{{serviceVersion.fullNotes}}</div>
                       </div>
                       <div class="version-operations-buttons">
                         <button {{bindAttr disabled="serviceVersion.disabledActionAttr.view" class=":btn serviceVersion.isDisplayed:not-allowed-cursor" title="serviceVersion.disabledActionMessages.view"}} {{action doAction serviceVersion view.actionTypes.SWITCH target="view"}}><i class="icon-search"></i>&nbsp;{{t common.view}}</button>

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4dfe0d3/ambari-web/app/templates/common/configs/service_version_box.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/service_version_box.hbs b/ambari-web/app/templates/common/configs/service_version_box.hbs
index 5177c8f..4c8095b 100644
--- a/ambari-web/app/templates/common/configs/service_version_box.hbs
+++ b/ambari-web/app/templates/common/configs/service_version_box.hbs
@@ -40,7 +40,7 @@
         <span class="label label-info">{{serviceVersion.versionText}}</span> <span class="pull-right"><strong>{{serviceVersion.configGroupName}}</strong></span>
         <span class="stack">{{serviceVersion.stackVersion}}</span>
         <div class="date"><strong>{{serviceVersion.author}}</strong>&nbsp;{{t dashboard.configHistory.info-bar.authoredOn}}&nbsp;<strong>{{serviceVersion.createdDate}}</strong></div>
-        <div class="notes">{{{serviceVersion.fullNotes}}}</div>
+        <div class="notes">{{serviceVersion.fullNotes}}</div>
       </div>
       <div class="version-operations-buttons">
         <button {{bindAttr disabled="serviceVersion.disabledActionAttr.view" class=":btn serviceVersion.isDisplayed:not-allowed-cursor" title="serviceVersion.disabledActionMessages.view"}} {{action doAction serviceVersion view.actionTypes.SWITCH target="view.parentView"}}><i class="icon-search"></i>&nbsp;{{t common.view}}</button>

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4dfe0d3/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 ccbcf05..be50369 100644
--- a/ambari-web/app/templates/main/dashboard/config_history.hbs
+++ b/ambari-web/app/templates/main/dashboard/config_history.hbs
@@ -60,14 +60,14 @@
             <td class="notes">
               {{#if item.moreNotesExists}}
                 {{#if view.showLessNotes}}
-                  {{{item.briefNotes}}}
+                  {{item.briefNotes}}
                   <a {{action toggleShowLessStatus target="view"}} class="show-more-button">>> More</a>
                 {{else}}
-                  {{{item.fullNotes}}}
+                  {{item.fullNotes}}
                   <a {{action toggleShowLessStatus target="view"}} class="show-more-button"><< Less</a>
                 {{/if}}
               {{else}}
-                {{{item.briefNotes}}}
+                {{item.briefNotes}}
               {{/if}}
             </td>
           {{/view}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4dfe0d3/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 c23f609..7f80bdf 100644
--- a/ambari-web/app/views/common/configs/config_history_flow.js
+++ b/ambari-web/app/views/common/configs/config_history_flow.js
@@ -158,7 +158,8 @@ App.ConfigHistoryFlowView = Em.View.extend({
 
   didInsertElement: function () {
     App.tooltip(this.$('[data-toggle=tooltip]'),{
-      placement: 'bottom'
+      placement: 'bottom',
+      html: false
     });
     App.tooltip(this.$('[data-toggle=arrow-tooltip]'),{
       placement: 'top'

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4dfe0d3/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 19c4233..6bd37b1 100644
--- a/ambari-web/app/views/main/dashboard/config_history_view.js
+++ b/ambari-web/app/views/main/dashboard/config_history_view.js
@@ -173,7 +173,7 @@ App.MainConfigHistoryView = App.TableView.extend(App.TableServerViewMixin, {
       this.toggleProperty('showLessNotes');
     },
     didInsertElement: function () {
-      App.tooltip(this.$("[rel='Tooltip']"));
+      App.tooltip(this.$("[rel='Tooltip']"), {html: false});
     }
   }),