Bug 1285432 - [RFE] Expose global alert messages via UI plugin API
[RFE] Expose global alert messages via UI plugin API
Product: ovirt-engine
Classification: oVirt
Component: Frontend.WebAdmin (Show other bugs)
Unspecified Unspecified
medium Severity medium (vote)
: ovirt-4.0.0-beta
: 4.0.0
Assigned To: vszocs
Pavel Novotny
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2015-11-25 10:07 EST by vszocs
Modified: 2016-07-14 21:44 EDT (History)
7 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Last Closed: 2016-07-05 03:50:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: UX
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
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 13:07 EDT, vszocs
no flags Details
Alert test UI plugin - verification (523 bytes, application/x-gzip)
2016-06-21 12:02 EDT, Pavel Novotny
no flags Details
screen: alerts via UI plugin (61.35 KB, image/png)
2016-06-21 12:03 EDT, Pavel Novotny
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 55504 master MERGED webadmin: UI plugin API - showAlert 2016-04-06 10:53 EDT

  None (edit)
Description vszocs 2015-11-25 10:07:00 EST
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

  'Warning' alert

  'Success' alert

  'Info' alert

It would be nice to expose this capability to UI plugins as well.
Comment 1 Oved Ourfali 2016-03-03 02:23:05 EST
Vojtech - do we need it for the dashboards?
If not, we'll probably postpone it.
Comment 2 vszocs 2016-03-11 12:34:27 EST
(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 vszocs 2016-03-11 13:07:42 EST
On the other hand, implementing this is trivial, ETA 1 day max.

Question is, if we really need/want it.
Comment 4 vszocs 2016-03-30 13:04:09 EDT
(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 vszocs 2016-03-30 13:07 EDT
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 vszocs 2016-04-08 09:44:03 EDT
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 12:01:58 EDT
Verified in build 4.0.0-18:

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 12:02 EDT
Created attachment 1170325 [details]
Alert test UI plugin - verification
Comment 9 Pavel Novotny 2016-06-21 12:03 EDT
Created attachment 1170326 [details]
screen: alerts via UI plugin
Comment 10 Sandro Bonazzola 2016-07-05 03:50:49 EDT
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.