diff options
author | Martin Poirier <theeth@yahoo.com> | 2011-12-31 22:25:00 +0400 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2011-12-31 22:25:00 +0400 |
commit | 7b00374ef198ea1801ac1e04ff98b949d80dd992 (patch) | |
tree | 4edfc1ac422afc669ea73255949cadf4678cf875 /netrender/master_html.py | |
parent | 14138fd7df450aaa7813cebc63ca891542d60c4e (diff) |
netrender
wip feature: distributed point cache baking. Distributed baking works but results are sent back to master/client yet. Feature is disabled in the UI for this reason.
new feature: job and slave tags, enables filtering slaves for specific jobs
jobs are dispatched to a slave only it has no tags or all the job's tags
Render jobs have the tag "render" by default while baking jobs the tag "baking"
UI: Web interface additions to reflect tags and job subtypes (render/baking)
bug fix: reseting a completed job correctly resets the status to queued
Diffstat (limited to 'netrender/master_html.py')
-rw-r--r-- | netrender/master_html.py | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/netrender/master_html.py b/netrender/master_html.py index d737a51b..a8e6eaa6 100644 --- a/netrender/master_html.py +++ b/netrender/master_html.py @@ -115,6 +115,7 @@ def get(handler): "id", "name", "category", + "tags", "type", "chunks", "priority", @@ -140,7 +141,8 @@ def get(handler): job.id, link(job.name, "/html/job" + job.id), job.category if job.category else "<i>None</i>", - netrender.model.JOB_TYPES[job.type], + ";".join(sorted(job.tags)) if job.tags else "<i>None</i>", + "%s [%s]" % (netrender.model.JOB_TYPES[job.type], netrender.model.JOB_SUBTYPES[job.subtype]), str(job.chunks) + """<button title="increase chunks size" onclick="request('/edit_%s', "{'chunks': %i}");">+</button>""" % (job.id, job.chunks + 1) + """<button title="decrease chunks size" onclick="request('/edit_%s', "{'chunks': %i}");" %s>-</button>""" % (job.id, job.chunks - 1, "disabled=True" if job.chunks == 1 else ""), @@ -164,11 +166,10 @@ def get(handler): output("<h2>Slaves</h2>") startTable() - headerTable("name", "address", "last seen", "stats", "job") + headerTable("name", "address", "tags", "last seen", "stats", "job") for slave in handler.server.slaves: - rowTable(slave.name, slave.address[0], time.ctime(slave.last_seen), slave.stats, link(slave.job.name, "/html/job" + slave.job.id) if slave.job else "None") - + rowTable(slave.name, slave.address[0], ";".join(sorted(slave.tags)) if slave.tags else "<i>All</i>", time.ctime(slave.last_seen), slave.stats, link(slave.job.name, "/html/job" + slave.job.id) if slave.job else "None") endTable() output("<h2>Configuration</h2>") @@ -221,7 +222,7 @@ def get(handler): job = handler.server.getJobID(job_id) if job: - output("<h2>Render Information</h2>") + output("<h2>Job Information</h2>") job.initInfo() @@ -229,6 +230,8 @@ def get(handler): rowTable("resolution", "%ix%i at %i%%" % job.resolution) + rowTable("tags", ";".join(sorted(job.tags)) if job.tags else "<i>None</i>") + endTable() @@ -240,18 +243,17 @@ def get(handler): tot_cache = 0 tot_fluid = 0 + tot_other = 0 - rowTable(job.files[0].filepath) - rowTable("Other Files", class_style = "toggle", extra = "onclick='toggleDisplay(".other", "none", "table-row")'") + rowTable(job.files[0].original_path) for file in job.files: if file.filepath.endswith(".bphys"): tot_cache += 1 elif file.filepath.endswith(".bobj.gz") or file.filepath.endswith(".bvel.gz"): tot_fluid += 1 - else: - if file != job.files[0]: - rowTable(file.filepath, class_style = "other") + elif not file == job.files[0]: + tot_other += 1 if tot_cache > 0: rowTable("%i physic cache files" % tot_cache, class_style = "toggle", extra = "onclick='toggleDisplay(".cache", "none", "table-row")'") @@ -265,6 +267,17 @@ def get(handler): if file.filepath.endswith(".bobj.gz") or file.filepath.endswith(".bvel.gz"): rowTable(os.path.split(file.filepath)[1], class_style = "fluid") + if tot_other > 0: + rowTable("%i other files" % tot_other, class_style = "toggle", extra = "onclick='toggleDisplay(".other", "none", "table-row")'") + for file in job.files: + if ( + not file.filepath.endswith(".bphys") + and not file.filepath.endswith(".bobj.gz") or file.filepath.endswith(".bvel.gz") + and not file == job.files[0] + ): + + rowTable(file.filepath, class_style = "other") + endTable() elif job.type == netrender.model.JOB_VCS: output("<h2>Versioning</h2>") |