mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
webui: declare search command options in search facet
A search facet could be defined with an option which is always applied during entity-find command on facet refresh. e.g. ipa user-find --preserved Reviewed-By: David Kupka <dkupka@redhat.com> Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
This commit is contained in:
parent
69bc4f4955
commit
c352616ac9
@ -93,12 +93,24 @@ exp.search_facet_pre_op = function(spec, context) {
|
||||
return spec;
|
||||
};
|
||||
|
||||
/**
|
||||
* Search facet
|
||||
* @class IPA.search_facet
|
||||
*/
|
||||
IPA.search_facet = function(spec, no_init) {
|
||||
|
||||
spec = spec || {};
|
||||
|
||||
var that = IPA.table_facet(spec, true);
|
||||
|
||||
/**
|
||||
* Additional command options which are added to refresh command on
|
||||
* refresh.
|
||||
*
|
||||
* @property {Object}
|
||||
*/
|
||||
that.command_options = spec.command_options || {};
|
||||
|
||||
that.deleter_dialog = spec.deleter_dialog || IPA.search_deleter_dialog;
|
||||
|
||||
that.create_header = function(container) {
|
||||
@ -232,6 +244,15 @@ IPA.search_facet = function(spec, no_init) {
|
||||
return args;
|
||||
};
|
||||
|
||||
/**
|
||||
* Provide RPC options for refresh command
|
||||
* - override point
|
||||
*/
|
||||
that.get_refresh_command_options = function() {
|
||||
|
||||
return that.command_options;
|
||||
};
|
||||
|
||||
that.create_refresh_command = function() {
|
||||
|
||||
var args = that.get_refresh_command_args();
|
||||
@ -243,6 +264,8 @@ IPA.search_facet = function(spec, no_init) {
|
||||
args: args
|
||||
});
|
||||
|
||||
command.set_options(that.get_refresh_command_options());
|
||||
|
||||
if (that.pagination) {
|
||||
if (!that.search_all_entries) command.set_option('pkey_only', true);
|
||||
command.set_option('sizelimit', 0);
|
||||
|
Loading…
Reference in New Issue
Block a user