示例#1
0
    def get(self):
        requests = query.current_requests()

        doc = common.Document(title='pushmaster: requests')
        doc.body(
            T.h2(('Current Requests (%d)' % len(requests)) if len(requests) > 5 else 'Current Requests'),
            common.request_list(requests) if requests else T.span('There are no requests at present.'),
            T.div(common.bookmarklet(self.hostname)),
            )
        doc.serialize(self.response.out)
示例#2
0
    def get(self):
        """List requests"""
        requests = query.current_requests()
        response = {'requests': [request.json for request in requests]}

        self.response.out.write(json.dumps(response))