mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-03 05:55:16 +01:00
Improved event log console output.
This commit is contained in:
@@ -137,6 +137,7 @@ class ShowEventLogCommand extends Command
|
||||
$headers = ['ID', 'Timestamp', 'Type', 'User', 'Target Type', 'Target'];
|
||||
if ($showExtra) {
|
||||
$headers[] = 'Extra data';
|
||||
$table->setColumnMaxWidth(6, 50);
|
||||
}
|
||||
$table->setHeaders($headers);
|
||||
|
||||
@@ -144,6 +145,9 @@ class ShowEventLogCommand extends Command
|
||||
$this->addTableRow($table, $entry, $showExtra);
|
||||
}
|
||||
|
||||
$table->setColumnMaxWidth(3, 20);
|
||||
$table->setColumnMaxWidth(5, 30);
|
||||
|
||||
$table->render();
|
||||
}
|
||||
|
||||
|
||||
@@ -67,8 +67,8 @@ class LogEntryExtraFormatter
|
||||
protected $translator;
|
||||
protected $elementTypeNameGenerator;
|
||||
|
||||
protected const CONSOLE_SEARCH = ['<i>', '</i>', '<b>', '</b>', ' <i class="fas fa-long-arrow-alt-right">'];
|
||||
protected const CONSOLE_REPLACE = ['<info>', '</info>', '<error>', '</error>', '→'];
|
||||
protected const CONSOLE_SEARCH = ['<i class="fas fa-long-arrow-alt-right"></i>', '<i>', '</i>', '<b>', '</b>', ];
|
||||
protected const CONSOLE_REPLACE = ['→', '<info>', '</info>', '<error>', '</error>'];
|
||||
|
||||
public function __construct(TranslatorInterface $translator, ElementTypeNameGenerator $elementTypeNameGenerator)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user