Files
grafana/panels/table/module.html
Rashid Khan 06b8dc3809 Added sorting
modified:   common/css/main.css
	modified:   config.js
	modified:   dashboards.js
	modified:   panels/stringquery/module.html
	modified:   panels/table/module.html
	modified:   panels/table/module.js
	modified:   partials/dashboard.html
	panels/sort/
2013-01-31 20:23:34 -07:00

16 lines
697 B
HTML

<div ng-controller='table'>
<h4>{{panel.title}}</h4>
<div style="height:{{row.height}};overflow-y:auto;overflow-x:hidden">
<table class="table table-condensed table-striped">
<thead>
<th ng-repeat="field in panel.fields" class="pointer" ng-click="panel.sort[0] = field">
{{field}}
<i ng-show='field == panel.sort[0]' ng-click="toggle_sort()" class="pointer" ng-class="{'icon-chevron-up': panel.sort[1] == 'asc','icon-chevron-down': panel.sort[1] == 'desc'}"></i>
</th>
</thead>
<tr ng-repeat="row in data">
<td ng-repeat="field in panel.fields">{{row['_source'][field]}}</td>
</tr>
</table>
</div>
</div>