summaryrefslogtreecommitdiffstats
path: root/install/ui/ipa.js
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2011-12-20 19:45:57 -0600
committerEndi S. Dewata <edewata@redhat.com>2011-12-21 13:23:08 -0600
commit46d3abc450db20c3e4c0854dbf9e711f59db3bff (patch)
tree2798b4d6123ea840917f5f949b131d9c3bf6c767 /install/ui/ipa.js
parentedd37d20198ba95ebabdbdbf8030f1ec1ecffb6b (diff)
downloadfreeipa-46d3abc450db20c3e4c0854dbf9e711f59db3bff.tar.gz
freeipa-46d3abc450db20c3e4c0854dbf9e711f59db3bff.tar.xz
freeipa-46d3abc450db20c3e4c0854dbf9e711f59db3bff.zip
Reload UI on server upgrade.
The JSON server has been modified to return the version number in all responses. The UI has been modified to keep the version obtained during env operation and check the version returned in subsequent operations. If the version changes the UI will reload itself. Ticket #946
Diffstat (limited to 'install/ui/ipa.js')
-rw-r--r--install/ui/ipa.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/install/ui/ipa.js b/install/ui/ipa.js
index 080f4836d..23a5e4287 100644
--- a/install/ui/ipa.js
+++ b/install/ui/ipa.js
@@ -128,6 +128,7 @@ var IPA = function() {
method: 'env',
on_success: function(data, text_status, xhr) {
that.env = data.result;
+ that.version = that.env.version;
}
}));
@@ -420,6 +421,9 @@ IPA.command = function(spec) {
message: data ? xhr.statusText : IPA.get_message('errors.no_response', 'No response')
});
+ } else if (IPA.version && data.version && IPA.version !== data.version) {
+ window.location.reload();
+
} else if (IPA.principal && data.principal && IPA.principal !== data.principal) {
window.location.reload();