mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
IcingaObjectInspection: Show flat commands run by the core
This commit is contained in:
parent
a6e32d763f
commit
2be27ddf3d
@ -57,18 +57,21 @@ class IcingaObjectInspection extends BaseHtmlElement
|
||||
{
|
||||
$this->add(Html::tag('h2', null, $this->translate('Last Check Result')));
|
||||
$this->renderCheckResultDetails($result);
|
||||
if (property_exists($result, 'command') && is_array($result->command)) {
|
||||
if (property_exists($result, 'command')) {
|
||||
$this->renderExecutedCommand($result->command);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $command
|
||||
* @param array|string $command
|
||||
*
|
||||
* @throws \Icinga\Exception\IcingaException
|
||||
*/
|
||||
protected function renderExecutedCommand(array $command)
|
||||
protected function renderExecutedCommand($command)
|
||||
{
|
||||
$command = implode(' ', array_map('escapeshellarg', $command));
|
||||
if (is_array($command)) {
|
||||
$command = implode(' ', array_map('escapeshellarg', $command));
|
||||
}
|
||||
$this->add([
|
||||
Html::tag('h3', null, 'Executed Command'),
|
||||
$this->formatConsole($command)
|
||||
|
Loading…
x
Reference in New Issue
Block a user