URL: https://github.com/freeipa/freeipa/pull/1834 Author: Rezney Title: #1834: [Backport][ipa-4-6] webui: refresh complex pages after modification Action: opened
PR body: """ This PR was opened automatically because PR #1782 was pushed to master and backport to ipa-4-6 is required. """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/1834/head:pr1834 git checkout pr1834
From 5f96d9a76c0c8757a7304a9497b8a648d458312c Mon Sep 17 00:00:00 2001 From: Petr Vobornik <pvobo...@redhat.com> Date: Thu, 5 Apr 2018 13:56:00 +0200 Subject: [PATCH] webui: refresh complex pages after modification Details facet for user, hosts, service, user override entities require complex reload as they gather information from multiple sources - e.g. all of them do cert-find. On update only $entity-mod is execute and its result doesn't have all information required for refresh of the page therefore some fields are missing or empty. This patch modifies the facets to do full refresh instead of default load and thus the pages will have all required info. https://pagure.io/freeipa/issue/5776 --- install/ui/src/freeipa/host.js | 6 ++++++ install/ui/src/freeipa/idviews.js | 6 ++++++ install/ui/src/freeipa/service.js | 6 ++++++ install/ui/src/freeipa/user.js | 5 +++++ 4 files changed, 23 insertions(+) diff --git a/install/ui/src/freeipa/host.js b/install/ui/src/freeipa/host.js index acecff1e5b..8aa1ef9d8c 100644 --- a/install/ui/src/freeipa/host.js +++ b/install/ui/src/freeipa/host.js @@ -518,6 +518,12 @@ IPA.host.details_facet = function(spec, no_init) { return that.entity.name+'_show_'+that.get_pkey(); }; + that.update_on_success = function(data, text_status, xhr) { + that.on_update.notify(); + that.nofify_update_success(); + that.refresh(); + }; + if (!no_init) that.init_details_facet(); return that; diff --git a/install/ui/src/freeipa/idviews.js b/install/ui/src/freeipa/idviews.js index 0511820e2b..b0ee8b5a03 100644 --- a/install/ui/src/freeipa/idviews.js +++ b/install/ui/src/freeipa/idviews.js @@ -450,6 +450,12 @@ idviews.id_override_user_details_facet = function(spec) { return batch; }; + that.update_on_success = function(data, text_status, xhr) { + that.on_update.notify(); + that.nofify_update_success(); + that.refresh(); + }; + return that; }; diff --git a/install/ui/src/freeipa/service.js b/install/ui/src/freeipa/service.js index c798d2999f..93808b0122 100644 --- a/install/ui/src/freeipa/service.js +++ b/install/ui/src/freeipa/service.js @@ -500,6 +500,12 @@ IPA.service.details_facet = function(spec, no_init) { return batch; }; + that.update_on_success = function(data, text_status, xhr) { + that.on_update.notify(); + that.nofify_update_success(); + that.refresh(); + }; + if (!no_init) that.init_details_facet(); return that; diff --git a/install/ui/src/freeipa/user.js b/install/ui/src/freeipa/user.js index 6b2bf196c3..30ab40fb33 100644 --- a/install/ui/src/freeipa/user.js +++ b/install/ui/src/freeipa/user.js @@ -621,6 +621,11 @@ IPA.user.details_facet = function(spec, no_init) { return batch; }; + that.update_on_success = function(data, text_status, xhr) { + that.on_update.notify(); + that.nofify_update_success(); + that.refresh(); + }; if (!no_init) that.init_details_facet();
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org