def get(self, viewid, var): if var is None: view = data_handler.get_view(viewid) return jsonify({'variables': view.variables}) else: return jsonify({'variables': Variable(var, data_handler.get_type(var), data_handler.get_value(var)) })
def main_page(): try: active_views = session['active_views'] except KeyError: session['active_views'] = [] active_views = [] views = app.views.values() return render_template("devviz.html", views=views, active_views=[VariablesView()] + [data_handler.get_view(viewid) for viewid in active_views])
def post(self, viewid, var): view = data_handler.get_view(viewid) return view.add_var(var)
def delete(self, viewid, var): view = data_handler.get_view(viewid) return view.del_var(var)
def get(self, viewid): view = data_handler.get_view(viewid) return jsonify({"content": view.content})