Ejemplo n.º 1
0
def display_node():
    if request.args.has_key("id"):
        id = request.args["id"]
        ele = helpers.get_node_or_404(id)
        features = changemonger.features(ele)
        return render_template("node_details.haml", name=display_name(ele, features[0]), element=ele, features=features)
    else:
        return render_template("node.haml", title="Bad Node")
Ejemplo n.º 2
0
def display_node():
    if request.args.has_key('id'):
        id = request.args['id']
        ele = helpers.get_node_or_404(id)
        features = changemonger.features(ele)
        return render_template('node_details.haml',
                               name=display_name(ele, features[0]),
                               element=ele,
                               features=features)
    else:
        return render_template('node.haml', title="Bad Node")
Ejemplo n.º 3
0
def display_node():
    if request.args.has_key('id'):
        id = request.args['id']
        ele = helpers.get_node_or_404(id)
        features = changemonger.features(ele)
        return render_template('node_details.haml',
                               name = display_name(ele, features[0]),
                               node = ele,
                               features = features)
    else:
        return render_template('node.haml', title="Bad Node")
Ejemplo n.º 4
0
def api_node(id):
    ele = helpers.get_node_or_404(id)
    features = changemonger.features(ele)
    features_names = [f.name for f in features]
    return jsonify(cn=common_name(ele), features=features_names)
Ejemplo n.º 5
0
def api_node(id):
    ele = helpers.get_node_or_404(id)
    features = changemonger.features(ele)
    features_names = [f.name for f in features]
    return jsonify(cn=common_name(ele),
                   features=features_names)