[Durian-svn] [2878] updated farm css and layout a little bit, hope not to break anything =D
pablo
institute at blender.org
Tue May 4 23:41:28 CEST 2010
Revision: 2878
https://blenderinstitute.dyndns.org/durian-svn/?do=log&project=durian&path=/&rev=2878
Author: pablo
Date: 2010-05-04 23:41:28 +0200 (Tue, 04 May 2010)
Log Message:
-----------
updated farm css and layout a little bit, hope not to break anything =D
Modified Paths:
--------------
frm/master_ui.css
frm/master_ui.py
Modified: frm/master_ui.css
===================================================================
--- frm/master_ui.css 2010-05-04 21:27:47 UTC (rev 2877)
+++ frm/master_ui.css 2010-05-04 21:41:28 UTC (rev 2878)
@@ -1,62 +1,58 @@
body {
- background-color:#eee;
+ background-color:#000;
+ color: #ddd;
font-size:12px;
font-family: "Lucida Sans","Lucida Sans Unicode","Lucida Grande",Lucida,sans-serif;
-
}
a {
- /*text-decoration:none;*/
- color:#666;
+ text-decoration:none;
+ color:#cc7733;
}
a:hover {
- color:#000;
+ color:#fff;
+ text-decoration:underline;
}
-h2 {
- background-color:#ddd;
- font-size:120%;
- padding:5px;
+h1 {
+ font-size:180%;
+ float:right;
}
-h2 {
- background-color:#ddd;
- font-size:110%;
- padding:5px;
+h3 {
+ clear:both;
+ font-size:150%;
+ margin: 2px 0 5px 0;
}
-table {
- text-align:left;
- border:0;
- background-color:#ddd;
- padding: 0px;
- margin: 0px;
- width: 1024px;
+hr {
+ clear: both;
+ background-color: #333;
+ height:1px;
+ border:0;
+ width: 60%;
+ margin: 20px auto;
}
thead{
- font-size:90%;
- color:#555;
- background-color:#ccc;
+ font-size:80%;
+ color: #ccc;
+ background-color: #ccc !important;
+ padding: 5px;
}
-td {
- border:0;
- padding:2px;
- padding-left:10px;
- padding-right:10px;
- margin-left:20px;
- background-color:#ddd;
-}
-td:hover {
- background-color:#ccc;
-}
+
tr {
border:0;
}
+
button {
color: #111;
width: auto;
height: auto;
}
+.centered {
+ text-align: center;
+}
+
.toggle {
text-decoration: underline;
cursor: pointer;
@@ -85,3 +81,102 @@
cursor: pointer;
}
+input {
+ background-color: #111;
+ color: #ccc;
+ border-radius: 6px;
+ border: thin solid #555;
+ padding: 5px;
+}
+
+input:hover, input:focus {
+ background-color: #000;
+}
+
+#clearall {
+ clear:both;
+}
+
+#table-jobs {
+ background-color: #222;
+ border-radius: 6px;
+ border: thin solid #333;
+ padding: 2px;
+ width: 100%;
+ color: #fff;
+}
+
+#table-jobs td {
+ background-color: #111;
+ border-bottom: thin solid #333;
+ word-wrap:break-word;
+ padding-left: 10px;
+}
+
+#table-jobs td:hover{
+ background-color: #181818;
+}
+
+#td-toggle {
+ width: 12px !important;
+ background-color: #000 !important;
+ text-align: center;
+ padding: 2px 10px 2px 0px;
+ border: thin solid #333;
+}
+
+#status-disabled {
+ text-align:center;
+ background-color: #880000 !important;
+ color: #fff;
+ border-radius: 6px;
+ text-shadow: 1px 1px 3px #000;
+}
+#status-disabled:hover {
+ background-color: #990000 !important;
+ text-shadow: 0px 0px 4px #fff;
+}
+
+#status-inprogress {
+ text-align:center;
+ background-color: #bb6622 !important;
+ color: #fff;
+ border-radius: 6px;
+ border: thin solid #000;
+ text-shadow: 1px 1px 3px #000;
+}
+
+#status-inprogress:hover {
+ background-color: #cc7733 !important;
+ text-shadow: 0px 0px 4px #fff;
+}
+
+#status-done {
+ text-align:center;
+ background-color: #88bb00 !important;
+ color: #000;
+ border-radius: 6px;
+ font-weight: bold;
+ text-shadow: 1px 1px 3px #000;
+}
+
+#status-done:hover {
+ background-color: #99cc11 !important;
+ text-shadow: 0px 0px 4px #fff;
+}
+
+
+
+#latest-render {
+ float:left;
+ margin-left: 400px;
+}
+
+#extrainfo {
+ float:left;
+}
+
+#container {
+ margin: 5px auto;
+ width: 1280px;
+}
Modified: frm/master_ui.py
===================================================================
--- frm/master_ui.py 2010-05-04 21:27:47 UTC (rev 2877)
+++ frm/master_ui.py 2010-05-04 21:41:28 UTC (rev 2878)
@@ -10,6 +10,7 @@
import urllib
from render_dirs import FARM_DIR
+#FARM_DIR = "/media/data/durian/frm/"
TOTAL_PROGRESS = "No statistics yet."
JOBS = []
@@ -17,7 +18,10 @@
JOBS_FILE = os.path.join(FARM_DIR, "jobs.pkl")
SLAVES_FILE = os.path.join(FARM_DIR, "slaves.pkl")
REPO_PATH = "/media/data/svnroot/durian"
+
+#HTTPD_IP = "127.0.0.1"
HTTPD_IP = "192.168.1.14"
+
HTTPD_PORT = 8333
RESTART = False
GENERATE_AVI = False
@@ -47,7 +51,7 @@
class Job:
priority_types = ('Low', 'Medium', 'High', 'Critical')
quality_types = ('Final 2K',)
- status_types = ('Disabled', 'In Progress', 'Done')
+ status_types = ('Disabled', 'In Progress', 'Done!')
def __init__(self, id, revision, quality):
self.id = id
@@ -238,7 +242,7 @@
output("<h3>" + text + "</h3>\n")
def table_begin(*columns):
- output("<table>\n")
+ output("<table id='table-jobs'>\n")
output("<thead>\n")
table_row(*columns)
output("</thead>\n")
@@ -300,6 +304,8 @@
return_file('master_ui.js', 'text/javascript')
elif self.path == '/preview.png':
return_file(os.path.join(FARM_DIR, 'slideshow/preview_small00001.png'), 'image/png')
+ elif self.path == '/preview_big.png':
+ return_file(os.path.join(FARM_DIR, 'slideshow/preview_big00001.png'), 'image/png')
elif self.path.startswith("/logs"):
return_file(os.path.join(FARM_DIR, self.path[1:]), 'text/plain', 1000)
else:
@@ -311,31 +317,38 @@
# html begin
output("<html><head>\n")
output("<meta http-equiv='refresh' content=5>\n")
- output("<title>Durian Farm</title>\n")
+ output("<title>Durian Farm! </title>\n")
output("<link rel='stylesheet' href='master_ui.css' type='text/css'>\n")
output("<script src='master_ui.js' type='text/javascript'></script>")
- output("</head><body>\n")
+ output("</head><body><div id='container'>\n")
- title("Durian Farm")
+ title("Durian Farm!")
# jobs
section("Jobs")
- table_begin("File", "Revision", "Quality", "Status", "Progress", "Priority", "Enabled", "")
+ table_begin("", "File", "Revision", "Quality", "Status", "Progress", "Priority", "")
for job in JOBS:
output("<tr>\n")
+ output("<td id='td-toggle'>")
+ checkbox('job_set_enabled', job.id, job.enabled)
+ output("</td>\n")
output("<td>" + job.id + "</td>\n")
output("<td>" + job.revision + "</td>\n")
output("<td>" + job.quality + "</td>\n")
- output("<td>" + job.status + "</td>\n")
- output("<td>" + job.progress + "</td>\n")
+ if job.status=='Disabled':
+ output("<td id='status-disabled'>" + job.status + "</td>\n")
+ elif job.status=='In Progress':
+ output("<td id='status-inprogress'>" + job.status + "</td>\n")
+ elif job.status=='Done!':
+ output("<td id='status-done'>" + job.status + "</td>\n")
+ else:
+ output("<td>" + job.status + "</td>\n")
+ output("<td class='centered'>" + job.progress + "</td>\n")
output("<td>")
dropdown('job_set_priority', job.id, job.priority, Job.priority_types)
output("</td>\n")
- output("<td>")
- checkbox('job_set_enabled', job.id, job.enabled)
- output("</td>\n")
- output("<td>")
+ output("<td id='td-toggle'>")
action('job_remove(\\"%s\\")' % job.id, "X", "Are you sure you want to remove this job?")
output("</td>\n")
output("</tr>")
@@ -347,7 +360,7 @@
logs, revision = latest_svn_info()
output("<form method='post' action='/job_add'>\n")
- output("<input name='id' value='pro/props/peach.blend' size='50'/>\n")
+ output("<input name='id' value='pro/scenes/' size='50'/>\n")
output("<input name='revision' value='%s' size='10'/>\n" % (revision,))
output("<select name='quality'>\n")
for option in Job.quality_types:
@@ -359,12 +372,12 @@
output("<input type='submit' value='Add Job'/>\n")
output("</form>\n")
- output("<br/>\n")
+ output("<hr/>\n")
+ output("<div id='extrainfo'>\n")
+ # recent commits
section("Recent Commits")
-
output(logs)
-
output("<br/>\n")
output("<br/>\n")
@@ -372,23 +385,33 @@
section("Overall Progress")
output(TOTAL_PROGRESS)
- output("<br/>\n")
- output("<br/>\n")
+ output("</div>\n")
+ # latest image
+ output("<div id='latest-render'>")
+ section("Latest Render")
+ output("<a href='preview_big.png' target='_blank'><img src='preview.png' alt='latest render image'></a>")
+ output("</div>")
+
+ output("<hr/>\n")
+
# slaves
section("Slaves")
- table_begin("Name", "IP", "Status", "Log", "Enabled", "")
+ table_begin("", "Name", "IP", "Status", "Logs", "")
for slave in SLAVES:
output("<tr>\n")
+ output("<td id='td-toggle'>")
+ checkbox('slave_set_enabled', slave.id, slave.enabled)
+ output("</td>\n")
output("<td>" + slave.id + "</td>\n")
output("<td>" + slave.ip + "</td>\n")
- output("<td>" + slave.status + "</td>\n")
+ if slave.status=='Disabled':
+ output("<td style='color:red'>" + slave.status + "</td>\n")
+ else:
+ output("<td>" + slave.status + "</td>\n")
output("<td><a href='/logs/%s.log'>view</a></td>\n" % (slave.ip,))
- output("<td>")
- checkbox('slave_set_enabled', slave.id, slave.enabled)
- output("</td>\n")
- output("<td>")
+ output("<td id='td-toggle'>")
action('slave_remove(\\"%s\\")' % slave.id, "X", "Are you sure you want to remove this slave?")
output("</td>\n")
output("</tr>\n")
@@ -403,7 +426,7 @@
output("<input type='submit' value='Add Slave'/>\n")
output("</form>\n")
- output("<br/>\n")
+ output("<hr/>\n")
@@ Diff output truncated at 10240 characters. @@
More information about the Durian-svn
mailing list