Skip to content

Commit

Permalink
fix/indistinguishable-suggestions-introduce-lable-427
Browse files Browse the repository at this point in the history
  • Loading branch information
moreamazingnick committed Jan 26, 2024
1 parent b5e8d1d commit e7df347
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 1 addition & 2 deletions application/controllers/SuggestionsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ public function processAction()
) {
yield [
'search' => $search,
'label' => ($bpNode->getAlias() ?? $bpNode->getName())
. " (" . implode("->", $bpNode->getPaths()[0]) . ")",
'label' => $bpNode->getLabel(),
'config' => $config
];
}
Expand Down
2 changes: 1 addition & 1 deletion application/forms/AddNodeForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ protected function assembleExistingProcessElements(): void
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());

Check failure on line 239 in application/forms/AddNodeForm.php

View workflow job for this annotation

GitHub Actions / Static analysis for php 7.2 on ubuntu-latest

Call to an undefined method Icinga\Module\Businessprocess\BpNode|Icinga\Module\Businessprocess\MonitoredNode::getLabel().

Check failure on line 239 in application/forms/AddNodeForm.php

View workflow job for this annotation

GitHub Actions / Static analysis for php 7.3 on ubuntu-latest

Call to an undefined method Icinga\Module\Businessprocess\BpNode|Icinga\Module\Businessprocess\MonitoredNode::getLabel().

Check failure on line 239 in application/forms/AddNodeForm.php

View workflow job for this annotation

GitHub Actions / Static analysis for php 7.4 on ubuntu-latest

Call to an undefined method Icinga\Module\Businessprocess\BpNode|Icinga\Module\Businessprocess\MonitoredNode::getLabel().

Check failure on line 239 in application/forms/AddNodeForm.php

View workflow job for this annotation

GitHub Actions / Static analysis for php 8.0 on ubuntu-latest

Call to an undefined method Icinga\Module\Businessprocess\BpNode|Icinga\Module\Businessprocess\MonitoredNode::getLabel().

Check failure on line 239 in application/forms/AddNodeForm.php

View workflow job for this annotation

GitHub Actions / Static analysis for php 8.1 on ubuntu-latest

Call to an undefined method Icinga\Module\Businessprocess\BpNode|Icinga\Module\Businessprocess\MonitoredNode::getLabel().

Check failure on line 239 in application/forms/AddNodeForm.php

View workflow job for this annotation

GitHub Actions / Static analysis for php 8.2 on ubuntu-latest

Call to an undefined method Icinga\Module\Businessprocess\BpNode|Icinga\Module\Businessprocess\MonitoredNode::getLabel().
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions library/Businessprocess/BpNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,12 @@ public function getAlias()
return $this->alias ? preg_replace('~_~', ' ', $this->alias) : $this->name;
}

public function getLabel()

Check failure on line 373 in library/Businessprocess/BpNode.php

View workflow job for this annotation

GitHub Actions / Static analysis for php 7.2 on ubuntu-latest

Method Icinga\Module\Businessprocess\BpNode::getLabel() has no return type specified.

Check failure on line 373 in library/Businessprocess/BpNode.php

View workflow job for this annotation

GitHub Actions / Static analysis for php 7.3 on ubuntu-latest

Method Icinga\Module\Businessprocess\BpNode::getLabel() has no return type specified.

Check failure on line 373 in library/Businessprocess/BpNode.php

View workflow job for this annotation

GitHub Actions / Static analysis for php 7.4 on ubuntu-latest

Method Icinga\Module\Businessprocess\BpNode::getLabel() has no return type specified.

Check failure on line 373 in library/Businessprocess/BpNode.php

View workflow job for this annotation

GitHub Actions / Static analysis for php 8.0 on ubuntu-latest

Method Icinga\Module\Businessprocess\BpNode::getLabel() has no return type specified.

Check failure on line 373 in library/Businessprocess/BpNode.php

View workflow job for this annotation

GitHub Actions / Static analysis for php 8.1 on ubuntu-latest

Method Icinga\Module\Businessprocess\BpNode::getLabel() has no return type specified.

Check failure on line 373 in library/Businessprocess/BpNode.php

View workflow job for this annotation

GitHub Actions / Static analysis for php 8.2 on ubuntu-latest

Method Icinga\Module\Businessprocess\BpNode::getLabel() has no return type specified.
{
return ($this->alias ?? $this->name)
. ' (' . implode(' » ', $this->getPaths()[0]) . ')';
}

/**
* @return int
*/
Expand Down

0 comments on commit e7df347

Please sign in to comment.