示例#1
0
def query():
    grafana_query = json.loads(request.data.decode("utf-8"))
    g_query = Query(grafana_query)

    responder = Responder(Responder.get_data_store())
    resp = responder.query(g_query)
    return (json.dumps(resp), 200) if resp else flask.abort(500)
示例#2
0
def annotations():
    grafana_annotation = json.loads(request.data.decode("utf-8"))
    annotation = Annotation(grafana_annotation)
    responder = Responder(Responder.get_data_store())
    return json.dumps(responder.annotation(annotation)), 200
示例#3
0
def search():
    # Liste of named services
    responder = Responder(Responder.get_data_store())
    return json.dumps(responder.search()), 200