ovh-angular-tail-logs
v1.1.1
Published
Poll a log API for displaying messages
Downloads
31
Maintainers
Keywords
Readme
ovh-angular-tail-logs
Poll a log API for displaying messages
angular.module("myapp", ["ovh-angular-tail-logs"]).controller("myCtrl", function ($q, OvhTailLogs) {
this.logger = new OvhTailLogs({
source: function () {
return $q.when("http://my-log-url");
},
delay: 2000
});
});
<div data-ng-controller="myCtrl as Ctrl">
<ovh-tail-logs>
<div data-ng-repeat="log in Ctrl.logger.logs track by $index"
data-ng-bind="log.message">
</div>
</ovh-tail-logs>
</div>
Installation
Bower
bower install ovh-angular-tail-logs --save
NPM
npm install ovh-angular-tail-logs --save
Configuration
- Include
ovh-angular-tail-logs.css
in your app:
<link rel="stylesheet" href="bower_components/ovh-angular-tail-logs/dist/ovh-angular-tail-logs.css"/>
- Include
ovh-angular-tail-logs.js
in your app:
<script src="bower_components/ovh-angular-tail-logs/dist/ovh-angular-tail-logs.js"></script>
- Add
ovh-angular-tail-logs
as a new module dependency in your angular app.
var myapp = angular.module('myapp', ['ovh-angular-tail-logs']);
Get the sources
git clone https://github.com/ovh/ovh-angular-tail-logs.git
cd ovh-angular-tail-logs
npm install
bower install
You've developed a new cool feature ? Fixed an annoying bug ? We'd be happy to hear from you !
Have a look in CONTRIBUTING.md
Build the documentation
grunt ngdocs
Related links
- Contribute: https://github.com/ovh-ux/ovh-angular-tail-logs
- Report bugs: https://github.com/ovh-ux/ovh-angular-tail-logs/issues
- Get latest version: https://github.com/ovh-ux/ovh-angular-tail-logs
License
See https://github.com/ovh-ux/ovh-angular-tail-logs/blob/master/LICENSE