Merge pull request #6128 from rashidkpc/tweak/saved-object-list-length
Make saved object list length configurable
This commit is contained in:
commit
94a9e651b0
|
@ -176,6 +176,11 @@ define(function (require) {
|
|||
value: '($0,0.[00])',
|
||||
description: 'Default <a href="http://numeraljs.com/" target="_blank">numeral format</a> for the "currency" format'
|
||||
},
|
||||
'savedObjects:perPage': {
|
||||
type: 'number',
|
||||
value: 5,
|
||||
description: 'Number of objects to show per page in the load dialog'
|
||||
},
|
||||
'timepicker:timeDefaults': {
|
||||
type: 'json',
|
||||
value: [
|
||||
|
|
|
@ -4,7 +4,7 @@ import keymap from 'ui/utils/key_map';
|
|||
define(function (require) {
|
||||
var module = require('ui/modules').get('kibana');
|
||||
|
||||
module.directive('savedObjectFinder', function ($location, $injector, kbnUrl, Private) {
|
||||
module.directive('savedObjectFinder', function ($location, $injector, kbnUrl, Private, config) {
|
||||
|
||||
var services = Private(require('ui/saved_objects/saved_object_registry')).byLoaderPropertiesName;
|
||||
|
||||
|
@ -23,6 +23,9 @@ define(function (require) {
|
|||
controller: function ($scope, $element, $timeout) {
|
||||
var self = this;
|
||||
|
||||
// The number of items to show in the list
|
||||
$scope.perPage = config.get('savedObjects:perPage');
|
||||
|
||||
// the text input element
|
||||
var $input = $element.find('input[ng-model=filter]');
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<span class="finder-hit-count"><strong>{{finder.hitCount}}</strong> {{finder.hitCountNoun()}}</span>
|
||||
</div>
|
||||
</form>
|
||||
<paginate list="finder.hits" per-page="5">
|
||||
<paginate list="finder.hits" per-page="{{perPage}}">
|
||||
<ul
|
||||
class="list-group list-group-menu"
|
||||
ng-class="{'select-mode': finder.selector.enabled}">
|
||||
|
|
Loading…
Reference in a new issue