@ovh-ux/ng-tail-logs

2.2.0 • Public • Published

ng-tail-logs

AngularJS tail logs module.

npm version Downloads Dependencies Dev Dependencies

Poll a log API for displaying messages

Install

$ yarn add @ovh-ux/ng-tail-logs

Usage

import angular from 'angular';
import ngTailLogs from '@ovh-ux/ng-tail-logs';

angular.module('myApp', [ngTailLogs]).controller(
  'MyCtrl',
  /* @ngInject */ ($q, TailLogs) => {
    this.logger = new TailLogs({
      source: () => $q.when('http://my-log-url'),
      delay: 2000,
    });
  },
);
<div data-ng-controller="MyCtrl as $ctrl">
    <tail-logs>
        <div data-ng-repeat="log in $ctrl.logger.logs track by $index"
             data-ng-bind="log.message">
        </div>
    </tail-logs>
</div>

Test

$ yarn test

Contributing

Always feel free to help out! Whether it's filing bugs and feature requests or working on some of the open issues, our contributing guide will help get you started.

License

BSD-3-Clause © OVH SAS

Package Sidebar

Install

npm i @ovh-ux/ng-tail-logs

Weekly Downloads

4

Version

2.2.0

License

BSD-3-Clause

Unpacked Size

291 kB

Total Files

14

Last publish

Collaborators

  • anooparveti
  • jisay
  • blary_jp
  • antleblanc
  • ovh-ux-cds
  • lizardk
  • ovh
  • marie-j