web/header.html | 2 +-
web/job_detail.html | 23 ++++++++++++++++++-----
web/jobs.html | 2 +-
web/media/css/cas-web.css | 4 ++++
4 files changed, 24 insertions(+), 7 deletions(-)
New commits:
commit a76869b6372390788226e59990be0007200e4df9
Author: Adam Stokes <adam.stokes(a)gmail.com>
Date: Wed Apr 29 20:36:22 2009 -0400
- web-ui reading logs, checking statuses.
diff --git a/web/header.html b/web/header.html
index 6c65c4f..43a5b8c 100644
--- a/web/header.html
+++ b/web/header.html
@@ -8,7 +8,7 @@
</head>
<body>
<div id="header">
- <p><img src="/media/img/cas_logo.png"></p>
+ <p><a href="/"><img src="/media/img/cas_logo.png"></a></p>
:// <a href="/">go home</a>, <a href="/jobs.html">jobs</a>
</div>
diff --git a/web/job_detail.html b/web/job_detail.html
index a93d0ab..e39ce8a 100644
--- a/web/job_detail.html
+++ b/web/job_detail.html
@@ -1,12 +1,25 @@
<& header.html &>
<div id="content">
-<% $id %>
+<h3>Job Detail</h3>
+% open LOG_DATA, "<$work_dir/$view_log" or die $!;
+% while (<LOG_DATA>) {
+<% $_ %>
+% }
<& footer.html &>
-<%args>
-my $id;
-</%args>
<%init>
use Data::Dumper;
-my $page_id = $id;
+
+my $work_dir;
+open CONFIG, "</etc/cas.conf" or die $!;
+while (<CONFIG>) {
+ if (/^workDirectory=(.*)/) {
+ $work_dir = $1;
+ }
+}
+close CONFIG;
</%init>
+
+<%args>
+$view_log
+</%args>
diff --git a/web/jobs.html b/web/jobs.html
index 5064e46..a648b33 100644
--- a/web/jobs.html
+++ b/web/jobs.html
@@ -9,7 +9,7 @@
% foreach my $item (@{$data}) {
% my ($id, $identify, $timestamp, $email) = @{$item};
<tr>
-<td><a href="/job_detail.html?id=<% $id %>">Detail</a></td>
+<td><a href="/job_detail.html?view_log=<% $identify %>/<% $timestamp %>.log">view log</a></td>
<td><% $id %></td>
<td><% $identify %></td>
<td><% $timestamp %></td>
diff --git a/web/media/css/cas-web.css b/web/media/css/cas-web.css
index 7dbab6d..61a3278 100644
--- a/web/media/css/cas-web.css
+++ b/web/media/css/cas-web.css
@@ -15,6 +15,10 @@ td, th {
vertical-align: middle;
}
+img {
+ border: 0;
+}
+
#header {
font-size: small;
padding: 5px;