monitoring: Fix navigation usage in the state badges widget

refs #5543
This commit is contained in:
Eric Lippmann 2015-09-27 13:32:47 +02:00
parent 901a5b6d34
commit 73242da6bc
1 changed files with 3 additions and 3 deletions

View File

@ -75,11 +75,11 @@ class StateBadges extends AbstractWidget
{
if ($this->has($state)) {
$badge = $this->get($state);
$badges->addItem(array(
$badges->addItem(new NavigationItem($state, array(
'attributes' => array('class' => 'badge ' . $state),
'label' => $badge->count,
'url' => $this->url
));
)));
}
return $this;
}
@ -88,7 +88,7 @@ class StateBadges extends AbstractWidget
{
$group = array_intersect_key($this->badges, array_flip($states));
if (! empty($group)) {
$groupItem = new NavigationItem();
$groupItem = new NavigationItem(uniqid(), array('name' => ''));
$groupBadges = new Navigation();
$groupBadges->setLayout(Navigation::LAYOUT_TABS);
foreach (array_keys($group) as $state) {