Skip to content

Commit

Permalink
feat: format
Browse files Browse the repository at this point in the history
Signed-off-by: Jad Chahed <[email protected]>
  • Loading branch information
Jad31 committed Aug 30, 2024
1 parent 5e4e678 commit b2b776c
Show file tree
Hide file tree
Showing 5 changed files with 196 additions and 109 deletions.
52 changes: 24 additions & 28 deletions go/admin/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,38 +1,34 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Admin Dashboard</title>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
<link
href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
rel="stylesheet"
/>
<script src="https://unpkg.com/[email protected]"></script>
</head>
</head>

<body class="bg-gray-900">
<body class="bg-gray-900">
<div class="flex h-screen">
<!-- Sidebar -->
<div class="bg-white w-1/4 p-4">
<div>
<div>{{ template "sidebar.html" . }}</div>
</div>
<div class="bg-white w-1/4 p-4">
<div>
<div>{{ template "sidebar.html" . }}</div>
</div>
</div>
<div class="bg-white flex-1 p-8">
<div id="header">
<div>{{ template "header.html" . }}</div>
</div>

<!-- Main Content -->
<div class="bg-white flex-1 p-8">
<!-- Header -->
<div id="header">
<div>{{ template "header.html" . }}</div>
</div>

<!-- Dynamic Content -->
<div id="content" class="mt-4">
<div>
<div>{{ template "content.html" . }}</div>
</div>
</div>
<div id="content" class="mt-4">
<div>
<div>{{ template "content.html" . }}</div>
</div>
</div>
</div>
</div>
</body>

</html>
</body>
</html>
167 changes: 120 additions & 47 deletions go/admin/templates/content.html
Original file line number Diff line number Diff line change
@@ -1,49 +1,122 @@
<div id="content">
<form>
<div class="flex flex-row gap-4">
<div>
<label class="label">Source</label>
<input
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
type="text" name="source">
</div>
<div>
<label class="label">SHA</label>
<input
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
type="text" class="form-control" name="sha">
</div>
</div>
<label>Workloads</label>
<div class="flex flex-row gap-4">
<div class="flex flex-col">
<label><input class="accent-orange-500" type="checkbox" name="workloads" value="all" checked>
All</label>
<label><input class="accent-orange-500" type="checkbox" name="workloads" value="OLTP"> OLTP</label>
<label><input class="accent-orange-500" type="checkbox" name="workloads" value="OLTP-READONLY">
OLTP-READONLY</label>
<label><input class="accent-orange-500" type="checkbox" name="workloads" value="OLTP-SET">
OLTP-SET</label>
</div>
<div class="flex flex-col">
<label><input class="accent-orange-500" type="checkbox" name="workloads" value="TPCC"> TPCC</label>
<label><input class="accent-orange-500" type="checkbox" name="workloads" value="TPCC_FK">
TPCC_FK</label>
<label><input class="accent-orange-500" type="checkbox" name="workloads" value="TPCC_FK_UNMANAGED">
TPCC_FK_UNMANAGED</label>
<label><input class="accent-orange-500" type="checkbox" name="workloads" value="TPCC_UNSHARDED">
TPCC_UNSHARDED</label>
</div>
</div>
<div>
<label class="label">Number of executions</label>
<input
class="shadow appearance-none border rounded w-20 py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
type="number" name="numberOfExecutions" value="1" min="1" max="10">
</div>
<form>
<div class="flex flex-row gap-4">
<div>
<label class="label">Source</label>
<input
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
type="text"
name="source"
/>
</div>
<div>
<label class="label">SHA</label>
<input
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
type="text"
class="form-control"
name="sha"
/>
</div>
</div>
<label>Workloads</label>
<div class="flex flex-row gap-4">
<div class="flex flex-col">
<label
><input
class="accent-orange-500"
type="checkbox"
name="workloads"
value="all"
checked
/>
All</label
>
<label
><input
class="accent-orange-500"
type="checkbox"
name="workloads"
value="OLTP"
/>
OLTP</label
>
<label
><input
class="accent-orange-500"
type="checkbox"
name="workloads"
value="OLTP-READONLY"
/>
OLTP-READONLY</label
>
<label
><input
class="accent-orange-500"
type="checkbox"
name="workloads"
value="OLTP-SET"
/>
OLTP-SET</label
>
</div>
<div class="flex flex-col">
<label
><input
class="accent-orange-500"
type="checkbox"
name="workloads"
value="TPCC"
/>
TPCC</label
>
<label
><input
class="accent-orange-500"
type="checkbox"
name="workloads"
value="TPCC_FK"
/>
TPCC_FK</label
>
<label
><input
class="accent-orange-500"
type="checkbox"
name="workloads"
value="TPCC_FK_UNMANAGED"
/>
TPCC_FK_UNMANAGED</label
>
<label
><input
class="accent-orange-500"
type="checkbox"
name="workloads"
value="TPCC_UNSHARDED"
/>
TPCC_UNSHARDED</label
>
</div>
</div>
<div>
<label class="label">Number of executions</label>
<input
class="shadow appearance-none border rounded w-20 py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
type="number"
name="numberOfExecutions"
value="1"
min="1"
max="10"
/>
</div>

