diff options
author | 2009-07-17 16:58:20 -0400 | |
---|---|---|
committer | 2009-07-17 16:58:20 -0400 | |
commit | a1ed428db0b333ab8a4acc888e3529cead184c57 (patch) | |
tree | 424abab8d4c0d1a74f11f88d3c5466c72c3d9423 | |
parent | Rearranged logviewer for security (diff) | |
download | ingenue-a1ed428db0b333ab8a4acc888e3529cead184c57.tar.gz ingenue-a1ed428db0b333ab8a4acc888e3529cead184c57.tar.bz2 ingenue-a1ed428db0b333ab8a4acc888e3529cead184c57.zip |
Added metadata back to log viewer
-rw-r--r-- | frontend/classes/ansi.php | 2 | ||||
-rw-r--r-- | frontend/pages/logview.php | 5 | ||||
-rw-r--r-- | 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('', "<br/>\n", str_repeat(' ', 8), ' '), $txt); + $txt=str_replace(array("\x1b[K", "\n", "\t", ' '), array('', "<br/>\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("<br/>\n", str_repeat(' ', 4)), htmlentities($entry->text)); - // echo '<a name="entry_'.$task->order.'_'.$entry->order.'"'.($entry->stream=='stderr'?' style="color: red" ':'').' title="'.strtoupper($entry->stream).', entry #'.$entry->order.' @ '.date('D j M Y @ H:i:s', $entry->timestamp).' UTC">'.$text.'</a>'; - 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)."</$t>"; } echo $ansi->reset(); // Clear any leftover <span>s echo '</div>'; @@ -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 |