Exemplo n.º 1
0
Arquivo: views.py Projeto: vsbca/crits
def new_save_search(request):
    """
    Renders the initial search results on save_search.html.
    Called only from crits core
    """
    args = generate_global_search(request)
    if 'Result' in args and args['Result'] == "ERROR":
        return respondWithError(args['Message'], request=request)
    args['dashboards'] = getDashboardsForUser(request.user)
    return render("save_search.html", args, request)
Exemplo n.º 2
0
Arquivo: views.py Projeto: vsbca/crits
def edit_save_search(request, id):
    """
    Called when editing a saved table on the dashboard.
    Renders the saved_search.html with the customized table
    """
    args = generate_search_for_saved_table(user=request.user, id=id, request=request)
    if 'Result' in args and args['Result'] == "ERROR":
        return respondWithError(args['Message'], request=request)

    args['dashboards'] = getDashboardsForUser(request.user)

    return render("save_search.html", args, request)
Exemplo n.º 3
0
 def getDashboards(self):
     from crits.dashboards.handlers import getDashboardsForUser
     return getDashboardsForUser(self)