示例#1
0
文件: views.py 项目: hildensia/devviz
 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))
                         })
示例#2
0
文件: app.py 项目: hildensia/devviz
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])
示例#3
0
文件: views.py 项目: hildensia/devviz
 def post(self, viewid, var):
     view = data_handler.get_view(viewid)
     return view.add_var(var)
示例#4
0
文件: views.py 项目: hildensia/devviz
 def delete(self, viewid, var):
     view = data_handler.get_view(viewid)
     return view.del_var(var)
示例#5
0
文件: views.py 项目: hildensia/devviz
 def get(self, viewid):
     view = data_handler.get_view(viewid)
     return jsonify({"content": view.content})