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
24 lines (19 loc) • 594 B
JavaScript
var _ = require('lodash');
var $ = require('jquery');
var app = require('ui/modules').get('apps/timelion', []);
app.directive('refreshHack', function ($rootScope) {
return {
restrict: 'A',
link: function ($scope) {
function broadcast() {
$scope.$broadcast('fetch');
}
$scope.$on('$destroy', function () {
$('[name="queryInput"]').unbind('submit', broadcast);
$('[ng-click="fetch()"]').unbind('click', broadcast);
});
$('[name="queryInput"]').submit(broadcast);
$('[ng-click="fetch()"]').click(broadcast);
}
};
});