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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<!doctype html>
<html lang="en" data-theme="light">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Oxibase Workspace</title>
<link
href="https://cdn.jsdelivr.net/npm/daisyui@5"
rel="stylesheet"
type="text/css"
/>
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
<script src="https://unpkg.com/unpoly@3.7.3/unpoly.min.js"></script>
<link
rel="stylesheet"
href="https://unpkg.com/unpoly@3.7.3/unpoly.min.css"
/>
<style>
body {
height: 100vh;
overflow: hidden;
}
up-progress-bar {
background-color: var(--color-primary) !important;
height: 3px !important;
}
.nav-link.up-current {
font-weight: 700;
color: var(--color-primary);
background-color: var(--color-base-200);
}
</style>
</head>
<body>
<div class="drawer lg:drawer-open h-screen">
<input
id="workspace-drawer"
type="checkbox"
class="drawer-toggle"
/>
<div class="drawer-content flex flex-col h-screen overflow-hidden">
<!-- Page Content -->
<main class="flex-1 overflow-y-auto bg-base-200 p-4 lg:p-6">
<div up-main="content" class="h-full">
{% block content %}
<div
class="hero min-h-full bg-base-100 rounded-box shadow-sm"
>
<div class="hero-content text-center">
<div class="max-w-md">
<svg
class="w-24 h-24 text-base-300 mx-auto mb-6"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1"
d="M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"
></path>
</svg>
<h1 class="text-4xl font-bold">Welcome</h1>
<p class="py-6">
Select a table from the explorer or open
the SQL Editor to begin working with
your database.
</p>
<a
href="/workspace/sql_editor"
up-target="[up-main='content']"
class="btn btn-primary"
>Open SQL Editor</a
>
</div>
</div>
</div>
{% endblock %}
</div>
</main>
</div>
<!-- Sidebar -->
<div class="drawer-side z-20 border-r border-base-200">
<label
for="workspace-drawer"
aria-label="close sidebar"
class="drawer-overlay"
></label>
<aside
class="bg-base-100 text-base-content w-72 h-full flex flex-col"
up-main="sidebar"
>
<div
class="p-4 border-b border-base-200 flex items-center justify-between"
>
<svg
class="h-8 w-auto fill-current text-primary"
viewBox="0 0 1200 400"
xmlns="http://www.w3.org/2000/svg"
>
<g
transform="matrix(2.03863,0,0,2.03863,29.2616,58.8983)"
>
<path
d="M11.523,52.781C6.13,75.641 13.015,99.002 29,116C29.961,117.04 29.961,117.04 30.941,118.102C41.414,128.396 57.401,135.075 72,136C73.085,136.079 73.085,136.079 74.191,136.16C102.869,137.247 129.022,119.619 139.716,93.234C141.99,87.016 143.689,80.63 144,74C144.052,73.207 144.103,72.414 144.156,71.598C145.116,44.357 129.517,17.777 104.053,7.19C65.161,-7.56 22.664,11.366 11.523,52.781ZM124.994,30.518C134.158,46.3 132.901,62.51 122,77C119.254,80.137 116.341,83.08 113.383,86.016C112.558,86.842 111.734,87.669 110.91,88.497C109.195,90.216 107.475,91.93 105.751,93.64C103.561,95.813 101.383,98.001 99.21,100.192C97.108,102.307 94.995,104.411 92.883,106.516C92.112,107.293 91.341,108.07 90.546,108.871C76.804,122.437 60.256,127.521 42,119C27.399,110.426 20.898,95.454 23,79C25.739,67.734 32.026,60.645 40.008,52.621C40.897,51.722 41.787,50.824 42.676,49.925C44.537,48.048 46.402,46.175 48.27,44.305C50.642,41.928 52.997,39.534 55.349,37.137C57.18,35.276 59.022,33.427 60.868,31.58C61.74,30.704 62.608,29.823 63.472,28.938C80.377,11.653 109.92,7.495 124.994,30.518Z"
style="fill-rule: nonzero"
/>
</g>
</svg>
<div class="flex gap-1">
<a
href="/workspace/sidebar"
up-target="#schema-tree"
class="btn btn-xs btn-ghost btn-square"
title="Refresh"
>
<svg
class="w-4 h-4"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"
></path>
</svg>
</a>
<a
href="/workspace/meta/tables/new"
up-layer="new modal"
class="btn btn-xs btn-ghost btn-square text-success"
title="New Table"
>
<svg
class="w-4 h-4"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 4v16m8-8H4"
></path>
</svg>
</a>
</div>
</div>
<ul class="menu w-full p-2 border-b border-base-200" up-nav>
<li>
<a
href="/workspace/sql_editor"
up-target="[up-main='content']"
class="nav-link"
>
<svg
class="w-4 h-4"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
></path>
</svg>
SQL Editor
</a>
</li>
</ul>
<div id="schema-tree" class="flex-1 overflow-y-auto p-2">
{% block sidebar %}
<div
class="p-4 text-center text-sm opacity-50 animate-pulse"
>
Loading schema...
</div>
{% endblock %}
</div>
</aside>
</div>
</div>
<script>
up.compiler("#schema-tree", function (element) {
if (element.textContent.includes("Loading schema")) {
up.render({
url: "/workspace/sidebar",
target: "#schema-tree",
});
}
});
</script>
</body>
</html>