From acd04a1c16e22becce4b9673f068cf369c6033fb Mon Sep 17 00:00:00 2001 From: Sebastian Frank Date: Fri, 8 Mar 2019 11:13:52 +0100 Subject: [PATCH] log time style --- bootstrap.php | 6 +++++- views/deploys/index.php | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/bootstrap.php b/bootstrap.php index 7418ad1..b120d39 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -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 .= '

'.htmlspecialchars($l->out).'

'; } else { - $logstr .= '
'.$l->time.'s
'; + if ($l->time != $lastTime) { + $logstr .= '
'.$l->time.'s
'; + $lastTime = $l->time; + } $logstr .= preg_replace(array_keys($colors), $colors, htmlspecialchars($l->out)); } } diff --git a/views/deploys/index.php b/views/deploys/index.php index 2141973..88a6617 100644 --- a/views/deploys/index.php +++ b/views/deploys/index.php @@ -47,7 +47,13 @@ pre h2.failure { .stagename, .timetext { float: right; +} +.stagename { + font-size: 0.9em; +} +.timetext { font-size: 0.8em; + color: #a3a3a3; }