Skip to content

Commit b2b776c

Browse files
committed
feat: format
Signed-off-by: Jad Chahed <[email protected]>
1 parent 5e4e678 commit b2b776c

File tree

5 files changed

+196
-109
lines changed

5 files changed

+196
-109
lines changed

go/admin/templates/base.html

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,34 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
4-
<head>
5-
<meta charset="UTF-8">
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
76
<title>Admin Dashboard</title>
8-
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
7+
<link
8+
href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
9+
rel="stylesheet"
10+
/>
911
<script src="https://unpkg.com/[email protected]"></script>
10-
</head>
12+
</head>
1113

12-
<body class="bg-gray-900">
14+
<body class="bg-gray-900">
1315
<div class="flex h-screen">
14-
<!-- Sidebar -->
15-
<div class="bg-white w-1/4 p-4">
16-
<div>
17-
<div>{{ template "sidebar.html" . }}</div>
18-
</div>
16+
<div class="bg-white w-1/4 p-4">
17+
<div>
18+
<div>{{ template "sidebar.html" . }}</div>
19+
</div>
20+
</div>
21+
<div class="bg-white flex-1 p-8">
22+
<div id="header">
23+
<div>{{ template "header.html" . }}</div>
1924
</div>
2025

21-
<!-- Main Content -->
22-
<div class="bg-white flex-1 p-8">
23-
<!-- Header -->
24-
<div id="header">
25-
<div>{{ template "header.html" . }}</div>
26-
</div>
27-
28-
<!-- Dynamic Content -->
29-
<div id="content" class="mt-4">
30-
<div>
31-
<div>{{ template "content.html" . }}</div>
32-
</div>
33-
</div>
26+
<div id="content" class="mt-4">
27+
<div>
28+
<div>{{ template "content.html" . }}</div>
29+
</div>
3430
</div>
31+
</div>
3532
</div>
36-
</body>
37-
38-
</html>
33+
</body>
34+
</html>

go/admin/templates/content.html

Lines changed: 120 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,122 @@
11
<div id="content">
2-
<form>
3-
<div class="flex flex-row gap-4">
4-
<div>
5-
<label class="label">Source</label>
6-
<input
7-
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
8-
type="text" name="source">
9-
</div>
10-
<div>
11-
<label class="label">SHA</label>
12-
<input
13-
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
14-
type="text" class="form-control" name="sha">
15-
</div>
16-
</div>
17-
<label>Workloads</label>
18-
<div class="flex flex-row gap-4">
19-
<div class="flex flex-col">
20-
<label><input class="accent-orange-500" type="checkbox" name="workloads" value="all" checked>
21-
All</label>
22-
<label><input class="accent-orange-500" type="checkbox" name="workloads" value="OLTP"> OLTP</label>
23-
<label><input class="accent-orange-500" type="checkbox" name="workloads" value="OLTP-READONLY">
24-
OLTP-READONLY</label>
25-
<label><input class="accent-orange-500" type="checkbox" name="workloads" value="OLTP-SET">
26-
OLTP-SET</label>
27-
</div>
28-
<div class="flex flex-col">
29-
<label><input class="accent-orange-500" type="checkbox" name="workloads" value="TPCC"> TPCC</label>
30-
<label><input class="accent-orange-500" type="checkbox" name="workloads" value="TPCC_FK">
31-
TPCC_FK</label>
32-
<label><input class="accent-orange-500" type="checkbox" name="workloads" value="TPCC_FK_UNMANAGED">
33-
TPCC_FK_UNMANAGED</label>
34-
<label><input class="accent-orange-500" type="checkbox" name="workloads" value="TPCC_UNSHARDED">
35-
TPCC_UNSHARDED</label>
36-
</div>
37-
</div>
38-
<div>
39-
<label class="label">Number of executions</label>
40-
<input
41-
class="shadow appearance-none border rounded w-20 py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
42-
type="number" name="numberOfExecutions" value="1" min="1" max="10">
43-
</div>
2+
<form>
3+
<div class="flex flex-row gap-4">
4+
<div>
5+
<label class="label">Source</label>
6+
<input
7+
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
8+
type="text"
9+
name="source"
10+
/>
11+
</div>
12+
<div>
13+
<label class="label">SHA</label>
14+
<input
15+
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
16+
type="text"
17+
class="form-control"
18+
name="sha"
19+
/>
20+
</div>
21+
</div>
22+
<label>Workloads</label>
23+
<div class="flex flex-row gap-4">
24+
<div class="flex flex-col">
25+
<label
26+
><input
27+
class="accent-orange-500"
28+
type="checkbox"
29+
name="workloads"
30+
value="all"
31+
checked
32+
/>
33+
All</label
34+
>
35+
<label
36+
><input
37+
class="accent-orange-500"
38+
type="checkbox"
39+
name="workloads"
40+
value="OLTP"
41+
/>
42+
OLTP</label
43+
>
44+
<label
45+
><input
46+
class="accent-orange-500"
47+
type="checkbox"
48+
name="workloads"
49+
value="OLTP-READONLY"
50+
/>
51+
OLTP-READONLY</label
52+
>
53+
<label
54+
><input
55+
class="accent-orange-500"
56+
type="checkbox"
57+
name="workloads"
58+
value="OLTP-SET"
59+
/>
60+
OLTP-SET</label
61+
>
62+
</div>
63+
<div class="flex flex-col">
64+
<label
65+
><input
66+
class="accent-orange-500"
67+
type="checkbox"
68+
name="workloads"
69+
value="TPCC"
70+
/>
71+
TPCC</label
72+
>
73+
<label
74+
><input
75+
class="accent-orange-500"
76+
type="checkbox"
77+
name="workloads"
78+
value="TPCC_FK"
79+
/>
80+
TPCC_FK</label
81+
>
82+
<label
83+
><input
84+
class="accent-orange-500"
85+
type="checkbox"
86+
name="workloads"
87+
value="TPCC_FK_UNMANAGED"
88+
/>
89+
TPCC_FK_UNMANAGED</label
90+
>
91+
<label
92+
><input
93+
class="accent-orange-500"
94+
type="checkbox"
95+
name="workloads"
96+
value="TPCC_UNSHARDED"
97+
/>
98+
TPCC_UNSHARDED</label
99+
>
100+
</div>
101+
</div>
102+
<div>
103+
<label class="label">Number of executions</label>
104+
<input
105+
class="shadow appearance-none border rounded w-20 py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
106+
type="number"
107+
name="numberOfExecutions"
108+
value="1"
109+
min="1"
110+
max="10"
111+
/>
112+
</div>
44113

45-
<button hx-post="/admin/executions/add"
46-
class="bg-orange-500 hover:bg-orange-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline"
47-
type="submit">Add Execution</button>
48-
</form>
49-
</div>
114+
<button
115+
hx-post="/admin/executions/add"
116+
class="bg-orange-500 hover:bg-orange-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline"
117+
type="submit"
118+
>
119+
Add Execution
120+
</button>
121+
</form>
122+
</div>

go/admin/templates/header.html

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
<div class="border-b-2 pb-4 mb-6 w-full flex justify-between text-center flex-wrap">
2-
<h2 class="text-2xl font-bold text-gray-700">Admin Dashboard</h2>
3-
<a href="https://benchmark.vitess.io/" target="_blank" class="text-orange-500 align-middle">arewefastyet website</a>
1+
<div
2+
class="border-b-2 pb-4 mb-6 w-full flex justify-between text-center flex-wrap"
3+
>
4+
<h2 class="text-2xl font-bold text-gray-700">Admin Dashboard</h2>
5+
<a
6+
href="https://benchmark.vitess.io/"
7+
target="_blank"
8+
class="text-orange-500 align-middle"
9+
>arewefastyet website</a
10+
>
411
</div>

go/admin/templates/login.html

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
4-
<head>
5-
<meta charset="UTF-8">
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
76
<title>Admin Login Page</title>
8-
<link href="https://unpkg.com/[email protected]/dist/tailwind.min.css" rel="stylesheet">
9-
</head>
7+
<link
8+
href="https://unpkg.com/[email protected]/dist/tailwind.min.css"
9+
rel="stylesheet"
10+
/>
11+
</head>
1012

11-
<body class="flex flex-col items-center justify-center h-screen bg-white">
13+
<body class="flex flex-col items-center justify-center h-screen bg-white">
1214
<div class="flex flex-row">
13-
<img src="/assets/logo.png" class="h-12" alt="logo">
14-
<h1 class="text-3xl font-bold mb-2">arewefastyet</h1>
15+
<img src="/assets/logo.png" class="h-12" alt="logo" />
16+
<h1 class="text-3xl font-bold mb-2">arewefastyet</h1>
1517
</div>
1618
<h2 class="text-5xl font-semibold text-orange-500 mb-8">Admin Login</h2>
17-
<img src="/assets/github-icon.png" alt="GitHub Icon" class="w-32 h-32">
19+
<img src="/assets/github-icon.png" alt="GitHub Icon" class="w-32 h-32" />
1820
<button
19-
class="bg-black text-white flex items-center justify-center gap-2 px-4 py-2 rounded-md hover:bg-gray-800 transition mx-auto">
20-
<a href="/admin/login">Sign in with GitHub</a>
21+
class="bg-black text-white flex items-center justify-center gap-2 px-4 py-2 rounded-md hover:bg-gray-800 transition mx-auto"
22+
>
23+
<a href="/admin/login">Sign in with GitHub</a>
2124
</button>
22-
</body>
23-
24-
</html>
25+
</body>
26+
</html>

go/admin/templates/sidebar.html

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
11
<div id="sidebar">
2-
<div class="mb-8">
3-
<a href="/admin/dashboard" class="cursor-pointer">
4-
<img src="/assets/logo.png" alt="Logo" class="mb-4" style="max-width: 100px;">
5-
<h1 class="text-3xl font-bold text-orange-600">arewefastyet</h1>
6-
</a>
7-
</div>
8-
<nav>
9-
<ul>
10-
<li class="mb-4">
11-
<a href="/executions" class="text-orange-500 font-semibold">Add new executions</a>
12-
</li>
13-
<li class="mb-4">
14-
<a href="/settings" class="text-gray-500 hover:text-orange-500">Settings</a>
15-
</li>
16-
</ul>
17-
</nav>
2+
<div class="mb-8">
3+
<a href="/admin/dashboard" class="cursor-pointer">
4+
<img
5+
src="/assets/logo.png"
6+
alt="Logo"
7+
class="mb-4"
8+
style="max-width: 100px"
9+
/>
10+
<h1 class="text-3xl font-bold text-orange-600">arewefastyet</h1>
11+
</a>
12+
</div>
13+
<nav>
14+
<ul>
15+
<li class="mb-4">
16+
<a href="/executions" class="text-orange-500 font-semibold"
17+
>Add new executions</a
18+
>
19+
</li>
20+
<li class="mb-4">
21+
<a href="/settings" class="text-gray-500 hover:text-orange-500"
22+
>Settings</a
23+
>
24+
</li>
25+
</ul>
26+
</nav>
1827
</div>

0 commit comments

Comments
 (0)