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.
This commit is contained in:
Brian Federle 2012-02-22 12:22:26 -08:00
parent db435eb324
commit a1a368f9a2

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
});
}
});