Bug 1571399

Summary: [RFE] Improve UI plugin API for adding action buttons
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: high    
Version: futureCC: apinnick, bugs, gshereme, lsvaty, tjelinek
Target Milestone: ovirt-4.3.0Keywords: FutureFeature
Target Release: 4.3.0Flags: rule-engine: ovirt-4.3?
rule-engine: planning_ack?
rule-engine: devel_ack+
lsvaty: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: ovirt-engine-4.3.0_alpha Doc Type: Enhancement
Doc Text:
The current release of the User Interface Plugin API provides greater control over the placement of action buttons.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-26 07:17:47 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:
Description Flags
Test UI plugin
Test UI plugin none

Description Vojtech Szocs 2018-04-24 16:56:28 UTC
When adding action buttons via addMenuPlaceActionButton and/or addDetailPlaceActionButton API functions, UI plugins should be able to specify the relative order of the button, as well as whether it should be placed under the "more" (also known as "kebab") menu.

Example of controlling button order:

  api.addMenuPlaceActionButton('VirtualMachine', 'Test Button', {
    priority: 0 // put this button before all the other buttons

Example of controlling "more" menu placement:

  api.addMenuPlaceActionButton('VirtualMachine', 'Test Button', {
    moreMenu: true

Comment 1 Vojtech Szocs 2018-04-24 18:22:43 UTC
Updated example on controlling button order (priority renamed to index, according to posted patches):

  api.addMenuPlaceActionButton('VirtualMachine', 'Test Button', {
    index: 0

Comment 2 Vojtech Szocs 2018-05-16 17:16:37 UTC
Created attachment 1437489 [details]
Test UI plugin

Comment 3 Vojtech Szocs 2018-05-16 17:18:51 UTC
Created attachment 1437490 [details]
Test UI plugin

Comment 4 Vojtech Szocs 2018-05-16 17:20:46 UTC
Attached test UI plugin to ease BZ verification.

Please check plugin code in test-resources/start.html and adapt if necessary.

To verify, check that button placement is correct (see attached screenshot).

Comment 5 Pavel Novotny 2019-03-25 16:26:01 UTC
Verified in

Verified with provided test plugin in attachment 1437489 [details]

The button placement is correct, the added buttons are placed as can be seen in screenshot in attachment 1437490 [details]

Comment 6 Sandro Bonazzola 2019-03-26 07:17:47 UTC
This bugzilla is included in oVirt 4.3.0 release, published on February 4th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.0 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.