kibana-123
Version:
Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elastic
15 lines (13 loc) • 412 B
JavaScript
import moment from 'moment';
import _ from 'lodash';
import uiModules from 'ui/modules';
uiModules
.get('kibana')
.filter('moment', function (config) {
return function (datetime) {
const format = config.get('dateFormat');
if (moment.isMoment(datetime)) return datetime.format(format);
if (_.isDate(datetime)) return moment(datetime).format(format);
return datetime;
};
});