From a1ed428db0b333ab8a4acc888e3529cead184c57 Mon Sep 17 00:00:00 2001 From: Eudyptula Date: Fri, 17 Jul 2009 16:58:20 -0400 Subject: Added metadata back to log viewer --- frontend/classes/ansi.php | 2 +- frontend/pages/logview.php | 5 +---- todo | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/frontend/classes/ansi.php b/frontend/classes/ansi.php index 947904b..87f0621 100644 --- a/frontend/classes/ansi.php +++ b/frontend/classes/ansi.php @@ -3,7 +3,7 @@ class ansi_to_html { var $spans=0; public function process($txt) { // Clear to end of line - $txt=str_replace(array("\x1b[K", "\n", "\t", ' '), array('', "
\n", str_repeat(' ', 8), ' '), $txt); + $txt=str_replace(array("\x1b[K", "\n", "\t", ' '), array('', "
\n", str_repeat(' ', 8), '  '), $txt); // Backspace while (($i=strpos($txt, chr(8))) !== false) { if ($i == 0) { diff --git a/frontend/pages/logview.php b/frontend/pages/logview.php index 10c85dd..ac41c5d 100644 --- a/frontend/pages/logview.php +++ b/frontend/pages/logview.php @@ -49,10 +49,7 @@ function body_logview() { $ansi=new ansi_to_html(); while ($entry=$r->fetch(PDO::FETCH_ASSOC)) { $entry=new sql_buildlog_entry($entry); - // $text=str_replace(array("\n", "\t"), array("
\n", str_repeat(' ', 4)), htmlentities($entry->text)); - // echo 'stream=='stderr'?' style="color: red" ':'').' title="'.strtoupper($entry->stream).', entry #'.$entry->order.' @ '.date('D j M Y @ H:i:s', $entry->timestamp).' UTC">'.$text.''; - echo $ansi->process($entry->text); - // TODO handle tabs properly, move all this into ansi_to_html + echo '<'.($t=($entry->stream=='stderr'?'b':'span')).' title="'.strtoupper($entry->stream).', entry #'.$entry->order.' '.date('D j M Y @ H:i:s T', $entry->timestamp).'">'.$ansi->process($entry->text).""; } echo $ansi->reset(); // Clear any leftover s echo ''; diff --git a/todo b/todo index 6bc708c..c848a5b 100644 --- a/todo +++ b/todo @@ -3,7 +3,6 @@ Write a live git ebuild Have builds and tasks not give links to logs if we're already viewing the logs Either make task status a TEXT or stop putting command name in the status (via thrown exception) - we can fetch this later anyway - just store the task id that failed (or use the last task) Consider logging env. passed to tasks, path if we ever use it -Add metadata back to logviewer Add a statistics page Add a profiles management page/backend utility Add cleanup functions to the frontend and backend (tasks dir in backend containing scripts that can be launched through frontend) @@ -18,3 +17,4 @@ Allow config viewing for builds, not just configurations Write basic command-line wrapper to bkisofs and replace the ISO mounter with it Fix emerge system cache to discard properly Make sure that pkgsets updater in sql_gentoo_profile will remove empty and nonexistent pkgsets +Add `flags` column to configurations, builds, use it to implement public and private things -- cgit v1.2.3-65-gdbad