Example #1
0
def schedd_rates_graph(environ, start_response):
    status = '200 OK'
    headers = [('Content-type', 'image/png'),
               ('Cache-Control', 'max-age=60, public')]
    start_response(status, headers)

    path = environ.get('PATH_INFO', '')
    m = schedd_rates_graph_re.match(path)
    interval = "daily"
    if m.groups()[0]: interval=m.groups()[0]

    if m.groups()[1]:
        return [ jobview_rrd.graph_rrd(cp, "schedd_rates", interval, m.groups()[1]) ]
    else:
        return [ jobview_rrd.graph_rrd(cp, "schedd_rates", interval) ]
Example #2
0
def schedd_jobs_graph(environ, start_response):
    status = '200 OK'
    headers = [('Content-type', 'image/png'),
               ('Cache-Control', 'max-age=60, public')]
    start_response(status, headers)

    path = environ.get('PATH_INFO', '')
    m = schedd_jobs_graph_re.match(path)
    interval = "daily"
    if m.groups()[0]: interval = m.groups()[0]

    if m.groups()[1]:
        return [jobview_rrd.graph_rrd(cp, "schedd", interval, m.groups()[1])]
    else:
        return [jobview_rrd.graph_rrd(cp, "schedd", interval)]