mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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
This commit is contained in:
committed by
Endi S. Dewata
parent
edd37d2019
commit
46d3abc450
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user