Dashboard UI fix

For the user dashboard, have events 'view all' button go to the Events
list view, as Alerts can only be viewed by admins.

reviewed-by: jessica
This commit is contained in:
Brian Federle 2012-02-22 12:22:44 -08:00
parent 15ace5fe26
commit 1928bd503c
1 changed files with 4 additions and 2 deletions

View File

@ -144,13 +144,15 @@
if ($(this).hasClass('network')) $('#navigation li.network').click();
else {
$browser.cloudBrowser('addPanel', {
title: 'Alerts',
title: $dashboard.hasClass('admin') ? 'Alerts' : 'Events',
maximizeIfSelected: true,
complete: function($newPanel) {
$newPanel.listView({
$browser: $browser,
context: cloudStack.context,
listView: cloudStack.sections.events.sections.alerts.listView
listView: $dashboard.hasClass('admin') ?
cloudStack.sections.events.sections.alerts.listView :
cloudStack.sections.events.sections.events.listView // Users cannot see events
});
}
});