2014-03-06 10:19:48 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Icinga\Web\Url;
|
2014-03-08 00:15:51 +01:00
|
|
|
use Icinga\Web\Notification;
|
2015-07-28 17:08:55 +02:00
|
|
|
use Icinga\Authentication\Auth;
|
2021-06-16 14:41:31 +02:00
|
|
|
use ipl\Html\HtmlString;
|
|
|
|
use ipl\Web\Widget\Icon;
|
2014-03-06 10:19:48 +01:00
|
|
|
|
2015-08-12 16:47:31 +02:00
|
|
|
$moduleName = $this->layout()->moduleName;
|
2015-08-19 13:39:37 +02:00
|
|
|
if ($moduleName !== 'default') {
|
2015-08-12 16:47:31 +02:00
|
|
|
$moduleClass = ' icinga-module module-' . $moduleName;
|
|
|
|
} else {
|
|
|
|
$moduleClass = '';
|
|
|
|
}
|
2014-03-17 17:11:56 +01:00
|
|
|
|
2015-08-12 16:47:31 +02:00
|
|
|
$refresh = '';
|
|
|
|
if ($this->layout()->autorefreshInterval) {
|
|
|
|
$refresh = ' data-icinga-refresh="' . $this->layout()->autorefreshInterval . '"';
|
|
|
|
}
|
2014-06-21 01:54:32 +02:00
|
|
|
|
2017-11-21 13:30:58 +01:00
|
|
|
if ($this->layout()->inlineLayout) {
|
|
|
|
$inlineLayoutScript = $this->layout()->inlineLayout . '.phtml';
|
|
|
|
} else {
|
|
|
|
$inlineLayoutScript = 'inline.phtml';
|
|
|
|
}
|
2017-06-28 11:14:01 +02:00
|
|
|
|
2015-05-29 14:17:12 +02:00
|
|
|
?>
|
2019-12-06 10:31:00 +01:00
|
|
|
<div id="header">
|
|
|
|
<div id="announcements" class="container">
|
|
|
|
<?= $this->widget('announcements') ?>
|
|
|
|
</div>
|
2015-08-12 16:47:31 +02:00
|
|
|
</div>
|
2019-07-03 15:49:12 +02:00
|
|
|
<div id="content-wrapper">
|
2019-12-06 15:32:07 +01:00
|
|
|
<?php if (! $this->layout()->isIframe): ?>
|
2019-07-03 15:49:12 +02:00
|
|
|
<div id="sidebar">
|
2019-12-06 10:31:00 +01:00
|
|
|
<div id="header-logo-container">
|
|
|
|
<?= $this->qlink(
|
|
|
|
'',
|
|
|
|
Auth::getInstance()->isAuthenticated() ? 'dashboard' : '',
|
|
|
|
null,
|
|
|
|
array(
|
|
|
|
'aria-hidden' => 'true',
|
|
|
|
'data-base-target' => '_main',
|
|
|
|
'id' => 'header-logo'
|
|
|
|
)
|
|
|
|
); ?>
|
2019-12-06 13:22:58 +01:00
|
|
|
<div id="mobile-menu-toggle">
|
|
|
|
<button type="button"><?= $this->icon('menu') ?><?= $this->icon('cancel') ?></button>
|
|
|
|
</div>
|
2019-07-03 15:49:12 +02:00
|
|
|
</div>
|
2019-12-06 13:22:58 +01:00
|
|
|
<?= $this->render('parts/navigation.phtml'); ?>
|
2019-07-03 15:49:12 +02:00
|
|
|
</div>
|
2019-12-06 15:32:07 +01:00
|
|
|
<?php endif ?>
|
2019-07-03 16:57:11 +02:00
|
|
|
<div id="main" role="main">
|
2019-12-06 15:32:07 +01:00
|
|
|
<div id="col1"
|
|
|
|
class="container<?= $moduleClass ?>"
|
|
|
|
<?php if ($moduleName): ?>
|
|
|
|
data-icinga-module="<?= $moduleName ?>"
|
|
|
|
<?php endif ?>
|
|
|
|
data-icinga-url="<?= $this->escape(Url::fromRequest()->without('renderLayout')->getAbsoluteUrl()); ?>"
|
|
|
|
<?= $refresh; ?>
|
|
|
|
>
|
|
|
|
<?= $this->render($inlineLayoutScript) ?>
|
2019-07-03 16:57:11 +02:00
|
|
|
</div>
|
|
|
|
<div id="col2" class="container"></div>
|
|
|
|
<div id="col3" class="container"></div>
|
|
|
|
</div>
|
2015-08-12 16:47:31 +02:00
|
|
|
</div>
|
|
|
|
<div id="footer">
|
2016-01-22 13:35:51 +01:00
|
|
|
<ul role="alert" id="notifications"><?php
|
2015-08-12 16:47:31 +02:00
|
|
|
|
|
|
|
$notifications = Notification::getInstance();
|
|
|
|
if ($notifications->hasMessages()) {
|
|
|
|
foreach ($notifications->popMessages() as $m) {
|
2021-06-16 14:41:31 +02:00
|
|
|
switch ($m->type) {
|
|
|
|
case 'success':
|
|
|
|
$icon = new HtmlString(new Icon('check-circle'));
|
|
|
|
break;
|
|
|
|
case 'error':
|
|
|
|
$icon = new HtmlString(new Icon('times'));
|
|
|
|
break;
|
|
|
|
case 'warning':
|
|
|
|
$icon = new HtmlString(new Icon('exclamation-triangle'));
|
|
|
|
break;
|
|
|
|
case 'info':
|
|
|
|
$icon = new HtmlString(new Icon('info-circle'));
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
$icon = '';
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
echo '<li class="' . $m->type . '">' . $icon . $this->escape($m->message) . '</li>';
|
2015-08-12 16:47:31 +02:00
|
|
|
}
|
2015-05-29 14:17:12 +02:00
|
|
|
}
|
2015-08-12 16:47:31 +02:00
|
|
|
?></ul>
|
2018-07-09 15:33:20 +02:00
|
|
|
<div id="application-state-summary" class="container" data-icinga-url="<?= $this->url('application-state/summary') ?>" data-last-update="-1" data-icinga-refresh="60"></div>
|
2015-10-01 17:11:54 +02:00
|
|
|
</div>
|