@spalger/kibana
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
19 lines (17 loc) • 464 B
JavaScript
define(function (require) {
var _ = require('lodash');
var angular = require('angular');
/**
* Take text from the model and present it to the user as a string
* @param {text} model value
* @returns {string}
*/
return function toUser(text) {
if (text == null) return '';
if (_.isObject(text)) {
if (text.query_string) return toUser(text.query_string.query);
return angular.toJson(text);
}
return '' + text;
};
});