コード例 #1
0
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
コード例 #2
0
ファイル: sentry.py プロジェクト: cloudera/hue
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
コード例 #3
0
ファイル: sentry.py プロジェクト: fangxingli/hue
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
コード例 #4
0
def hive(request):
    assist = autocomplete(request, database=None, table=None)

    return render("hive.mako", request, {
        'assist': assist,
        'initial': json.dumps({'user': request.user.username}),
    })
コード例 #5
0
ファイル: sentry.py プロジェクト: shanyou/hue
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
コード例 #6
0
ファイル: hive.py プロジェクト: shobull/hue
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
コード例 #7
0
ファイル: hive.py プロジェクト: mbrukman/cloudera-hue
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
コード例 #8
0
ファイル: views.py プロジェクト: Kewtt/hue
def hive(request):
    assist = autocomplete(request, database=None, table=None)

    return render("hive.mako", request, {"assist": assist, "initial": json.dumps({"user": request.user.username})})