mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-02-11 15:03:06 -05:00
TileRenderer: improve behavior, link targets
This commit is contained in:
parent
c1802a8f59
commit
ac7fa5654f
2 changed files with 16 additions and 9 deletions
|
|
@ -3,7 +3,6 @@
|
|||
namespace Icinga\Module\Businessprocess\Renderer;
|
||||
|
||||
use Icinga\Module\Businessprocess\Html\Container;
|
||||
use Icinga\Module\Businessprocess\Html\Element;
|
||||
use Icinga\Module\Businessprocess\Html\Icon;
|
||||
use Icinga\Module\Businessprocess\Html\Link;
|
||||
use Icinga\Module\Businessprocess\Renderer\TileRenderer\NodeTile;
|
||||
|
|
@ -22,7 +21,7 @@ class TileRenderer extends Renderer
|
|||
'tiles',
|
||||
$this->howMany()
|
||||
),
|
||||
'data-base-target' => '_main',
|
||||
'data-base-target' => '_self',
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -172,12 +172,16 @@ class NodeTile extends BaseElement
|
|||
if ($node instanceof ServiceNode) {
|
||||
$link = Link::create(
|
||||
$node->getAlias(),
|
||||
$url
|
||||
$url,
|
||||
null,
|
||||
array('data-base-target' => '_next')
|
||||
);
|
||||
} elseif ($node instanceof HostNode) {
|
||||
$link = Link::create(
|
||||
$node->getHostname(),
|
||||
$url
|
||||
$url,
|
||||
null,
|
||||
array('data-base-target' => '_next')
|
||||
);
|
||||
} else {
|
||||
$link = Link::create($node->getAlias(), $url);
|
||||
|
|
@ -196,21 +200,25 @@ class NodeTile extends BaseElement
|
|||
Icon::create('dashboard'),
|
||||
$url->with('mode', 'tile'),
|
||||
null,
|
||||
array('title' => $this->translate('Show tiles for this subtree'))
|
||||
array(
|
||||
'title' => $this->translate('Show tiles for this subtree'),
|
||||
'data-base-target' => '_next'
|
||||
)
|
||||
))->add(Link::create(
|
||||
Icon::create('sitemap'),
|
||||
$url->with('mode', 'tree'),
|
||||
null,
|
||||
array(
|
||||
'title' => $this->translate('Show this subtree as a tree'),
|
||||
'data-base-target' => '_next'
|
||||
)
|
||||
));
|
||||
} else {
|
||||
$url = $this->makeMonitoredNodeUrl($node);
|
||||
// $url = $this->makeMonitoredNodeUrl($node);
|
||||
if ($node instanceof ServiceNode) {
|
||||
$this->actions()->add(Link::create(
|
||||
Icon::create('service'),
|
||||
$url,
|
||||
$node->getUrl(),
|
||||
null,
|
||||
array('data-base-target' => '_next')
|
||||
));
|
||||
|
|
@ -218,7 +226,7 @@ class NodeTile extends BaseElement
|
|||
} elseif ($node instanceof HostNode) {
|
||||
$this->actions()->add(Link::create(
|
||||
Icon::create('host'),
|
||||
$url,
|
||||
$node->getUrl(),
|
||||
null,
|
||||
array('data-base-target' => '_next')
|
||||
));
|
||||
|
|
@ -242,7 +250,7 @@ class NodeTile extends BaseElement
|
|||
} else {
|
||||
$this->actions()->add(Link::create(
|
||||
Icon::create('magic'),
|
||||
$renderer->getUrl()->with('action', 'simulate')->with('simulationnode', $this->name),
|
||||
$renderer->getUrl()->with('action', 'simulation')->with('simulationnode', $this->name),
|
||||
null,
|
||||
array('title' => $this->translate('Show the business impact of this node by simulating a specific state'))
|
||||
));
|
||||
|
|
|
|||
Loading…
Reference in a new issue