@ovh-ux/ng-log-live-tail

2.4.0 • Public • Published

ng-log-live-tail

AngularJS log to customer module.

npm version Downloads Dependencies Dev Dependencies

Poll a log API for displaying messages

Install

$ yarn add @ovh-ux/ng-log-live-tail

Usage

import angular from 'angular';
import '@ovh-ux/ng-log-live-tail';

angular.module('myApp', [ngLogToCustomer]).controller(
  'MyCtrl',
  /* @ngInject */ () => {
    /** Pass keys information as an objet with keyNames and path in API returned data
     * Note : _id is mandatory since it ensure a log is unique */
    this.logKeys = {
      _id: 'message._id',
      requestReceivedTimestamp: 'message.audit_requestReceivedTimestamp_date',
      verb: 'message.audit_verb',
      authorizationDecision: 'message.audit_authorizationDecision',
      responseStatus: 'message.audit_responseStatus',
      user: 'message.audit_user',
      requestURI: 'message.audit_requestURI',
    };

    this.logSrcUrl = 'http://my-log-url';
  },
);
<div data-ng-controller="MyCtrl as $ctrl">
  <log-to-customer source="$ctrl.logSrcUrl" log-keys="$ctrl.logKeys">
    
    <!--Optionnal : right tile transclude content-->
    <right-tile>Content will be placed right to the live tail. Tail will be fullscreen if no content is passed.</right-tile>
  </log-to-customer>
</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-log-live-tail

Weekly Downloads

2

Version

2.4.0

License

BSD-3-Clause

Unpacked Size

9.54 MB

Total Files

38

Last publish

Collaborators

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