Example #1
0
def comparator(comparator):
    comparators = conf.get("comparators", {})
    used = []
    for machine, plugin, time, graph in comparators[comparator]:
        if not (machine, plugin, time) in used:
            used.append((machine, plugin, time))
    for machine, plugin, time in used:
        gen_graphs(machine, plugin, time)
    return template('comparator', comparator=comparator, graphs=comparators[comparator])
Example #2
0
def plugin(machine, plugin, time):
    time_ranges = ("day", "week", "month", "three-months", "six-months", "year")
    if time and time not in time_ranges:
        selected_time = "custom"
    elif time and time in time_ranges:
        selected_time = time
    else:
        selected_time = "day"
    plugin_graphs = gen_graphs(machine, plugin, time)[machine][plugin][selected_time]
    graphs = get_plugins_list()
    return template(
        'plugin',
        data=plugin_graphs,
        machine=machine,
        plugin=plugin,
        time=time,
        plugins=graphs[machine],
    )
Example #3
0
def gen_all():
    gen_graphs()
    redirect("/", 307)