def _fetch_hive_path(request): from beeswax.api import autocomplete path = request.GET['path'] database = None table = None column = None if path: database = path if '/' in path: database, table = path.split('/', 1) if '.' in table: table, column = table.split('.', 1) resp = autocomplete(request, database, table, column) if database and request.GET['doas'] != request.user.username: request.GET = request.GET.copy() request.GET['doas'] = request.GET['doas'] resp = autocomplete(request, database, table, column) return resp
def _fetch_hive_path(request): from beeswax.api import autocomplete path = request.GET["path"] database = None table = None column = None if path: database = path if "/" in path: database, table = path.split("/", 1) if "." in table: table, column = table.split(".", 1) resp = autocomplete(request, database, table, column) if database and request.GET["doas"] != request.user.username: request.GET = request.GET.copy() request.GET["doas"] = request.GET["doas"] resp = autocomplete(request, database, table, column) return resp
def hive(request): assist = autocomplete(request, database=None, table=None) return render("hive.mako", request, { 'assist': assist, 'initial': json.dumps({'user': request.user.username}), })
def fetch_hive_path(request): path = request.GET['path'] database = None table = None if path: database = path if '/' in path: database, table = path.split('/') resp = autocomplete(request, database, table) if database and request.GET['doas'] != request.user.username: request.GET = request.GET.copy() request.GET['doas'] = request.GET['doas'] resp = autocomplete(request, database, table) return resp
def fetch_hive_path(request): path = request.GET["path"] database = None table = None if path: database = path if "/" in path: database, table = path.split("/") resp = autocomplete(request, database, table) if database and request.GET["doas"] != request.user.username: request.GET = request.GET.copy() request.GET["doas"] = request.GET["doas"] resp = autocomplete(request, database, table) return resp
def hive(request): assist = autocomplete(request, database=None, table=None) return render("hive.mako", request, {"assist": assist, "initial": json.dumps({"user": request.user.username})})