mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 16:24:04 +02:00
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\Web\Widget;
|
||||||
use Icinga\Module\Monitoring\Web\Widget\SelectBox;
|
use Icinga\Module\Monitoring\Web\Widget\SelectBox;
|
||||||
use Icinga\Module\Monitoring\Form\StatehistoryForm;
|
use Icinga\Module\Monitoring\Form\StatehistoryForm;
|
||||||
|
use Icinga\Module\Monitoring\Form\EventOverviewForm;
|
||||||
|
|
||||||
class Monitoring_ListController extends Controller
|
class Monitoring_ListController extends Controller
|
||||||
{
|
{
|
||||||
@ -392,7 +393,7 @@ class Monitoring_ListController extends Controller
|
|||||||
$form->render();
|
$form->render();
|
||||||
$this->view->form = $form;
|
$this->view->form = $form;
|
||||||
|
|
||||||
$orientation = $this->params->shift('horizontal', 0) ? 'horizontal' : 'vertical';
|
$orientation = $this->params->shift('vertical', 0) ? 'vertical' : 'horizontal';
|
||||||
|
|
||||||
$orientationBox = new SelectBox(
|
$orientationBox = new SelectBox(
|
||||||
'orientation',
|
'orientation',
|
||||||
|
@ -13,6 +13,15 @@ use Icinga\Data\Filter\Filter;
|
|||||||
*/
|
*/
|
||||||
class StatehistoryForm extends Form
|
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
|
* 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">
|
<div style="margin: 1em" class="dontprint">
|
||||||
<?= $this->translate('Sort by'); ?> <?= $this->sortControl->render($this); ?>
|
<?= $this->translate('Sort by'); ?> <?= $this->sortControl->render($this); ?>
|
||||||
</div>
|
</div>
|
||||||
|
<?= $form ?>
|
||||||
|
<br />
|
||||||
<?= $this->widget('limiter', array('url' => $this->url, 'max' => $this->history->count())); ?>
|
<?= $this->widget('limiter', array('url' => $this->url, 'max' => $this->history->count())); ?>
|
||||||
<?= $this->paginationControl($history, null, null, array('preserve' => $this->preserve)); ?>
|
<?= $this->paginationControl($history, null, null, array('preserve' => $this->preserve)); ?>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user