Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
opalmer committed Mar 27, 2014
1 parent 0506c62 commit 8366b24
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion pyfarm/agent/http/index.py → pyfarm/agent/http/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import time
from datetime import timedelta
from httplib import OK

import psutil
from twisted.web.server import NOT_DONE_YET
Expand Down Expand Up @@ -47,7 +48,7 @@ def get(self, request):
# to the original request
def cb(content):
request.write(content)
request.setResponseCode(200)
request.setResponseCode(OK)
request.finish()

# convert the state integer to a string
Expand Down Expand Up @@ -129,3 +130,24 @@ def cb(content):

return NOT_DONE_YET


class Configuration(Resource):
TEMPLATE = "configuration.html"

def get(self, request):
# write out the results from the template back
# to the original request
def cb(content):
request.write(content)
request.setResponseCode(OK)
request.finish()

configuration = []
for key, value in sorted(config.items()):
configuration.append((key, value, None))

deferred = self.template.render(
configuration=configuration)
deferred.addCallback(cb)

return NOT_DONE_YET

0 comments on commit 8366b24

Please sign in to comment.