Commit ea83b4aa by Rashid Khan

Merge pull request #290 from rashidkpc/master

Added order option to terms table
parents f329fca7 d2d4809f
...@@ -211,7 +211,6 @@ angular.module('kibana.table', []) ...@@ -211,7 +211,6 @@ angular.module('kibana.table', [])
$scope.all_fields = kbn.get_all_fields(_.pluck($scope.data,'_source')); $scope.all_fields = kbn.get_all_fields(_.pluck($scope.data,'_source'));
fields.add_fields($scope.all_fields); fields.add_fields($scope.all_fields);
console.log(fields);
// If we're not sorting in reverse chrono order, query every index for // If we're not sorting in reverse chrono order, query every index for
// size*pages results // size*pages results
......
...@@ -8,7 +8,11 @@ ...@@ -8,7 +8,11 @@
<label class="small">Length</label> <label class="small">Length</label>
<input class="input-small" type="number" ng-model="panel.size" ng-change="set_refresh(true)"> <input class="input-small" type="number" ng-model="panel.size" ng-change="set_refresh(true)">
</div> </div>
<div class="span6"> <div class="span3">
<label class="small">Order</label>
<select class="input-medium" ng-model="panel.order" ng-options="f for f in ['count','term','reverse_count','reverse_term']" ng-change="set_refresh(true)"></select></span>
</div>
<div class="span4">
<label class="small">Exclude Terms(s) (comma seperated)</label> <label class="small">Exclude Terms(s) (comma seperated)</label>
<input array-join type="text" ng-model='panel.exclude'></input> <input array-join type="text" ng-model='panel.exclude'></input>
</div> </div>
......
...@@ -38,6 +38,7 @@ angular.module('kibana.terms', []) ...@@ -38,6 +38,7 @@ angular.module('kibana.terms', [])
missing : true, missing : true,
other : true, other : true,
size : 10, size : 10,
order : 'count',
style : { "font-size": '10pt'}, style : { "font-size": '10pt'},
donut : false, donut : false,
tilt : false, tilt : false,
...@@ -83,6 +84,7 @@ angular.module('kibana.terms', []) ...@@ -83,6 +84,7 @@ angular.module('kibana.terms', [])
.facet($scope.ejs.TermsFacet('terms') .facet($scope.ejs.TermsFacet('terms')
.field($scope.panel.field) .field($scope.panel.field)
.size($scope.panel.size) .size($scope.panel.size)
.order($scope.panel.order)
.exclude($scope.panel.exclude) .exclude($scope.panel.exclude)
.facetFilter($scope.ejs.QueryFilter( .facetFilter($scope.ejs.QueryFilter(
$scope.ejs.FilteredQuery( $scope.ejs.FilteredQuery(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment