ProcessCommand: add a 'list' action

fixes #13293
This commit is contained in:
Thomas Gelf 2016-11-23 15:29:14 +01:00
parent 1e351a7724
commit 656a5ada0e

View file

@ -34,6 +34,29 @@ class ProcessCommand extends Command
$this->storage = new LegacyStorage($this->Config()->getSection('global'));
}
/**
* List all available process
*
* USAGE
*
* icingacli businessprocess list processes [options]
*
* OPTIONS
*
* --no-title Show only the process names and no related title
*/
public function listAction()
{
$noTitle = $this->params->shift('no-title');
foreach ($this->storage->listProcesses() as $key => $title) {
if ($noTitle) {
echo $key . "\n";
} else {
echo $title . "\n";
}
}
}
/**
* Check a specific process
*