Fix layout of multi-detail view

This commit is contained in:
Matthias Jentsch 2013-10-23 12:58:15 +02:00
parent f228e03c3a
commit f5e4831bef
7 changed files with 132 additions and 112 deletions

View File

@ -16,9 +16,12 @@
</div>
<div class="row">
<div class="col-md-12">
<?= $this->paginationControl($hostgroups, null, null, array('preserve' => $this->preserve)); ?>
</div>
</div>
<br />
<div class="row">
<?= $this->selectionToolbar('single'); ?>
</div>

View File

@ -16,9 +16,12 @@
</div>
<div class="row">
<?= $this->paginationControl($servicegroups, null, null, array('preserve' => $this->preserve)); ?>
<div class="col-md-12">
<?= $this->paginationControl($servicegroups, null, null, array('preserve' => $this->preserve)); ?>
</div>
</div>
<br />
<div class="row">
<?= $this->selectionToolbar('single'); ?>
</div>

View File

@ -1,6 +1,26 @@
<div>
<div class="panel-heading">
<span> <b> Comments </b> </span>
<div class="pull-right">
<a rel="tooltip" title="Create new comments for all selected hosts or services" href="<?=
$this->href(
'monitoring/command/addcomment',
$this->target
);
?>" class="btn-common btn-small button">
<i class="icinga-icon-comment"></i>
</a>
<a rel="tooltip" title="Send custom notifications for all selected hosts or services" href="<?=
$this->href(
'monitoring/command/sendcustomnotification',
$this->target
);
?>" class="btn-common btn-small button">
<i class="icinga-icon-notification"></i>
</a>
</div>
</div>
<hr class="separator">
<div class="panel-body">
@ -15,7 +35,7 @@
)
);
?>">
<?= count($comments);?> comments in the selected items.
There are <?= count($comments);?> comments assigned to the selected items.
</a>
<a href="<?=
$this->href(
@ -26,39 +46,16 @@
<i class="icinga-icon-remove"></i>
</a>
<?php } else { ?>
0 comments in the selected items.
There are 0 comments assigned to the selected items.
<?php } ?>
</div>
<div class="panel-row">
<a href="<?=
$this->href(
'monitoring/command/sendcustomnotification',
$this->target
);
?>" class="button btn-cta btn-common btn-wide">
Add Comments
</a>
</div>
<div class="panel-row">
<a href="<?=
$this->href(
'monitoring/command/sendcustomnotification',
$this->target
);
?>" class="button btn-cta btn-common btn-half-left">
Send Notifications
</a>
<a href="<?=
<a rel="tooltip" title="Delay the noficiations on all selected hosts or services" href="<?=
$this->href(
'monitoring/command/delaynotification',
$this->target
);
?>" class="button btn-cta btn-common btn-half-right">
?>" class="button btn-cta btn-common btn-half-wide">
Delay Notifications
</a>
</div>
</div>
</div>

View File

