Example #1
0
def reports(request, report):
    if request.method == "GET":
        resp = core.ResponseDocument(request, title="Report for %s." % (report,))
        resp.content.new_para("Stay tuned...")
        return resp.finalize()
    else:
        return core.ONLY_GET
Example #2
0
def error(request):
    code = request.GET["code"]
    ref = request.environ["HTTP_REFERER"]
    resp = core.ResponseDocument(request,
                                 title="%s %s." % (_("Error"), code),
                                 stylesheet="base.css")
    resp.content.add_para().add_anchor(href=ref).add_text(_("Go back."))
    return resp.finalize()
Example #3
0
def main(request):
    resp = core.ResponseDocument(request, title="pyNMS Selftest")
    resp.content.new_preformat(str(request))
    resp.extra.add_unordered_list([
        resp.NM("A", {"href": request.get_url(testhandler)}, "testhandler"),
        resp.NM("A", {"href": request.get_url(reports, report="testplot")},
                "reports"),
    ])
    return resp.finalize()
Example #4
0
def main(request):
    if request.method == "GET":
        resp = core.ResponseDocument(request, title=TITLE,
                                    javascriptlink="reports.js")
        resp.fill_nav(resp.config.DEFAULTNAV)
        resp.header.add_header(1, TITLE)
        p = resp.NM("P", None, 
              resp.NM("A", {"href":resp.get_url(reports, report="sample")}, 
                 _("Sample Report")))
        resp.sidebar.append(p)
        return resp.finalize()
    else:
        return core.ONLY_GET
Example #5
0
def main(request):
    resp = core.ResponseDocument(request, title=TITLE, stylesheet="base.css")
    resp.header.add_header(1, TITLE)
    resp.fill_nav(resp.config.DEFAULTNAV)
    return resp.finalize()
Example #6
0
def reports(request, report):
    resp = core.ResponseDocument(request, title="pyNMS Selftest reports.")
    resp.content.new_para(str(report))
    resp.content.add_image(src=request.get_url("graphs.testplot"),
                           alt="testplot")
    return resp.finalize()
Example #7
0
def main(request):
    resp = core.ResponseDocument(request, title=TITLE)
    resp.fill_nav(resp.config.DEFAULTNAV)
    resp.header.add_header(1, TITLE)
    resp.content.new_para(_("In progress. Sorry."))
    return resp.finalize()