AWS Thinkbox Discussion Forums

Simple Web Interface for Deadline

Yeah errors for me as well. I can’t find it on any of our old archives. Since it was saved in our Deadline ?6? repo that’s been purged and the scripts in it as well.

If I was starting over from scratch I would write a front end for the Deadline Remote Connection Server. It’s got a fully restful web interface. You would need though to create a backend service on your web server which has the correct HTTPS certificates if you use those (and you should if you are letting anyone interface with your job list as that might have sensitive job names). That’s the ideal solution these days for checking in on your render jobs remotely. (And using the native Deadline 10 monitor). Our repo is now on AWS so all of our slaves and monitors communicate through a remote connection server https connection, even “locally” in the office. An at home workstation is as much a first class citizen of Deadline as an office workstation as both connect to AWS.

The other thing you can do is just start from the:
\\DeadlineRepository10\scripts\WebService\Mobile_GetJobList.py file.  
That outputs XML  so it would just be a matter of switching out the tags from <Job> 
with <TR> and <name><comment> etc with <TD>. 

e.g. TableView.zip (2.1 KB)

def __main__( dlArgs, qsArgs ):
returnVal = ""

sb = StringBuilder()

# Get the args
egosort = qsArgs["ego"] if "ego" in qsArgs else None
primarysort = qsArgs["psort"] if "psort" in qsArgs else None
primarysortorder = qsArgs["psord"] if "psord" in qsArgs else None
secondarysort = qsArgs["ssort"] if "ssort" in qsArgs else None
secondarysortorder = qsArgs["ssord"] if "ssord" in qsArgs else None
pulseaddress = qsArgs["pulse"] if "pulse" in qsArgs else None
lastupdate = qsArgs["update"] if "update" in qsArgs else None
nonplist = qsArgs["plist"] if "plist" in qsArgs else None

# parse the last update
if ( lastupdate != None ):
    lastupdate = fromPlatformIndDateTime( lastupdate )#BUG possibility when starting the app for the first time - unable to reproduce

# check if plist is wanted or not

    
plugins = {}
users = {}
statuses = {}
groups = {}
pools = {}

thisAddress = ClientUtils.GetMacAddress()
jobs = WebServiceUtils.GetJobs()

# do the sorts
if ( secondarysort != None ):
    jobs = SortDictArrayByKey( jobs, secondarysort, secondarysortorder )
if ( primarysort != None ):
    jobs = SortDictArrayByKey( jobs, primarysort, primarysortorder )
if ( egosort != None ):
    jobs = EgoSortDictArray( jobs, egosort )

sb.AppendLine( "<HTML>" )
sb.AppendLine( "<TABLE>" )

# add each job
for job in jobs:
	if ( job != None and job["Status"] != "Deleted"):
		try:
			lastJobUpdate = DateTime.Parse( job["LastWriteTime"] )
		except:
			lastJobUpdate = None
		
		# if there was no update time given, or the update time is before this jobs last update

		sb.AppendLine( "\t<TR>" )
		sb.AppendLine( "\t\t<TD>" + SecurityElement.Escape( job["Name"] ) + "</TD>" )
		sb.AppendLine( "\t\t<TD>" + SecurityElement.Escape( job["Comment"] ) + "</TD>" )
		sb.AppendLine( "\t\t<TD>" + job["PluginName"] + "</TD>" )
		sb.AppendLine( "\t\t<TD>" + job["UserName"] + "</TD>" )
		sb.AppendLine( "\t\t<TD>" + job["Status"] + "</TD>" )
		sb.AppendLine( "\t\t<TD>" + job["JobId"] + "</TD>" )
		sb.AppendLine( "\t\t<TD>" + job["TaskCount"] + "</TD>" )
		sb.AppendLine( "\t\t<TD>" + job["CompletedChunks"] + "</TD>" )
		sb.AppendLine( "\t\t<TD>" + job["ErrorReports"] + "</TD>" )
		sb.AppendLine( "\t\t<TD>" + job["Group"] + "</TD>" )
		sb.AppendLine( "\t\t<TD>" + job["Pool"] + "</TD>" )
		sb.AppendLine( "\t</TR>" )
		# if the job is up to date, just print it's id to retrieve its data


# add the new update time
sb.AppendLine( "\t\t<update>" + toPlatformIndDateTime( DateTime.Now ) + "</update>" )

sb.AppendLine( "</TABLE>" )

returnVal = sb.ToString()

return returnVal

Usage:
http://[myhost]:8082/TableView?psort=<jobs, primarysort or primarysortorder>&ssort=<jobs, secondarysort or secondarysortorder>

Thanks so very much! :slight_smile:

We didn’t engineer the RCS endpoints to be publicly consumable by third part developers, so there’s no guarantees that the API won’t change out from under you. I suppose writing a tool against those endpoints is a “your mileage may vary” and “it’s not supported” situation.

The Web Service however is the expected standard.

hi,

i am on deadline 10.2.0.10 and when executing this web ui i got the plain html-text in the browser (the generatet text is not interpreted as html) and it looks like this in browser…any hints?

<HTML>
<TABLE>
	<TR>
		<TD>Name: OpenCue_003 - layer1 - CAM</TD>
		<TD></TD>
		<TD>PluginName: MayaBatch</TD>
		<TD>UserName: willi</TD>
		<TD>Status: Completed</TD>
		<TD>JobId: 63c7cea27643c50c7e0674da</TD>
		<TD>TaskCount: 17</TD>
		<TD>CompletedChunks: 17</TD>
		<TD>0</TD>
		<TD>none</TD>
		<TD>none</TD>
	</TR>
	<TR>
		<TD>Name: OpenCue_003 - layer1 - CAM</TD>
		<TD></TD>
		<TD>PluginName: MayaBatch</TD>
		<TD>UserName: willi</TD>
		<TD>Status: Completed</TD>
		<TD>JobId: 63c7d7d5020cc1e38b4bb225</TD>
		<TD>TaskCount: 17</TD>
		<TD>CompletedChunks: 17</TD>
		<TD>0</TD>
		<TD>none</TD>
		<TD>none</TD>
	</TR>
	<TR>
		<TD>Name: OpenCue_003 - layer1 - CAM</TD>
		<TD></TD>
		<TD>PluginName: MayaBatch</TD>
		<TD>UserName: willi</TD>
		<TD>Status: Completed</TD>
		<TD>JobId: 63c7fb872939215a78e4b5c1</TD>
		<TD>TaskCount: 17</TD>
		<TD>CompletedChunks: 17</TD>
		<TD>0</TD>
		<TD>none</TD>
		<TD>none</TD>
	</TR>
		<update>18/1/2023_15:4:6</update>
</TABLE>

Do you have Curl or Postman to see what the raw server response and contents are?

Maybe it needs a closing html tag

??? no dont have this…
i remember that that python script (TableView.py + Monitor.py) worked on deadline 10.1.15 and was interpreted in the browser…
also the example scripts (Mobile_GetJobDetails.py) also only spits out plain text (instead interpreted xml…)
something changed…

Could it be the browser is receiving the content-type as text/plain rather than text/html? I assume this is down to how the Deadline API is returning the string generated from the monitor.py script ?

hmmm…thx.

in the meanwhile i was successfull with the python api + flask + bootstrap…
so building a web interface with these tools is straightforward…

1 Like
Privacy | Site terms | Cookie preferences