From 7b00374ef198ea1801ac1e04ff98b949d80dd992 Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Sat, 31 Dec 2011 18:25:00 +0000 Subject: 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 --- netrender/master_html.py | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) (limited to 'netrender/master_html.py') 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 "None", - netrender.model.JOB_TYPES[job.type], + ";".join(sorted(job.tags)) if job.tags else "None", + "%s [%s]" % (netrender.model.JOB_TYPES[job.type], netrender.model.JOB_SUBTYPES[job.subtype]), str(job.chunks) + """""" % (job.id, job.chunks + 1) + """""" % (job.id, job.chunks - 1, "disabled=True" if job.chunks == 1 else ""), @@ -164,11 +166,10 @@ def get(handler): output("

Slaves

") 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 "All", time.ctime(slave.last_seen), slave.stats, link(slave.job.name, "/html/job" + slave.job.id) if slave.job else "None") endTable() output("

Configuration

") @@ -221,7 +222,7 @@ def get(handler): job = handler.server.getJobID(job_id) if job: - output("

Render Information

") + output("

Job Information

") 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 "None") + 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("

Versioning

") -- cgit v1.2.3