Add MessageOfTheDay extension point for plugins

Allow plugins to contribute messages to the UI during initial page
load. Gerrit displays the messages in a butter bar at the top of
the page and allows users to hide them with the "Dismiss" button.

Messages are hidden per-browser using a cookie named after the
message id, set to expire at a date supplied by the server. After
this date the same message could redisplay if the server sends the
same message again.

Change-Id: I0bcca845f501cbeb8c31356fff398c3adb43099a
This commit is contained in:
Shawn Pearce
2014-01-02 08:01:52 -08:00
parent 17bb675699
commit dfbe6d6ead
7 changed files with 268 additions and 0 deletions

View File

@@ -565,6 +565,9 @@ public class Gerrit implements EntryPoint {
}
saveDefaultTheme();
if (hpd.messages != null) {
new MessageOfTheDayBar(hpd.messages).show();
}
PluginLoader.load(hpd.plugins, token);
}