paginate the fields with the paginate directive

This commit is contained in:
Spencer Alger 2014-06-12 15:29:47 -07:00
parent 6e5125923e
commit c4c8af0675

View file

@ -42,53 +42,37 @@
</div>
</div>
<div ng-hide="tablePages() == 1">
<center>
<button
ng-disabled="table.page == 0"
ng-click="table.page=table.page-1"
class="btn btn-sm" >
Previous
</button>
{{table.page+1}}/{{tablePages()}}
<button
ng-disabled="table.page >= indexPattern.fields.length/table.max - 1"
ng-click="table.page=table.page+1"
class="btn btn-sm" >
Next
</button>
</center>
</div>
<table class="table">
<thead>
<th ng-click="setFieldSort('name')">name <i ng-class="sortClass('name')"></i></th>
<th ng-click="setFieldSort('type')">type <i ng-class="sortClass('type')"></i></th>
</thead>
<tr
ng-repeat="field in indexPattern.fields
| orderBy:table.by:table.reverse
| startFrom:table.page*table.max
| limitTo:table.max">
<td>
<span bo-text="field.name"></span>
&nbsp;
<span
bo-if="indexPattern.timeFieldName === field.name"
tooltip="This field represents the time that events occured"
class="label label-default">
<i class="fa fa-clock-o"></i>
</span>
</td>
<paginate list="indexPattern.fields" per-page="20">
<table class="table">
<thead>
<th ng-click="setFieldSort('name')">name <i ng-class="sortClass('name')"></i></th>
<th ng-click="setFieldSort('type')">type <i ng-class="sortClass('type')"></i></th>
</thead>
<tr
ng-repeat="field in page
| orderBy:table.by:table.reverse
| startFrom:table.page*table.max
| limitTo:table.max">
<td>
<span bo-text="field.type"></span>
<i
bo-if="field.type == 'conflict'"
tooltip="The type of this field changes across indices. It is unavailable for many analysis functions"
class="fa fa-warning text-color-warning"></i>
</td>
</tr>
</table>
<span bo-text="field.name"></span>
&nbsp;
<span
bo-if="indexPattern.timeFieldName === field.name"
tooltip="This field represents the time that events occured"
class="label label-default">
<i class="fa fa-clock-o"></i>
</span>
</td>
<td>
<span bo-text="field.type"></span>
<i
bo-if="field.type == 'conflict'"
tooltip="The type of this field changes across indices. It is unavailable for many analysis functions"
class="fa fa-warning text-color-warning"></i>
</td>
</tr>
</table>
</paginate>
</div>
</kbn-settings-indices>
</kbn-settings-app>