parent
0d75ad69d6
commit
54ec11aec2
|
@ -10,6 +10,7 @@ use Icinga\Module\Director\Monitoring;
|
|||
use Icinga\Module\Director\Web\Controller\Extension\CoreApi;
|
||||
use Icinga\Module\Director\Web\Controller\Extension\DirectorDb;
|
||||
use Icinga\Module\Director\Web\Controller\Extension\RestApi;
|
||||
use Icinga\Module\Director\Web\Window;
|
||||
use Icinga\Security\SecurityException;
|
||||
use Icinga\Web\Controller;
|
||||
use Icinga\Web\UrlParams;
|
||||
|
@ -67,6 +68,21 @@ abstract class ActionController extends Controller implements ControlsAndContent
|
|||
return $this->Auth();
|
||||
}
|
||||
|
||||
/**
|
||||
* @codingStandardsIgnoreStart
|
||||
* @return Window
|
||||
*/
|
||||
public function Window()
|
||||
{
|
||||
// @codingStandardsIgnoreEnd
|
||||
if ($this->window === null) {
|
||||
$this->window = new Window(
|
||||
$this->_request->getHeader('X-Icinga-WindowId', Window::UNDEFINED)
|
||||
);
|
||||
}
|
||||
return $this->window;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws SecurityException
|
||||
*/
|
||||
|
|
|
@ -4,6 +4,7 @@ namespace Icinga\Module\Director\Web\Controller\Extension;
|
|||
|
||||
use Icinga\Module\Director\Db;
|
||||
use Icinga\Module\Director\Web\Controller\ActionController;
|
||||
use Icinga\Module\Director\Web\Window;
|
||||
use RuntimeException;
|
||||
|
||||
trait DirectorDb
|
||||
|
@ -125,7 +126,7 @@ trait DirectorDb
|
|||
|
||||
protected function getWindowSessionValue($value, $default = null)
|
||||
{
|
||||
/** @var \Icinga\Web\Window $window */
|
||||
/** @var Window $window */
|
||||
$window = $this->Window();
|
||||
/** @var \Icinga\Web\Session\SessionNamespace $session */
|
||||
$session = $window->getSessionNamespace('director');
|
||||
|
|
|
@ -12,7 +12,7 @@ use Icinga\Module\Director\Db\Migrations;
|
|||
use Icinga\Module\Director\KickstartHelper;
|
||||
use Icinga\Module\Director\Web\Controller\Extension\DirectorDb;
|
||||
use Icinga\Web\Navigation\Renderer\BadgeNavigationItemRenderer;
|
||||
use Icinga\Web\Window;
|
||||
use Icinga\Module\Director\Web\Window;
|
||||
|
||||
class ConfigHealthItemRenderer extends BadgeNavigationItemRenderer
|
||||
{
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace Icinga\Module\Director\Web;
|
||||
|
||||
use Icinga\Web\Window as WebWindow;
|
||||
|
||||
class Window extends WebWindow
|
||||
{
|
||||
public function __construct($id)
|
||||
{
|
||||
parent::__construct(\preg_replace('/_.+$/', '', $id));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue