-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathclient.html
More file actions
65 lines (65 loc) · 3.82 KB
/
client.html
File metadata and controls
65 lines (65 loc) · 3.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SQL Query Interface</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="static/css/styles.css">
</head>
<body class="bg-light">
<nav class="navbar navbar-expand-lg navbar-dark bg-primary shadow-sm">
<div class="container-fluid">
<a class="navbar-brand d-flex align-items-center gap-2" href="#">
<span style="font-size: 1.5rem;">🔍</span> SQL Query Interface
</a>
</div>
</nav>
<div class="container py-5">
<div class="row justify-content-center">
<div class="col-lg-10">
<div class="card shadow mb-4">
<div class="card-body">
<h3 class="card-title mb-3 d-flex align-items-center gap-2"><span style="font-size: 1.3rem;">📂</span> Find Parquet Files</h3>
<p class="text-muted">Add filters to find parquet files containing matching data.</p>
<div id="filters"></div>
<div class="mt-2">
<button class="btn btn-outline-secondary" onclick="addFilter()"><i class="bi bi-plus-circle"></i> Add Filter</button>
</div>
<div class="mt-3">
<button class="btn btn-info text-white" onclick="findFiles()" id="findFilesButton"><i class="bi bi-search"></i> Find Matching Files</button>
</div>
</div>
</div>
<div class="card shadow mb-4">
<div class="card-body">
<h3 class="card-title mb-3 d-flex align-items-center gap-2"><span style="font-size: 1.3rem;">📝</span> Custom SQL Query</h3>
<p class="text-muted">Enter your SQL query below (e.g., <code>SELECT * FROM all_data WHERE condition LIMIT 10</code>). Primarily <b>SELECT</b>, <b>DESCRIBE</b>, <b>SHOW</b> are allowed.</p>
<div class="form-group mb-3">
<textarea id="sqlQueryInput" class="form-control shadow-sm" rows="6" placeholder="SELECT * FROM all_data LIMIT 10"></textarea>
</div>
<button class="btn btn-primary" onclick="executeCustomSql()" id="executeSqlButton"><i class="bi bi-play-circle"></i> Execute SQL</button>
</div>
</div>
<div class="mb-4" id="resultActionButtons" style="display: none;">
<div class="d-flex gap-2">
<button class="btn btn-success" onclick="exportToCsv()" id="exportButton"><i class="bi bi-download"></i> Export Results to CSV</button>
<button class="btn btn-danger" onclick="clearAll()" id="clearButton"><i class="bi bi-x-circle"></i> Clear Results & Filters</button>
</div>
</div>
<div id="resultsSection" style="display: none;" class="mb-4">
<h3 id="resultsTitle" class="mb-3"><i class="bi bi-table"></i> Results</h3>
<div id="resultsContent">
<!-- Results (table or list) will be inserted here -->
</div>
</div>
</div>
</div>
</div>
<!-- Bootstrap Icons -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
<script src="static/js/scripts.js"></script>
</body>
</html>