mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 00:04:04 +02:00
parent
d725b2feb7
commit
b9249dac4e
@ -424,11 +424,13 @@ class Monitoring_ListController extends Controller
|
|||||||
if ($url = $this->hasBetterUrl()) {
|
if ($url = $this->hasBetterUrl()) {
|
||||||
return $this->redirectNow($url);
|
return $this->redirectNow($url);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->addTitleTab(
|
$this->addTitleTab(
|
||||||
'contactgroups',
|
'contactgroups',
|
||||||
$this->translate('Contact Groups'),
|
$this->translate('Contact Groups'),
|
||||||
$this->translate('List contact groups')
|
$this->translate('List contact groups')
|
||||||
);
|
);
|
||||||
|
|
||||||
$query = $this->backend->select()->from('contactgroup', array(
|
$query = $this->backend->select()->from('contactgroup', array(
|
||||||
'contactgroup_name',
|
'contactgroup_name',
|
||||||
'contactgroup_alias',
|
'contactgroup_alias',
|
||||||
@ -436,7 +438,7 @@ class Monitoring_ListController extends Controller
|
|||||||
'contact_alias',
|
'contact_alias',
|
||||||
'contact_email',
|
'contact_email',
|
||||||
'contact_pager',
|
'contact_pager',
|
||||||
))->order('contactgroup_alias');
|
));
|
||||||
$this->filterQuery($query);
|
$this->filterQuery($query);
|
||||||
|
|
||||||
// Fetch and prepare all contact groups:
|
// Fetch and prepare all contact groups:
|
||||||
@ -453,6 +455,11 @@ class Monitoring_ListController extends Controller
|
|||||||
}
|
}
|
||||||
// TODO: Find a better naming
|
// TODO: Find a better naming
|
||||||
$this->view->groupData = $groupData;
|
$this->view->groupData = $groupData;
|
||||||
|
|
||||||
|
$this->setupSortControl(array(
|
||||||
|
'contactgroup_name' => $this->translate('Contactgroup Name'),
|
||||||
|
'contactgroup_alias' => $this->translate('Contactgroup Alias')
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function commentsAction()
|
public function commentsAction()
|
||||||
|
@ -1,17 +1,22 @@
|
|||||||
<?php if (!$this->compact): ?>
|
<?php if (! $this->compact): ?>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?= $this->tabs ?>
|
<?= $this->tabs; ?>
|
||||||
|
<?= $this->sortBox; ?>
|
||||||
|
<?= $this->limiter; ?>
|
||||||
|
<?= $this->paginator; ?>
|
||||||
|
<?= $this->filterEditor; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="boxview" data-base-target="_next">
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (count($groupData) === 0) {
|
|
||||||
echo mt('monitoring', 'No contacts matching the filter');
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($groupData as $groupName => $groupInfo): ?>
|
if (count($groupData) === 0) {
|
||||||
|
echo $this->translate('No contactgroups found matching the filter') . '</div>';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="boxview" data-base-target="_next">
|
||||||
|
<?php foreach ($groupData as $groupName => $groupInfo): ?>
|
||||||
<div class="box contactgroup">
|
<div class="box contactgroup">
|
||||||
<h2><?= $groupInfo['alias']; ?></h2>
|
<h2><?= $groupInfo['alias']; ?></h2>
|
||||||
<?php if ($groupInfo['alias'] !== $groupName): ?>
|
<?php if ($groupInfo['alias'] !== $groupName): ?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user