Bug 1285432 - [RFE] Expose global alert messages via UI plugin API
Summary: [RFE] Expose global alert messages via UI plugin API
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Frontend.WebAdmin
Version: future
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.0.0-beta
: 4.0.0
Assignee: Vojtech Szocs
QA Contact: Pavel Novotny
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-25 15:07 UTC by Vojtech Szocs
Modified: 2016-07-15 01:44 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Release Note
Doc Text:
A new UI plugin API function `showAlert` allows UI plugins to display global alert boxes in the top-center of the Administration portal. This is useful to inform users of important events. The `showAlert` function supports different alert types (danger, warning, success, info), and can auto-hide after given time period.
Clone Of:
Environment:
Last Closed: 2016-07-05 07:50:49 UTC
oVirt Team: UX
Embargoed:
rule-engine: ovirt-4.0.0+
pnovotny: testing_plan_complete-
mgoldboi: planning_ack+
ecohen: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)
Alert test UI plugin (488 bytes, application/x-gzip)
2016-03-30 17:07 UTC, Vojtech Szocs
no flags Details
Alert test UI plugin - verification (523 bytes, application/x-gzip)
2016-06-21 16:02 UTC, Pavel Novotny
no flags Details
screen: alerts via UI plugin (61.35 KB, image/png)
2016-06-21 16:03 UTC, Pavel Novotny
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 55504 0 master MERGED webadmin: UI plugin API - showAlert 2016-04-06 14:53:36 UTC

Description Vojtech Szocs 2015-11-25 15:07:00 UTC
According to BZ 1215727 WebAdmin now supports global alerts shown in top center part of the GUI.

The global alert infra supports showing different types of alerts:

  'Danger' alert
  http://imgur.com/xcZhcaK

  'Warning' alert
  http://imgur.com/Jgdl6vA

  'Success' alert
  http://imgur.com/U9EGejw

  'Info' alert
  http://imgur.com/llLVR9d

It would be nice to expose this capability to UI plugins as well.

Comment 1 Oved Ourfali 2016-03-03 07:23:05 UTC
Vojtech - do we need it for the dashboards?
If not, we'll probably postpone it.

Comment 2 Vojtech Szocs 2016-03-11 17:34:27 UTC
(In reply to Oved Ourfali from comment #1)
> Vojtech - do we need it for the dashboards?

Unless we'd like Dashboard UI plugin to raise such (red/yellow/green/etc.) global alert boxes, we don't need it.

> If not, we'll probably postpone it.

Sounds good.

Comment 3 Vojtech Szocs 2016-03-11 18:07:42 UTC
On the other hand, implementing this is trivial, ETA 1 day max.

Question is, if we really need/want it.

Comment 4 Vojtech Szocs 2016-03-30 17:04:09 UTC
(In reply to vszocs from comment #3)
> Question is, if we really need/want it.

I think it's very useful for oVirt Dashboard - display error message when DWH is not properly configured, or when other kind of error occurs when fetching dashboard data.

Comment 5 Vojtech Szocs 2016-03-30 17:07:52 UTC
Created attachment 1141877 [details]
Alert test UI plugin

Attaching sample UI plugin to test the newly introduced `api.showAlert()` function.

Just extract files into $PREFIX/share/ovirt-engine/ui-plugins (where $PREFIX is usually /usr) and reload WebAdmin in your browser. Engine restart is not necessary.

Comment 6 Vojtech Szocs 2016-04-08 13:44:03 UTC
Change already landed in ovirt-engine master, I think we should flag this for 4.0 (currently flagged for 4.1).

Comment 7 Pavel Novotny 2016-06-21 16:01:58 UTC
Verified in build 4.0.0-18:
rhevm-4.0.0.6-0.1.el7ev.noarch
ovirt-engine-webadmin-portal-4.0.0.6-0.1.el7ev.noarch

For verification, I used Vojta's UI test plugin (thanks for it), which I extended to display all the alert types. Find the plugin attached.
All four alert types danger/warning/success/info are displayed, closing via 'X' button works, as well as the auto-hide option. Screenshot attached.

Comment 8 Pavel Novotny 2016-06-21 16:02:59 UTC
Created attachment 1170325 [details]
Alert test UI plugin - verification

Comment 9 Pavel Novotny 2016-06-21 16:03:45 UTC
Created attachment 1170326 [details]
screen: alerts via UI plugin

Comment 10 Sandro Bonazzola 2016-07-05 07:50:49 UTC
oVirt 4.0.0 has been released, closing current release.


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