2.4.0 • Published 9 months ago

@ovh-ux/ng-log-live-tail v2.4.0

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
9 months ago

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

2.3.0

9 months ago

2.4.0

9 months ago

2.2.0

11 months ago

2.1.0

11 months ago

1.1.0

1 year ago