mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-02-02 16:39:25 -05:00
parent
3a0b40a91f
commit
e9a551e581
3 changed files with 13 additions and 2 deletions
|
|
@ -101,7 +101,7 @@ class SuggestionsController extends Controller
|
|||
) {
|
||||
yield [
|
||||
'search' => $search,
|
||||
'label' => $bpNode->getAlias() ?? $bpNode->getName(),
|
||||
'label' => $bpNode->getLabel(),
|
||||
'config' => $config
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ class AddNodeForm extends CompatForm
|
|||
if (! $bp->hasNode($nodeName)) {
|
||||
$term->setMessage($this->translate('No node with this name found in config'));
|
||||
} else {
|
||||
$term->setLabel($bp->getNode($nodeName)->getAlias());
|
||||
$term->setLabel($bp->getNode($nodeName)->getLabel());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -367,6 +367,17 @@ abstract class Node
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the label of the node
|
||||
*
|
||||
* @return ?string
|
||||
*/
|
||||
public function getLabel()
|
||||
{
|
||||
return ($this->alias ?? $this->name)
|
||||
. ' (' . implode(' » ', $this->getPaths()[0]) . ')';
|
||||
}
|
||||
|
||||
public function hasParents()
|
||||
{
|
||||
return count($this->parents) > 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue