Bug 1369235

Summary: main/sub tab action buttons added by UI plugins are not shown
Product: [oVirt] ovirt-engine Reporter: Vojtech Szocs <vszocs>
Component: Frontend.WebAdminAssignee: Vojtech Szocs <vszocs>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Novotny <pnovotny>
Severity: medium Docs Contact:
Priority: unspecified    
Version: futureCC: bugs, mgoldboi, oourfali
Target Milestone: ovirt-4.0.4Flags: rule-engine: ovirt-4.0.z+
mgoldboi: planning_ack+
oourfali: devel_ack+
pstehlik: testing_ack+
Target Release: 4.0.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-26 12:41:43 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:
Attachments:
Description Flags
Test UI plugin
none
button UI plugin none

Description Vojtech Szocs 2016-08-22 18:53:44 UTC
Description of problem:

With recent changes in oVirt UI plugin infra [1], there seems to be an issue where main/sub tab action buttons added by UI plugins are not shown at all.

[1] https://gerrit.ovirt.org/#/c/60666/

Steps to Reproduce:
1. Write a UI plugin that calls api.addMainTabActionButton() and/or api.addSubTabActionButton() within its UiInit callback.
2. Open WebAdmin UI and switch to the relevant main/sub tab.

Actual results:

Custom action buttons are not shown.

Expected results:

Custom action buttons should be shown.

Comment 1 Vojtech Szocs 2016-08-22 19:02:32 UTC
Created attachment 1193066 [details]
Test UI plugin

Comment 2 Vojtech Szocs 2016-08-22 19:03:31 UTC
Attached test UI plugin that adds "Click me!" button on "Data Center" main tab.

Comment 3 Vojtech Szocs 2016-08-22 19:05:22 UTC
The fix is trivial and should be backported into 4.0 as well.

Comment 4 Pavel Novotny 2016-09-06 16:08:02 UTC
Verified in
ovirt-engine-webadmin-portal-4.0.4-0.1.el7ev.noarch
rhevm-4.0.4-0.1.el7ev.noarch

Verification steps:
1. Install Vojta's test UI plugin from attachment 1193066 [details].
2. Open or reload Webadmin page and go to Data Centers tab.

Result: "Click me!" action button is shown on the main tab. 
See screenshot attached.

Comment 5 Pavel Novotny 2016-09-06 16:09:00 UTC
Created attachment 1198342 [details]
button UI plugin