summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa/details.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2015-05-26 15:26:15 +0200
committerPetr Vobornik <pvoborni@redhat.com>2015-06-04 13:20:44 +0200
commit0138595f581d4b8ed76622d067e8dba0c29fd62f (patch)
tree31b86f11369d37421ce930da39dcc3bc473c80cc /install/ui/src/freeipa/details.js
parent538178b53dcb6ecb7a2f1892d648a86202afb7ce (diff)
downloadfreeipa-0138595f581d4b8ed76622d067e8dba0c29fd62f.tar.gz
freeipa-0138595f581d4b8ed76622d067e8dba0c29fd62f.tar.xz
freeipa-0138595f581d4b8ed76622d067e8dba0c29fd62f.zip
webui: configurable refresh command
Allows to change the default 'show' command to something different. E.g. 'get' Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
Diffstat (limited to 'install/ui/src/freeipa/details.js')
-rw-r--r--install/ui/src/freeipa/details.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/install/ui/src/freeipa/details.js b/install/ui/src/freeipa/details.js
index 98c2bdc76..c708a878b 100644
--- a/install/ui/src/freeipa/details.js
+++ b/install/ui/src/freeipa/details.js
@@ -522,6 +522,15 @@ exp.details_facet = IPA.details_facet = function(spec, no_init) {
*/
that.entity = IPA.get_entity(spec.entity);
+
+ /**
+ * Name of refresh RPC command
+ *
+ * - defaults to 'show'
+ * @property {string}
+ */
+ that.refresh_command_name = spec.refresh_command_name || 'show';
+
/**
* Name of update command
*
@@ -992,7 +1001,7 @@ exp.details_facet = IPA.details_facet = function(spec, no_init) {
* @return {string}
*/
that.get_refresh_command_name = function() {
- return that.entity.name+'_show';
+ return that.entity.name+'_'+that.refresh_command_name;
};
/**
@@ -1009,7 +1018,7 @@ exp.details_facet = IPA.details_facet = function(spec, no_init) {
var command = rpc.command({
name: that.get_refresh_command_name(),
entity: that.entity.name,
- method: 'show',
+ method: that.refresh_command_name,
options: options
});