Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

elastic/kibana-executor-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kibana-executor-service

A periodical executor service for Kibana

Install

npm install kibana-executor-service

Requirements

  • Kibana 4.4+

Example Usage

import modules from 'ui/modules';
import 'kibana-executor-service';
var app = modules.get('app/example', ['kibana/executor']);

app.controller('exampleController', function ($executor, timefilter, $scope, $http) {
  timefilter.enabled = true;
  
  $executor.register({
    execute: () => {
      // Do some periodic task like hit an HTTP api endpoint
      $http.get('/something/very/cool');
    },
    handleResponse: (resp) => {
      // Sweet dude!
    },
    handleError: (err) => {
      // Oops!
    }
  });

  // Start the executor
  $executor.start();

  // Destory the executor
  $scope.$on('$destroy', $executor.destroy);

});

About

A periodical executor service for Kibana

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published