Prettier output from start and status commands
This commit is contained in:
parent
1572c120f5
commit
72c2f36434
@ -43,11 +43,11 @@ class StartCommand extends Command
|
|||||||
|
|
||||||
$info = $containerManager->startService($serviceInfo, $options);
|
$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) {
|
foreach ($info['ports'] as $info=>$port) {
|
||||||
$output->writeln(" <info>{$info}</>: <comment>{$port}</comment>");
|
$output->writeln(" <info>{$info}</>: <comment>{$port}</comment>");
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::SUCCESS;
|
return self::SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ class StatusCommand extends Command
|
|||||||
|
|
||||||
$table = new Table($output);
|
$table = new Table($output);
|
||||||
$table->setStyle('compact');
|
$table->setStyle('compact');
|
||||||
$table->setHeaders([ "Service", "Instance", "Purpose", "Port" ]);
|
$table->setHeaders([ "Service", "Instance", "Port", "" ]);
|
||||||
|
|
||||||
$running = $containerManager->getRunningServices();
|
$running = $containerManager->getRunningServices();
|
||||||
$s = 0;
|
$s = 0;
|
||||||
@ -42,7 +42,7 @@ class StatusCommand extends Command
|
|||||||
$s++;
|
$s++;
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($service['ports'] as $portInfo=>$portNumber) {
|
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++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -51,4 +51,4 @@ class StatusCommand extends Command
|
|||||||
|
|
||||||
return self::SUCCESS;
|
return self::SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user