#set ($layout="json.vm")
#set ($dummy = $dbtool)
#set ($res=${response.setContentType("application/json")})
#if($params.key)
#set ($c=$computers)
#set ($res=$c.load($params.key))
#set ($comps=[ $c ])
#{else}[
#set ($comps=$computers.fetchAll())
#end
#set ($count=$comps.size())
#foreach ($c in $sorter.sort($comps,"name"))
#if ($count!=$velocityCount)
#set ($sep=",")
#else
#set ($sep="")
#end
#set($pr=$c.getProfile())
#set($status.value=0)
#set($dummy=$status.load($c.name))
{ "name": "$c.name", "description": "$!c.description", "ipAddress": "$!c.ipAddress", "macAddress": "$!c.macAddress", "owner": "$!c.owner", "options": "$!esc.javascript($c.options)", "profileName": "$!pr.name", "status":"$status.value" }$!sep
#end
#if(!$params.key)
]
#end
