logs-browser.html
96 lines
| 4.1 KiB
| text/html
|
HtmlLexer
r76 | <ng-include src="'templates/loader.html'" ng-if="$ctrl.isLoading.logs"></ng-include> | |||
r0 | ||||
r76 | <div ng-if="$ctrl.isLoading.logs === false"> | |||
r0 | ||||
<p class="search-params"> | ||||
<strong>Search params:</strong> | ||||
r76 | <span ng-repeat="tag in $ctrl.searchParams.tags" class="tag"> | |||
r0 | <strong>{{tag.type}}</strong> | |||
r76 | {{ tag.type == 'resource' ? $ctrl.applications[tag.value].resource_name : tag.value }} | |||
r0 | ||||
r76 | <a ng-click="$ctrl.removeSearchTag(tag)"><span class="fa fa-times"></span></a> | |||
r0 | </span> | |||
</p> | ||||
<p> | ||||
<script type="text/ng-template" id="SearchTypeAheadUrl.html"> | ||||
</script> | ||||
<form class="form"> | ||||
<div class="typeahead-tags"> | ||||
r76 | <input type="text" id="typeAhead" ng-model="$ctrl.filterTypeAhead" placeholder="Start typing to filter logs for events, filter by servers, namespaces, levels." | |||
ng-keydown="$ctrl.typeAheadTag($event)" | ||||
uib-typeahead="tag as tag.text for tag in $ctrl.filterTypeAheadOptions | filter:$viewValue:$ctrl.aheadFilter" | ||||
r0 | typeahead-min-length="1" class="form-control" | |||
typeahead-template-url="templates/directives/search_type_ahead.html"> | ||||
</div> | ||||
</form> | ||||
r76 | <div class="well animate-show position-absolute increse-zindex" ng-if="$ctrl.showDatePicker" ng-model="$ctrl.pickerDate" ng-change="$ctrl.pickerDateChanged()"> | |||
r0 | <uib-datepicker></uib-datepicker> | |||
</div> | ||||
</p> | ||||
<div class="panel"> | ||||
<div class="panel-body"> | ||||
r76 | <c3chart data-domid="log_events_chart" data-data="$ctrl.logEventsChartData" data-config="$ctrl.logEventsChartConfig"> | |||
r0 | </c3chart> | |||
</div> | ||||
</div> | ||||
<div class="text-center"> | ||||
r76 | <uib-pagination total-items="$ctrl.itemCount" items-per-page="$ctrl.itemsPerPage" ng-model="$ctrl.page" max-size="10" | |||
ng-change="$ctrl.paginationChange()" | ||||
r0 | class="pagination pagination-sm" boundary-links="true" direction-links="false"></uib-pagination> | |||
</div> | ||||
<div class="panel panel-default"> | ||||
<table class="table table-striped log-list"> | ||||
<caption>Logs</caption> | ||||
<thead> | ||||
<tr> | ||||
<th class="c1 resource">Application</th> | ||||
<th class="c2 message">Message</th> | ||||
<th class="c3 when">When</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
r76 | <tr ng-repeat="log in $ctrl.logsPage track by log.log_id" class="{{$odd ? 'odd' : 'even'}}"> | |||
r0 | <td class="c1"> | |||
r76 | <a class="tag application" ng-click="$ctrl.addSearchTag({type:'resource', value:log.resource_id})"> | |||
r0 | <span class="name">{{log.resource_name}}</span></a> | |||
</td> | ||||
<td class="c2"> | ||||
r76 | <a class="tag {{log.log_level|lowercase}}" ng-click="$ctrl.addSearchTag({type:'level', value:log.log_level})"> | |||
r0 | <span class="name">level:</span> {{log.log_level}}</a> | |||
r76 | <a class="tag" ng-click="$ctrl.addSearchTag({type:'namespace', value:log.namespace})"> | |||
r0 | <span class="name">namespace:</span> {{log.namespace}}</a> | |||
r76 | <a ng-repeat="(tag, value) in log.tags" class="tag" ng-click="$ctrl.addSearchTag({type:tag, value:value})"> | |||
r0 | <span class="name">{{tag}}:</span> {{value}}</a> | |||
r45 | <div class="log">{{log.message}}</div> | |||
r0 | </td> | |||
<td class="c3 when"> | ||||
r76 | <a ng-click="$ctrl.filterId(log)" data-uib-tooltip="{{log.timestamp}}"> | |||
r0 | <iso-to-relative-time time="{{log.timestamp}}"/> | |||
</a> | ||||
</td> | ||||
</tr> | ||||
</tbody> | ||||
</table> | ||||
</div> | ||||
<div class="text-center"> | ||||
r76 | <uib-pagination total-items="$ctrl.itemCount" items-per-page="$ctrl.itemsPerPage" ng-model="$ctrl.page" max-size="10" | |||
ng-change="$ctrl.paginationChange()" | ||||
r0 | class="pagination pagination-sm" boundary-links="true" direction-links="false"></uib-pagination> | |||
</div> | ||||
</div> | ||||