Ejemplo n.º 1
0
def combined_trial_graph(tid):
    cwd = os.getcwd()
    persistence.connect_existing(cwd)
    tree = load_trial_activation_tree(tid)
    visitor = TrialGraphCombineVisitor()
    tree.visit(visitor)
    return jsonify(**visitor.to_dict())
Ejemplo n.º 2
0
def index():
    cwd = os.getcwd()
    persistence.connect_existing(cwd)
    
    scripts = {s[0].rsplit('/',1)[-1] for s in persistence.distinct_scripts()}
    return render_template("index.html", 
        cwd = cwd,
        scripts = scripts
    )
Ejemplo n.º 3
0
def all_environment(tid):
    cwd = os.getcwd()
    persistence.connect_existing(cwd)
    trial = persistence.load_trial(tid).fetchone()
    env = get_environment(tid)
    return render_template("trial.html", 
        cwd = cwd,
        trial = trial,
        env = env,
        info = "environment.html",
    )
Ejemplo n.º 4
0
def all_modules(tid):
    cwd = os.getcwd()
    persistence.connect_existing(cwd)
    trial, local, result = get_modules(cwd, tid)
    result = sorted(result, key=lambda x:x not in local)
    return render_template("trial.html", 
        cwd = cwd,
        trial = trial,
        modules = result,
        info = "modules.html",
    )
Ejemplo n.º 5
0
def all_file_accesses(tid):
    cwd = os.getcwd()
    persistence.connect_existing(cwd)
    trial = persistence.load_trial(tid).fetchone()
    result = get_file_accesses(tid)
    return render_template("trial.html", 
        cwd = cwd,
        trial = trial,
        file_accesses = result,
        info = "file_accesses.html",
    )
Ejemplo n.º 6
0
def file_accesses(tid):
    cwd = os.getcwd()
    persistence.connect_existing(cwd)
    result = get_file_accesses(tid)
    return jsonify(file_accesses=result)
Ejemplo n.º 7
0
def environment(tid):
    cwd = os.getcwd()
    persistence.connect_existing(cwd)
    env = get_environment(tid)
    return jsonify(env=env)
Ejemplo n.º 8
0
def dependencies(tid):
    cwd = os.getcwd()
    persistence.connect_existing(cwd)
    trial, local, result = get_modules(cwd, tid)
    return jsonify(local=local, all=result)
Ejemplo n.º 9
0
def trials():
    cwd = os.getcwd()
    persistence.connect_existing(cwd)
    return jsonify(**load_trials(request.args.get('script'), 
                                 request.args.get('execution')))