<button hx-post="/admin/executions/add"
class="bg-orange-500 hover:bg-orange-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline"
type="submit">Add Execution</button>
</form>
</div>
<button
hx-post="/admin/executions/add"
class="bg-orange-500 hover:bg-orange-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline"
type="submit"
>
Add Execution
</button>
</form>
</div>
13 changes: 10 additions & 3 deletions go/admin/templates/header.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<div class="border-b-2 pb-4 mb-6 w-full flex justify-between text-center flex-wrap">
<h2 class="text-2xl font-bold text-gray-700">Admin Dashboard</h2>
<a href="https://benchmark.vitess.io/" target="_blank" class="text-orange-500 align-middle">arewefastyet website</a>
<div
class="border-b-2 pb-4 mb-6 w-full flex justify-between text-center flex-wrap"
>
<h2 class="text-2xl font-bold text-gray-700">Admin Dashboard</h2>
<a
href="https://benchmark.vitess.io/"
target="_blank"
class="text-orange-500 align-middle"
>arewefastyet website</a
>
</div>
32 changes: 17 additions & 15 deletions go/admin/templates/login.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Admin Login Page</title>
<link href="https://unpkg.com/[email protected]/dist/tailwind.min.css" rel="stylesheet">
</head>
<link
href="https://unpkg.com/[email protected]/dist/tailwind.min.css"
rel="stylesheet"
/>
</head>

<body class="flex flex-col items-center justify-center h-screen bg-white">
<body class="flex flex-col items-center justify-center h-screen bg-white">
<div class="flex flex-row">
<img src="/assets/logo.png" class="h-12" alt="logo">
<h1 class="text-3xl font-bold mb-2">arewefastyet</h1>
<img src="/assets/logo.png" class="h-12" alt="logo" />
<h1 class="text-3xl font-bold mb-2">arewefastyet</h1>
</div>
<h2 class="text-5xl font-semibold text-orange-500 mb-8">Admin Login</h2>
<img src="/assets/github-icon.png" alt="GitHub Icon" class="w-32 h-32">
<img src="/assets/github-icon.png" alt="GitHub Icon" class="w-32 h-32" />
<button
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">
<a href="/admin/login">Sign in with GitHub</a>
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"
>
<a href="/admin/login">Sign in with GitHub</a>
</button>
</body>

</html>
</body>
</html>
41 changes: 25 additions & 16 deletions go/admin/templates/sidebar.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
<div id="sidebar">
<div class="mb-8">
<a href="/admin/dashboard" class="cursor-pointer">
<img src="/assets/logo.png" alt="Logo" class="mb-4" style="max-width: 100px;">
<h1 class="text-3xl font-bold text-orange-600">arewefastyet</h1>
</a>
</div>
<nav>
<ul>
<li class="mb-4">
<a href="/executions" class="text-orange-500 font-semibold">Add new executions</a>
</li>
<li class="mb-4">
<a href="/settings" class="text-gray-500 hover:text-orange-500">Settings</a>
</li>
</ul>
</nav>
<div class="mb-8">
<a href="/admin/dashboard" class="cursor-pointer">
<img
src="/assets/logo.png"
alt="Logo"
class="mb-4"
style="max-width: 100px"
/>
<h1 class="text-3xl font-bold text-orange-600">arewefastyet</h1>
</a>
</div>
<nav>
<ul>
<li class="mb-4">
<a href="/executions" class="text-orange-500 font-semibold"
>Add new executions</a
>
</li>
<li class="mb-4">
<a href="/settings" class="text-gray-500 hover:text-orange-500"
>Settings</a
>
</li>
</ul>
</nav>
</div>

0 comments on commit b2b776c

Please sign in to comment.