Bug 1571399 - [RFE] Improve UI plugin API for adding action buttons
Summary: [RFE] Improve UI plugin API for adding action buttons
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Frontend.WebAdmin
Version: future
Hardware: Unspecified
OS: Unspecified
high
medium vote
Target Milestone: ovirt-4.3.0
: 4.3.0
Assignee: Vojtech Szocs
QA Contact: Pavel Novotny
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-24 16:56 UTC by Vojtech Szocs
Modified: 2019-03-26 07:17 UTC (History)
5 users (show)

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.
Clone Of:
Environment:
Last Closed: 2019-03-26 07:17:47 UTC
oVirt Team: UX
rule-engine: ovirt-4.3?
rule-engine: planning_ack?
rule-engine: devel_ack+
lsvaty: testing_ack+


Attachments (Terms of Use)
Test UI plugin (563 bytes, application/x-gzip)
2018-05-16 17:16 UTC, Vojtech Szocs
no flags Details
Test UI plugin (49.98 KB, image/png)
2018-05-16 17:18 UTC, Vojtech Szocs
no flags Details


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 89266 master MERGED webadmin: UI plugin kebab menu 2020-05-27 10:16:26 UTC
oVirt gerrit 90349 master MERGED webadmin: UI plugin API action button enhancements 2020-05-27 10:16:27 UTC

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
ovirt-engine-4.3.2.1-0.1.el7.noarch
ovirt-engine-webadmin-portal-4.3.2.1-0.1.el7.noarch

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.


Note You need to log in before you can comment on or make changes to this bug.