Fix event grid layout and forms
Make event grid horizontal, user build in form apply button, add linebreak between filter and grid
This commit is contained in:
parent
022d89254f
commit
0db5167a35
|
@ -18,6 +18,7 @@ use Icinga\Data\Filter\Filter;
|
|||
use Icinga\Web\Widget;
|
||||
use Icinga\Module\Monitoring\Web\Widget\SelectBox;
|
||||
use Icinga\Module\Monitoring\Form\StatehistoryForm;
|
||||
use Icinga\Module\Monitoring\Form\EventOverviewForm;
|
||||
|
||||
class Monitoring_ListController extends Controller
|
||||
{
|
||||
|
@ -392,7 +393,7 @@ class Monitoring_ListController extends Controller
|
|||
$form->render();
|
||||
$this->view->form = $form;
|
||||
|
||||
$orientation = $this->params->shift('horizontal', 0) ? 'horizontal' : 'vertical';
|
||||
$orientation = $this->params->shift('vertical', 0) ? 'vertical' : 'horizontal';
|
||||
|
||||
$orientationBox = new SelectBox(
|
||||
'orientation',
|
||||
|
|
|
@ -13,6 +13,15 @@ use Icinga\Data\Filter\Filter;
|
|||
*/
|
||||
class StatehistoryForm extends Form
|
||||
{
|
||||
/**
|
||||
* Initialize this form
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
$this->setName('form_event_overview');
|
||||
$this->setSubmitLabel(mt('monitoring', 'Apply'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the corresponding filter-object
|
||||
*
|
||||
|
@ -135,16 +144,5 @@ class StatehistoryForm extends Form
|
|||
)
|
||||
);
|
||||
}
|
||||
$this->addElement(
|
||||
'button',
|
||||
'btn_submit',
|
||||
array(
|
||||
'type' => 'submit',
|
||||
'escape' => false,
|
||||
'value' => '1',
|
||||
'class' => 'btn btn-cta btn-common',
|
||||
'label' => mt('monitoring', 'Apply')
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
<div style="margin: 1em" class="dontprint">
|
||||
<?= $this->translate('Sort by'); ?> <?= $this->sortControl->render($this); ?>
|
||||
</div>
|
||||
<?= $form ?>
|
||||
<br />
|
||||
<?= $this->widget('limiter', array('url' => $this->url, 'max' => $this->history->count())); ?>
|
||||
<?= $this->paginationControl($history, null, null, array('preserve' => $this->preserve)); ?>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue