Prettier output from start and status commands
This commit is contained in:
parent
1572c120f5
commit
72c2f36434
@ -43,7 +43,7 @@ class StartCommand extends Command
|
||||
|
||||
$info = $containerManager->startService($serviceInfo, $options);
|
||||
|
||||
$output->writeln("Started <fg=cyan>{$serviceName}</>[<fg=cyan>{$instanceName}</>]");
|
||||
$output->writeln("Started <fg=cyan;options=bold>{$serviceName}</>[<fg=cyan>{$instanceName}</>]");
|
||||
foreach ($info['ports'] as $info=>$port) {
|
||||
$output->writeln(" <info>{$info}</>: <comment>{$port}</comment>");
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ class StatusCommand extends Command
|
||||
|
||||
$table = new Table($output);
|
||||
$table->setStyle('compact');
|
||||
$table->setHeaders([ "Service", "Instance", "Purpose", "Port" ]);
|
||||
$table->setHeaders([ "Service", "Instance", "Port", "" ]);
|
||||
|
||||
$running = $containerManager->getRunningServices();
|
||||
$s = 0;
|
||||
@ -42,7 +42,7 @@ class StatusCommand extends Command
|
||||
$s++;
|
||||
$i = 0;
|
||||
foreach ($service['ports'] as $portInfo=>$portNumber) {
|
||||
$table->addRow([ ($i==0)?$service['service']['name']:"", ($i==0)?$service['instance']:"", $portInfo, $portNumber ]);
|
||||
$table->addRow([ "<fg=cyan;options=bold>".(($i==0)?$service['service']['name']:"")."</>", "<fg=cyan>".(($i==0)?$service['instance']:"")."</>", "<fg=yellow>".$portNumber."</>", $portInfo ]);
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user