Skip to content

Commit

Permalink
[metricVis] Fix html support
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Apr 26, 2017
1 parent 984aaa8 commit 079d1cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core_plugins/metric_vis/public/metric_vis.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div ng-controller="KbnMetricVisController" class="metric-vis">
<div class="metric-container" ng-repeat="metric in metrics">
<div class="metric-value" ng-style="{'font-size': vis.params.fontSize+'pt'}">{{metric.value}}</div>
<div class="metric-value" ng-bind-html="metric.value" ng-style="{'font-size': vis.params.fontSize+'pt'}"></div>
<div>{{metric.label}}</div>
</div>
</div>
4 changes: 2 additions & 2 deletions src/core_plugins/metric_vis/public/metric_vis_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { uiModules } from 'ui/modules';
// didn't already
const module = uiModules.get('kibana/metric_vis', ['kibana']);

module.controller('KbnMetricVisController', function ($scope, $element, Private) {
module.controller('KbnMetricVisController', function ($scope, $element, Private, $sce) {
const tabifyAggResponse = Private(AggResponseTabifyProvider);

const metrics = $scope.metrics = [];
Expand All @@ -16,7 +16,7 @@ module.controller('KbnMetricVisController', function ($scope, $element, Private)

metrics.push({
label: column.title,
value: value.toString('html')
value: $sce.trustAsHtml(value.toString('html'))
});
});
});
Expand Down

0 comments on commit 079d1cd

Please sign in to comment.