Bug 1168334
| Summary: | [RFE] Provide UI plugin API to reveal given main tab | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [oVirt] ovirt-engine | Reporter: | Ramesh N <rnachimu> | ||||
| Component: | RFEs | Assignee: | Vojtech Szocs <vszocs> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Petr Matyáš <pmatyas> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | --- | CC: | bugs, gklein, iheim, lsurette, mgoldboi, oourfali, pmatyas, rbalakri, vszocs, yeylon, ykaul | ||||
| Target Milestone: | ovirt-3.6.0-rc | Keywords: | FutureFeature | ||||
| Target Release: | 3.6.0 | Flags: | rule-engine:
ovirt-3.6.0+
ylavi: planning_ack+ rule-engine: devel_ack+ rule-engine: testing_ack+ |
||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | ovirt-3.6.0-alpha1.2 | Doc Type: | Enhancement | ||||
| Doc Text: |
Added new oVirt/RHEV UI plugin API function [1]:
api.revealPlace(historyToken);
[1] http://www.ovirt.org/Features/UIPlugins#API_function_reference
This function allows UI plugins to reveal (navigate to) given application place, e.g. standard or plugin-contributed main tab. The `historyToken` denotes a logical place of the web application, represented as #historyToken in application's URL.
For example, to reveal "Virtual Machines" main tab represented by `WebAdmin.html#vms` URL:
api.revealPlace('vms');
When called from `UiInit` event handler [2], this function can be used to override the default tab shown after loading WebAdmin UI.
[2] http://www.ovirt.org/Features/UIPlugins#Core_functions
|
Story Points: | --- | ||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2016-02-10 12:58:30 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | UX | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Ramesh N
2014-11-26 17:09:38 UTC
This BZ can be split into two separate issues: 1, override default place (URL token, mapping to main tab) after login 2, recognize URL tokens for dynamically-added main tabs Fixing 2, is not trivial due to async nature of dynamically-added main tabs, see BZ comment: https://bugzilla.redhat.com/show_bug.cgi?id=1145227#c9 Anyway, this RFE is valid and we should at least attempt to address both issues mentioned above. Just for reference: Quoting e-mail thread: [Vojtech] """ Implementing this RFE is not trivial due to asynchronous nature of dynamically added (custom) tabs, since UI plugin code can add these at *any* point in time (in "UiInit" callback or anytime later). (So right upon WebAdmin login, #gluster-dashboard might not be added yet, but we want to set it as the default landing tab --> problem.) However, what we can do is trigger UI plugin bootstrap sequence (PluginManager#enablePluginInvocation) *before* showing main GUI, which would give UI plugins chance to add custom tabs in advance, which would solve the "asynchronous custom tab" issue (but only if these custom tabs are added inside "UiInit" and not later). """ [Ramesh/Dusmant] """ That should be enough. We are not doing any dynamic loading stuff here also we don't require the second case in comment #1. """ Based on info in comment #2 narrowing the scope of this RFE to: - override default place (URL token, mapping to main tab) after login Proposed API example: UiInit: function() { api.addMainTab('My Tab', 'my-tab', 'plugin/ExamplePlugin/my.html'); api.revealPlace('my-tab'); // navigate to #my-tab } `api.revealPlace` can be called at any point, assuming that given place (e.g. main tab) is either core (built-in) -or- is dynamic (plugin-contributed) and is already added. Otherwise, WebAdmin will redirect to the default (VMs main tab) place. Vojtech - status should be POST? (In reply to Einav Cohen from comment #4) > Vojtech - status should be POST? Indeed, setting to POST. Updated BZ summary to reflect the fact that new UI plugin API (revealPlace) should work for both standard (built-in) and custom (UI-plugin-contributed) main tabs. Created attachment 1020637 [details]
Test UI plugin
Attached test UI plugin (ui-plugins_1168334.tar.gz) to demonstrate the use of new "revealPlace" API. Associated upstream patch http://gerrit.ovirt.org/40404 is verified and ready for merge. Vojtech - MODIFIED (patches merged)? (In reply to Einav Cohen from comment #10) > Vojtech - MODIFIED (patches merged)? Yes. Moving to MODIFIED. Verified on 3.6.3-1 |