Skip to content

Commit

Permalink
Tested with 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
DeanF committed Apr 17, 2017
1 parent 52a15a2 commit 5aa5f40
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions public/health_metric_vis_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module.controller('KbnHealthMetricVisController', function ($scope, Private) {
tableGroups.tables.forEach(function (table) {
table.columns.forEach(function (column, i) {
const fieldFormatter = table.aggConfig(column).fieldFormatter();
let value = table.rows[0][i];
let value = table.rows[0][i].value;
let formattedValue = isInvalid(value) ? '?' : fieldFormatter(value);
let color = getColor(value, $scope.vis.params);

Expand All @@ -55,14 +55,14 @@ module.controller('KbnHealthMetricVisController', function ($scope, Private) {
});
};

$scope.$watchMulti(['esResponse', 'vis.params'], function ([resp]) {
if (resp) {
$scope.$watchMulti(['esResponse', 'vis.params'], function () {
if ($scope.esResponse) {
const options = {
asAggConfigResults: true
};

metrics.length = 0;
$scope.processTableGroups(tabifyAggResponse($scope.vis, resp, options));
$scope.processTableGroups(tabifyAggResponse($scope.vis, $scope.esResponse, options));
$element.trigger('renderComplete');
}
});
Expand Down

0 comments on commit 5aa5f40

Please sign in to comment.