mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
webui: send API version in RPC requests
Currently there is an incorrect behavior that server doesn't send datetime and dnsname data in new format. This patch adds the version to each RPC request making the UI look as the latest client. Server then sends data in correct format. It also removes the "unknown version" warning from each RPC response. https://fedorahosted.org/freeipa/ticket/4394 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
This commit is contained in:
1
Makefile
1
Makefile
@@ -136,6 +136,7 @@ version-update: release-update
|
||||
> ipatests/setup.py
|
||||
sed -e s/__NUM_VERSION__/$(IPA_NUM_VERSION)/ install/ui/src/libs/loader.js.in \
|
||||
> install/ui/src/libs/loader.js
|
||||
perl -pi -e "s:__API_VERSION__:$(IPA_API_VERSION_MAJOR).$(IPA_API_VERSION_MINOR):" install/ui/src/libs/loader.js
|
||||
perl -pi -e "s:__NUM_VERSION__:$(IPA_NUM_VERSION):" ipapython/version.py
|
||||
perl -pi -e "s:__VENDOR_VERSION__:$(IPA_VENDOR_VERSION):" ipapython/version.py
|
||||
perl -pi -e "s:__API_VERSION__:$(IPA_API_VERSION_MAJOR).$(IPA_API_VERSION_MINOR):" ipapython/version.py
|
||||
|
||||
@@ -362,6 +362,8 @@ rpc.command = function(spec) {
|
||||
}
|
||||
}
|
||||
|
||||
that.options.version = window.ipa_loader.api_version;
|
||||
|
||||
that.data = {
|
||||
method: that.get_command(),
|
||||
params: [that.args, that.options]
|
||||
@@ -512,6 +514,8 @@ rpc.batch_command = function(spec) {
|
||||
that.execute = function() {
|
||||
that.errors.clear();
|
||||
|
||||
that.options.version = window.ipa_loader.api_version;
|
||||
|
||||
var command = rpc.command({
|
||||
name: that.name,
|
||||
entity: that.entity,
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
(function() {
|
||||
|
||||
var loader = window.ipa_loader = {
|
||||
num_version: '__NUM_VERSION__'
|
||||
num_version: '__NUM_VERSION__',
|
||||
api_version: '__API_VERSION__'
|
||||
};
|
||||
|
||||
var head = document.getElementsByTagName('head')[0];
|
||||
|
||||
Reference in New Issue
Block a user