kibana-executor-service

0.0.1 • Public • Published

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);
 
});

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i kibana-executor-service

      Weekly Downloads

      2

      Version

      0.0.1

      License

      Apache-2.0

      Last publish

      Collaborators

      • ccowan