Oved Ourfali has submitted this change and it was merged.
Change subject: webadmin: Allow UI plugins to run certain actions while loading
......................................................................
webadmin: Allow UI plugins to run certain actions while loading
UI plugin API performs requested actions only if the given plugin is
either initializing (within UiInit callback) or in use (within other
callbacks).
This means all API actions are no-op while the plugin is loading, e.g.
before the plugin calls the ready() function that triggers the UiInit
callback.
This limits the usability of plugin API, for example:
var api = window.top.pluginApi('my-plugin');
api.register(objectWithCallbacks);
// problem: cannot use e.g. `api.currentLocale` yet!
api.ready(); // triggers UiInit callback execution
This patch fixes the above issue by letting following API functions
to be executed also while the plugin is loading (before api.ready):
- loginUserName
- loginUserId
- ssoToken
- engineBaseUrl
- currentLocale
Change-Id: I8996f4e7bb69696fb13a99068cf1a0c267b1481a
Bug-Url:
https://bugzilla.redhat.com/1361255
Signed-off-by: Vojtech Szocs <vszocs(a)redhat.com>
---
M
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/plugin/PluginManager.java
M
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/plugin/PluginState.java
2 files changed, 26 insertions(+), 18 deletions(-)
Approvals:
Alexander Wels: Looks good to me, approved
Jenkins CI: Passed CI tests
Vojtech Szocs: Verified
--
To view, visit
https://gerrit.ovirt.org/61778
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8996f4e7bb69696fb13a99068cf1a0c267b1481a
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-4.0
Gerrit-Owner: Vojtech Szocs <vszocs(a)redhat.com>
Gerrit-Reviewer: Alexander Wels <awels(a)redhat.com>
Gerrit-Reviewer: Greg Sheremeta <gshereme(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Oved Ourfali <oourfali(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>