icingaweb2-module-businessp.../library/Businessprocess/MonitoredNode.php
Sukhwinder Dhillon 2f730cc526 Display node name if alias is missing
This fixes the issue that the name of a missing monitoring node is
not displayed in forms and in Tree/Tile view.
2023-07-24 14:31:17 +02:00

19 lines
452 B
PHP

<?php
namespace Icinga\Module\Businessprocess;
use ipl\Html\Html;
abstract class MonitoredNode extends Node
{
abstract public function getUrl();
public function getLink()
{
if ($this->isMissing()) {
return Html::tag('a', ['href' => '#'], $this->getAlias() ?? $this->getName());
} else {
return Html::tag('a', ['href' => $this->getUrl()], $this->getAlias() ?? $this->getName());
}
}
}