diff --git a/src/legacy/core_plugins/kibana/public/discover/controllers/discover.js b/src/legacy/core_plugins/kibana/public/discover/controllers/discover.js index 463a7bebf14eb..3adc38bfea5dd 100644 --- a/src/legacy/core_plugins/kibana/public/discover/controllers/discover.js +++ b/src/legacy/core_plugins/kibana/public/discover/controllers/discover.js @@ -20,6 +20,7 @@ import _ from 'lodash'; import React from 'react'; import angular from 'angular'; +import moment from 'moment'; import chrome from 'ui/chrome'; import dateMath from '@elastic/datemath'; @@ -32,7 +33,6 @@ import * as filterActions from '../doc_table/actions/filter'; import 'ui/listen'; import 'ui/visualize'; import 'ui/fixed_scroll'; -import 'ui/filters/moment'; import 'ui/index_patterns'; import 'ui/state_management/app_state'; import { timefilter } from 'ui/timefilter'; @@ -792,6 +792,10 @@ function discoverController( $scope.time = timefilter.getTime(); }; + $scope.toMoment = function (datetime) { + return moment(datetime).format(config.get('dateFormat')); + }; + $scope.updateRefreshInterval = function () { $scope.refreshInterval = timefilter.getRefreshInterval(); }; diff --git a/src/legacy/core_plugins/kibana/public/discover/doc_table/components/table_header.html b/src/legacy/core_plugins/kibana/public/discover/doc_table/components/table_header.html index 9a595b293254b..b254461f70429 100644 --- a/src/legacy/core_plugins/kibana/public/discover/doc_table/components/table_header.html +++ b/src/legacy/core_plugins/kibana/public/discover/doc_table/components/table_header.html @@ -29,7 +29,7 @@ - {{name | shortDots}} + {{getShortDotsName(name)}}