@ -1,6 +1,16 @@
<div>
<div class="panel-heading">
<b>Downtimes</b>
<b>Downtimes</b>
<a rel="tooltip" title="Schedule downtimes for all selected hosts or services" href="<?=
$this->href(
'monitoring/command/scheduledowntime',
$this->target
);
?>" class="button btn-common btn-small input-sm pull-right">
<i class="icinga-icon-in-downtime"></i>
</a>
</div>
<hr class="separator" >
<div class="panel-body">
@ -26,7 +36,8 @@
0 Selected items are currently in downtime.
<?php } ?>
</div>
<a href="<?=
<a rel="tooltip" title="Remove all acknowledgements from all selected hosts or services" href="<?=
$this->href(
'monitoring/command/removedowntime',
$target

View File

@ -3,8 +3,54 @@
$cf = $this->getHelper('CommandForm');
$servicequery = isset($this->servicequery) ? $this->servicequery : '';
?>
Selected <?= count($objects) ?> objects.
<div class="container">
<ul class="list-inline">
<?php
for ($i = 0; $i < count($objects) && $i < 10; $i++) {
$object = $objects[$i];
?>
<li>
<a href="<?php
if ($this->is_service) {
echo $this->href(
'monitoring/show/service',
array(
'host' => $object->host_name,
'service' => $object->service_description
)
);
} else {
echo $this->href(
'monitoring/show/host', array('host' => $object->host_name)
);
}?>" >
<?= $object->host_name; ?>
<?= isset($object->service_description) ? $object->service_description : '' ?>
</a>
</li>
<?php } ?>
</ul>
<?php
if (count($objects) > 10) {
$text = ' and ' . (count($objects) - 10) . ' more ...';
} else {
$text = ' show all ...';
}
if ($this->is_service) {
$link = 'monitoring/list/hosts';
$target = array(
'host' => implode(',', $hostnames)
);
} else {
$link = 'monitoring/list/services';
// TODO: Show multiple targets for services
$target = array();
}
?>
<a class="pull-right" href="<?= $this->href($link, $target); ?>"> <?= $text ?></a>
</div>
<br />
<div class="panel-row">
<a href="<?=
$this->href(
@ -24,84 +70,24 @@ $this->href(
</a>
</div>
<div class="panel-row">
The selected objects have <?= $this->problems ?> service problems. <br />
<a href="<?=
$this->href(
'monitoring/command/acknowledgeproblem',
$this->target
);
?>" class="button btn-cta btn-half-left">
Acknowledge
</a>
<a href="<?=
$this->href(
'monitoring/command/scheduledowntimes',
$this->target
);
?>" class="button btn-cta btn-half-right">
Schedule Downtimes
</a>
</div>
<div class="panel-row">
<a href="<?=
$this->href(
'monitoring/command/submitpassivecheckresult',
$this->target
);
?>" class="button btn-cta btn-common btn-wide">
Submit Passive Checkresults
</a>
</div>
<div>
<ul class="list-inline">
<?php
for ($i = 0; $i < count($objects) && $i < 10; $i++) {
$object = $objects[$i];
?>
<li>
<a href="<?php
if ($this->is_service) {
echo $this->href(
'monitoring/show/service',
array(
'host' => $object->host_name,
'service' => $object->service_description
)
);
} else {
echo $this->href(
'monitoring/show/host', array('host' => $object->host_name)
);
}?>" >
<?= $object->host_name; ?>
<?= isset($object->service_description) ? $object->service_description : '' ?>
</a>
</li>
<?php } ?>
</ul>
<?php
if (count($objects) > 10) {
$text = ' and ' . (count($objects) - 10) . ' more ...';
} else {
$text = ' show all ...';
}
if ($this->is_service) {
$link = 'monitoring/list/hosts';
$target = array(
'host' => implode(',', $hostnames)
);
} else {
$link = 'monitoring/list/services';
// TODO: Show multiple targets for services
$target = array();
}
?>
<a class="pull-right" href="<?= $this->href($link, $target); ?>"> <?= $text ?></a>
The selected objects have <span class="badge"> <?= $this->problems ?> </span> service problems. <br /><br />
<a rel="tooltip" title="Acknowledge all problems on the selected hosts or services" href="<?=
$this->href(
'monitoring/command/acknowledgeproblem',
$this->target
);
?>" class="button btn-cta btn-half-left">
Acknowledge Problems
</a>
<a rel="tooltip" title="Schedule downtimes for all selected hosts" href="<?=
$this->href(
'monitoring/command/scheduledowntimes',
$this->target
);
?>" class="button btn-cta btn-half-right">
Schedule Downtimes
</a>
</div>

View File

@ -9,7 +9,17 @@ $this->target = array(
<?= $this->tabs->render($this); ?>
<div>
<div class="panel panel-heading">
<b> Hosts </b>
<b> Hosts </b> (<?= count($objects) ?> objects)
<div class="pull-right">
<a rel="tooltip" title="Submit passive checkresults" href="<?=
$this->href(
'monitoring/command/submitpassivecheckresult',
$this->target
);
?>" class="button btn-cta btn-common btn-small">
<i class="icinga-icon-submit"></i>
</a>
</div>
</div>
<hr class="separator" />

View File

@ -12,7 +12,17 @@ $this->target = array(
<div>
<div class="panel-heading">
<b> Services </b>
<b> Services </b> (<?= count($objects) ?> objects )
<div class="pull-right">
<a rel="tooltip" title="Submit passive checkresults" href="<?=
$this->href(
'monitoring/command/submitpassivecheckresult',
$this->target
);
?>" class="button btn-cta btn-common btn-small">
<i class="icinga-icon-submit"></i>
</a>
</div>
</div>
<hr class="separator" />