mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-09-22 09:27:39 +02:00
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\CoreApi;
|
||||||
use Icinga\Module\Director\Web\Controller\Extension\DirectorDb;
|
use Icinga\Module\Director\Web\Controller\Extension\DirectorDb;
|
||||||
use Icinga\Module\Director\Web\Controller\Extension\RestApi;
|
use Icinga\Module\Director\Web\Controller\Extension\RestApi;
|
||||||
|
use Icinga\Module\Director\Web\Window;
|
||||||
use Icinga\Security\SecurityException;
|
use Icinga\Security\SecurityException;
|
||||||
use Icinga\Web\Controller;
|
use Icinga\Web\Controller;
|
||||||
use Icinga\Web\UrlParams;
|
use Icinga\Web\UrlParams;
|
||||||
@ -67,6 +68,21 @@ abstract class ActionController extends Controller implements ControlsAndContent
|
|||||||
return $this->Auth();
|
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
|
* @throws SecurityException
|
||||||
*/
|
*/
|
||||||
|
@ -4,6 +4,7 @@ namespace Icinga\Module\Director\Web\Controller\Extension;
|
|||||||
|
|
||||||
use Icinga\Module\Director\Db;
|
use Icinga\Module\Director\Db;
|
||||||
use Icinga\Module\Director\Web\Controller\ActionController;
|
use Icinga\Module\Director\Web\Controller\ActionController;
|
||||||
|
use Icinga\Module\Director\Web\Window;
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
|
|
||||||
trait DirectorDb
|
trait DirectorDb
|
||||||
@ -125,7 +126,7 @@ trait DirectorDb
|
|||||||
|
|
||||||
protected function getWindowSessionValue($value, $default = null)
|
protected function getWindowSessionValue($value, $default = null)
|
||||||
{
|
{
|
||||||
/** @var \Icinga\Web\Window $window */
|
/** @var Window $window */
|
||||||
$window = $this->Window();
|
$window = $this->Window();
|
||||||
/** @var \Icinga\Web\Session\SessionNamespace $session */
|
/** @var \Icinga\Web\Session\SessionNamespace $session */
|
||||||
$session = $window->getSessionNamespace('director');
|
$session = $window->getSessionNamespace('director');
|
||||||
|
@ -12,7 +12,7 @@ use Icinga\Module\Director\Db\Migrations;
|
|||||||
use Icinga\Module\Director\KickstartHelper;
|
use Icinga\Module\Director\KickstartHelper;
|
||||||
use Icinga\Module\Director\Web\Controller\Extension\DirectorDb;
|
use Icinga\Module\Director\Web\Controller\Extension\DirectorDb;
|
||||||
use Icinga\Web\Navigation\Renderer\BadgeNavigationItemRenderer;
|
use Icinga\Web\Navigation\Renderer\BadgeNavigationItemRenderer;
|
||||||
use Icinga\Web\Window;
|
use Icinga\Module\Director\Web\Window;
|
||||||
|
|
||||||
class ConfigHealthItemRenderer extends BadgeNavigationItemRenderer
|
class ConfigHealthItemRenderer extends BadgeNavigationItemRenderer
|
||||||
{
|
{
|
||||||
|
13
library/Director/Web/Window.php
Normal file
13
library/Director/Web/Window.php
Normal file
@ -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…
x
Reference in New Issue
Block a user