log time style

This commit is contained in:
Sebastian Frank 2019-03-08 11:13:52 +01:00
parent 60f6d33eda
commit acd04a1c16
Signed by: apairon
GPG Key ID: 7270D06DDA7FE8C3
2 changed files with 11 additions and 1 deletions

View File

@ -159,11 +159,15 @@ if (COCKPIT_ADMIN && !COCKPIT_API_REQUEST) {
$logs = json_decode($logs);
$lastTime = 0;
foreach ($logs as $l) {
if (preg_match('/^\\+/', $l->out)) {
$logstr .= '<h3>'.htmlspecialchars($l->out).'</h3>';
} else {
$logstr .= '<div class="timetext">'.$l->time.'s</div>';
if ($l->time != $lastTime) {
$logstr .= '<div class="timetext">'.$l->time.'s</div>';
$lastTime = $l->time;
}
$logstr .= preg_replace(array_keys($colors), $colors, htmlspecialchars($l->out));
}
}

View File

@ -47,7 +47,13 @@ pre h2.failure {
.stagename, .timetext {
float: right;
}
.stagename {
font-size: 0.9em;
}
.timetext {
font-size: 0.8em;
color: #a3a3a3;
}
</style>