admindb 2.6.0 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -20
- package/dist/db/dialects/postgres/introspector.js +70 -70
- package/dist/public/css/app.css +2 -1
- package/dist/views/pages/error.hbs +1 -10
- package/dist/views/pages/seed-select.hbs +252 -1
- package/dist/views/pages/seed.hbs +307 -1
- package/dist/views/pages/sync.hbs +1 -409
- package/docs/EXAMPLES.md +579 -579
- package/docs/SECURITY.md +265 -265
- package/package.json +9 -3
|
@@ -1 +1,307 @@
|
|
|
1
|
-
<div class="space-y-4 pb-20">
|
|
2
1
|
<div class="app-card p-3.5 flex flex-wrap items-center justify-between gap-4">
|
|
3
2
|
<div class="flex items-center gap-3 min-w-0">
|
|
4
3
|
<a href="{{basePath}}/seed/{{encodeUri dbId}}" class="btn btn-sm btn-ghost btn-square text-base-content/70 hover:text-base-content" title="Choose table & mode">
|
|
5
4
|
{{{icon "arrowLeft" class="h-4 w-4"}}}
|
|
6
5
|
</a>
|
|
7
6
|
<div class="h-4 w-px bg-base-300"></div>
|
|
8
7
|
<div class="flex items-center gap-2 flex-wrap">
|
|
9
8
|
<a href="{{basePath}}/seed/{{encodeUri dbId}}" class="text-xs font-semibold text-base-content/50 hover:text-primary transition-colors">Seed Data</a>
|
|
10
9
|
<span class="text-xs text-base-content/30">/</span>
|
|
11
10
|
{{#if allTables.length}}
|
|
12
11
|
<div class="dropdown dropdown-bottom">
|
|
13
12
|
<label tabindex="0" class="btn btn-xs btn-ghost gap-1 font-mono font-bold text-xs" title="Switch table">
|
|
14
13
|
<span>{{table}}</span>
|
|
15
14
|
{{{icon "chevronDown" class="h-3 w-3 opacity-60"}}}
|
|
16
15
|
</label>
|
|
17
16
|
<ul tabindex="0" class="dropdown-content z-30 menu p-1 shadow-lg bg-base-100 border border-base-300 rounded-box w-52 max-h-60 overflow-y-auto">
|
|
18
17
|
{{#each allTables}}
|
|
19
18
|
<li>
|
|
20
19
|
<a href="{{../basePath}}/seed/{{encodeUri ../dbId}}/{{encodeUri this}}" class="{{#if (eq this ../table)}}active font-bold{{/if}} font-mono text-xs">
|
|
21
20
|
{{{icon "table" class="h-3.5 w-3.5"}}}
|
|
22
21
|
{{this}}
|
|
23
22
|
</a>
|
|
24
23
|
</li>
|
|
25
24
|
{{/each}}
|
|
26
25
|
</ul>
|
|
27
26
|
</div>
|
|
28
27
|
{{else}}
|
|
29
28
|
<span class="font-mono font-bold text-sm text-base-content">{{table}}</span>
|
|
30
29
|
{{/if}}
|
|
31
30
|
<span class="badge badge-sm badge-ghost font-mono text-[11px] text-base-content/60">{{colCount}} cols</span>
|
|
32
31
|
{{#if dialect}}
|
|
33
32
|
<span class="badge badge-sm badge-outline font-mono text-[10px] uppercase text-base-content/50">{{dialect}}</span>
|
|
34
33
|
{{/if}}
|
|
35
34
|
</div>
|
|
36
35
|
</div>
|
|
37
36
|
<div class="flex items-center gap-2.5 flex-wrap">
|
|
38
37
|
<div class="seed-mode-segment">
|
|
39
38
|
<button type="button" id="btn-select-single" class="seed-mode-btn {{#unless isChainMode}}active{{/unless}}">
|
|
40
39
|
{{{icon "table" class="h-3.5 w-3.5"}}}
|
|
41
40
|
<span>Single Table</span>
|
|
42
41
|
</button>
|
|
43
42
|
<button type="button" id="btn-select-chain" class="seed-mode-btn {{#if isChainMode}}active{{/if}}">
|
|
44
43
|
{{{icon "diagram" class="h-3.5 w-3.5"}}}
|
|
45
44
|
<span>ER Chain</span>
|
|
46
45
|
</button>
|
|
47
46
|
</div>
|
|
48
47
|
<div class="h-4 w-px bg-base-300 hidden sm:block"></div>
|
|
49
48
|
<div class="flex items-center gap-1.5" title="Numeric seed for deterministic generation">
|
|
50
49
|
<div class="relative">
|
|
51
50
|
<input id="plan-seed-input" type="number" placeholder="Seed (auto)"
|
|
52
51
|
class="field-input w-28 font-mono text-xs !py-1 pl-2.5 pr-6" />
|
|
53
52
|
<span class="absolute right-2 top-1/2 -translate-y-1/2 text-[10px] font-mono text-base-content/40">#</span>
|
|
54
53
|
</div>
|
|
55
54
|
<button type="button" id="btn-random-seed" class="btn btn-sm btn-ghost btn-square text-base-content/70 hover:text-base-content" title="Roll random seed">
|
|
56
55
|
{{{icon "refresh" class="h-3.5 w-3.5"}}}
|
|
57
56
|
</button>
|
|
58
57
|
</div>
|
|
59
58
|
<div class="h-4 w-px bg-base-300 hidden sm:block"></div>
|
|
60
59
|
<div class="flex items-center gap-1">
|
|
61
60
|
<button type="button" id="btn-profiles-modal" class="btn btn-sm btn-ghost gap-1.5 text-xs text-base-content/80 hover:text-base-content" title="Manage seed profiles">
|
|
62
61
|
{{{icon "book" class="h-3.5 w-3.5 text-primary"}}}
|
|
63
62
|
<span class="hidden md:inline">Profiles</span>
|
|
64
63
|
</button>
|
|
65
64
|
<button type="button" id="btn-export-plan-json" class="btn btn-sm btn-ghost btn-square text-base-content/70 hover:text-base-content" title="Export generation plan JSON">
|
|
66
65
|
{{{icon "download" class="h-3.5 w-3.5"}}}
|
|
67
66
|
</button>
|
|
68
67
|
<label for="input-import-plan-json" class="btn btn-sm btn-ghost btn-square text-base-content/70 hover:text-base-content cursor-pointer" title="Import generation plan JSON">
|
|
69
68
|
{{{icon "upload" class="h-3.5 w-3.5"}}}
|
|
70
69
|
<input type="file" id="input-import-plan-json" accept=".json" class="hidden" />
|
|
71
70
|
</label>
|
|
72
71
|
</div>
|
|
73
72
|
<div class="h-4 w-px bg-base-300 hidden sm:block"></div>
|
|
74
73
|
<button id="seed-insert" type="button" class="btn btn-primary btn-sm gap-2 font-bold px-4 shadow-sm">
|
|
75
74
|
{{{icon "play" class="h-3.5 w-3.5"}}}
|
|
76
75
|
<span>Execute Seed</span>
|
|
77
76
|
</button>
|
|
78
77
|
</div>
|
|
79
78
|
</div>
|
|
80
79
|
<div id="step-content-1" class="hidden">
|
|
81
80
|
<button id="btn-next-1" class="hidden"></button>
|
|
82
81
|
</div>
|
|
83
82
|
<div id="step-content-2" class="contents">
|
|
84
83
|
<button id="btn-prev-2" class="hidden"></button>
|
|
85
84
|
<button id="btn-next-2" class="hidden"></button>
|
|
86
85
|
</div>
|
|
87
86
|
<div id="step-content-3" class="contents">
|
|
88
87
|
<button id="btn-prev-3" class="hidden"></button>
|
|
89
88
|
</div>
|
|
90
89
|
<div id="step-nav-1" class="hidden"><div class="seed-step-circle"><span class="seed-step-num"></span><span class="seed-step-check"></span></div></div>
|
|
91
90
|
<div id="step-nav-2" class="hidden"><div class="seed-step-circle"><span class="seed-step-num"></span><span class="seed-step-check"></span></div></div>
|
|
92
91
|
<div id="step-nav-3" class="hidden"><div class="seed-step-circle"><span class="seed-step-num"></span><span class="seed-step-check"></span></div></div>
|
|
93
92
|
<div id="wizard-progress-bar" class="hidden"></div>
|
|
94
93
|
<div class="grid grid-cols-1 xl:grid-cols-12 gap-4 items-start">
|
|
95
94
|
<div class="xl:col-span-7 space-y-4">
|
|
96
95
|
<div id="config-single" class="{{#if isChainMode}}hidden{{/if}} space-y-4">
|
|
97
96
|
<div class="app-card p-3.5 flex flex-wrap items-center justify-between gap-4">
|
|
98
97
|
<div class="flex items-center gap-3">
|
|
99
98
|
<div class="flex items-center">
|
|
100
99
|
<button type="button" id="seed-count-dec" class="btn btn-xs btn-outline rounded-r-none border-r-0 px-2.5 font-mono text-sm hover:bg-primary hover:text-primary-content hover:border-primary">−</button>
|
|
101
100
|
<input id="seed-count" type="number" value="10" min="1" max="{{maxRows}}"
|
|
102
101
|
class="field-input !rounded-none border-x-0 !py-0.5 font-mono w-20 font-bold text-xs text-center [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none" />
|
|
103
102
|
<button type="button" id="seed-count-inc" class="btn btn-xs btn-outline rounded-l-none border-l-0 px-2.5 font-mono text-sm hover:bg-primary hover:text-primary-content hover:border-primary">+</button>
|
|
104
103
|
</div>
|
|
105
104
|
<span class="text-[11px] uppercase font-bold text-base-content/50">Rows</span>
|
|
106
105
|
<div class="h-4 w-px bg-base-200 hidden sm:block"></div>
|
|
107
106
|
<div class="flex gap-1 flex-wrap">
|
|
108
107
|
{{#each quickCounts}}
|
|
109
108
|
<button type="button" class="preset-pill btn btn-xs btn-ghost border border-base-300 font-mono text-[11px] px-2" data-count="{{this}}">{{this}}</button>
|
|
110
109
|
{{/each}}
|
|
111
110
|
</div>
|
|
112
111
|
</div>
|
|
113
112
|
<div class="flex items-center gap-2 w-full sm:w-auto">
|
|
114
113
|
<input type="text" id="seed-col-search" placeholder="Filter columns…" class="field-input text-xs !py-1 w-full sm:w-48" />
|
|
115
114
|
<span id="col-count-badge" class="badge badge-sm badge-ghost font-mono text-[11px] shrink-0">{{colCount}} cols</span>
|
|
116
115
|
</div>
|
|
117
116
|
</div>
|
|
118
117
|
<div class="app-card p-4 space-y-3">
|
|
119
118
|
<div class="flex items-center justify-between pb-2 border-b border-base-200">
|
|
120
119
|
<span class="text-xs font-bold uppercase tracking-wider text-base-content/70">Columns Specification</span>
|
|
121
120
|
<span class="text-[11px] text-base-content/40">Select generator strategy & customize parameters per column</span>
|
|
122
121
|
</div>
|
|
123
122
|
<div id="seed-columns" class="space-y-2.5">
|
|
124
123
|
</div>
|
|
125
124
|
</div>
|
|
126
125
|
</div>
|
|
127
126
|
<div id="config-chain" class="{{#unless isChainMode}}hidden{{/unless}} space-y-4">
|
|
128
127
|
<div class="app-card p-3.5 flex flex-wrap items-center justify-between gap-4">
|
|
129
128
|
<div class="flex items-center gap-3">
|
|
130
129
|
<label class="text-xs font-bold text-base-content/70">Graph Scope:</label>
|
|
131
130
|
<select id="chain-scope" class="field-select !py-1 text-xs font-semibold w-52">
|
|
132
131
|
<option value="chain">Connected Relational Chain</option>
|
|
133
132
|
<option value="ancestors">Upstream Parents Only</option>
|
|
134
133
|
<option value="descendants">Downstream Children Only</option>
|
|
135
134
|
<option value="all">Entire Database (All Tables)</option>
|
|
136
135
|
</select>
|
|
137
136
|
</div>
|
|
138
137
|
<div class="flex items-center gap-2">
|
|
139
138
|
<span class="text-xs font-bold text-base-content/70">Scale:</span>
|
|
140
139
|
<div class="join">
|
|
141
140
|
<button type="button" class="chain-scale-btn btn btn-xs join-item font-mono" data-scale="0.5">0.5×</button>
|
|
142
141
|
<button type="button" class="chain-scale-btn btn btn-xs join-item btn-neutral font-mono" data-scale="1">1×</button>
|
|
143
142
|
<button type="button" class="chain-scale-btn btn btn-xs join-item font-mono" data-scale="2">2×</button>
|
|
144
143
|
<button type="button" class="chain-scale-btn btn btn-xs join-item font-mono" data-scale="5">5×</button>
|
|
145
144
|
</div>
|
|
146
145
|
<span id="chain-summary-badge" class="badge badge-sm badge-primary font-mono font-bold ml-2">0 Tables</span>
|
|
147
146
|
</div>
|
|
148
147
|
</div>
|
|
149
148
|
<div class="app-card p-4 space-y-3">
|
|
150
149
|
<div class="flex items-center justify-between pb-2 border-b border-base-200">
|
|
151
150
|
<span class="text-xs font-bold uppercase tracking-wider text-base-content/70">Topological Execution Pipeline</span>
|
|
152
151
|
<span class="text-[11px] text-base-content/40">Dependencies ordered upstream-first</span>
|
|
153
152
|
</div>
|
|
154
153
|
<div id="chain-pipeline-container" class="space-y-2.5">
|
|
155
154
|
</div>
|
|
156
155
|
</div>
|
|
157
156
|
</div>
|
|
158
157
|
<details class="app-card group">
|
|
159
158
|
<summary class="p-3.5 flex items-center justify-between cursor-pointer list-none select-none text-xs font-bold text-base-content/70 hover:text-base-content">
|
|
160
159
|
<div class="flex items-center gap-2">
|
|
161
160
|
{{{icon "settings" class="h-3.5 w-3.5"}}}
|
|
162
161
|
<span>Advanced Execution Options</span>
|
|
163
162
|
</div>
|
|
164
163
|
<span class="text-xs text-base-content/40 group-open:rotate-180 transition-transform">▼</span>
|
|
165
164
|
</summary>
|
|
166
165
|
<div class="p-3.5 pt-0 border-t border-base-200/80 mt-1 flex flex-wrap items-center gap-6 text-xs">
|
|
167
166
|
<label class="cursor-pointer flex items-center gap-2 select-none group">
|
|
168
167
|
<input id="plan-transaction-opt" type="checkbox" checked class="checkbox checkbox-primary checkbox-xs" />
|
|
169
168
|
<span class="font-medium text-base-content/80 group-hover:text-base-content">Wrap in Transaction (BEGIN ... COMMIT)</span>
|
|
170
169
|
</label>
|
|
171
170
|
<label class="cursor-pointer flex items-center gap-2 select-none group">
|
|
172
171
|
<input id="plan-rollback-opt" type="checkbox" checked class="checkbox checkbox-primary checkbox-xs" />
|
|
173
172
|
<span class="font-medium text-base-content/80 group-hover:text-base-content">Atomic Rollback on Error</span>
|
|
174
173
|
</label>
|
|
175
174
|
<label class="cursor-pointer flex items-center gap-2 select-none group">
|
|
176
175
|
<input id="seed-truncate" type="checkbox" class="checkbox checkbox-error checkbox-xs" />
|
|
177
176
|
<span class="font-medium text-error/90 group-hover:text-error">Clear tables before inserting (Truncate)</span>
|
|
178
177
|
</label>
|
|
179
178
|
</div>
|
|
180
179
|
</details>
|
|
181
180
|
</div>
|
|
182
181
|
<div class="xl:col-span-5 space-y-4 xl:sticky xl:top-4">
|
|
183
182
|
<div id="validation-report-card" class="app-card p-3.5 space-y-2">
|
|
184
183
|
<div class="flex items-center justify-between">
|
|
185
184
|
<div id="validation-summary-pill" class="flex items-center gap-2">
|
|
186
185
|
<span id="validation-status-dot" class="w-2 h-2 rounded-full bg-success"></span>
|
|
187
186
|
<span id="validation-status-text" class="text-xs font-mono font-bold text-base-content">Plan Ready</span>
|
|
188
187
|
</div>
|
|
189
188
|
<span id="validation-summary-chip" class="badge badge-sm badge-success font-mono text-[10px] font-bold">All Checks Passed</span>
|
|
190
189
|
</div>
|
|
191
190
|
<div id="validation-issues-list" class="space-y-1.5 text-xs">
|
|
192
191
|
<div class="flex items-center gap-2 text-success font-medium text-[11px]">
|
|
193
192
|
{{{icon "check" class="h-3.5 w-3.5 shrink-0"}}}
|
|
194
193
|
<span>Primary key & constraint strategies valid</span>
|
|
195
194
|
</div>
|
|
196
195
|
</div>
|
|
197
196
|
</div>
|
|
198
197
|
<div class="app-card overflow-hidden">
|
|
199
198
|
<div class="flex items-center justify-between p-3 border-b border-base-200 bg-base-100 gap-2 flex-wrap">
|
|
200
199
|
<div class="join">
|
|
201
200
|
<button type="button" id="preview-tab-grid" class="btn btn-xs join-item btn-active font-bold">Table Preview</button>
|
|
202
201
|
<button type="button" id="preview-tab-sql" class="btn btn-xs join-item font-bold">SQL Script</button>
|
|
203
202
|
</div>
|
|
204
203
|
<button id="seed-refresh-preview" type="button" class="btn btn-xs btn-ghost gap-1 text-xs text-base-content/70 hover:text-primary">
|
|
205
204
|
{{{icon "refresh" class="h-3 w-3"}}}
|
|
206
205
|
<span>Refresh</span>
|
|
207
206
|
</button>
|
|
208
207
|
</div>
|
|
209
208
|
<div id="seed-chain-table-tabs" class="tabs tabs-bordered flex-nowrap w-full overflow-x-auto hidden px-3 py-1 bg-base-200/40 border-b border-base-200 text-xs"></div>
|
|
210
209
|
<div id="preview-view-grid">
|
|
211
210
|
<div class="overflow-x-auto max-h-[440px]">
|
|
212
211
|
<table class="table table-zebra table-pin-rows table-xs w-full">
|
|
213
212
|
<thead id="seed-preview-thead" class="bg-base-200/90 text-[10px] uppercase font-mono tracking-wider text-base-content/70 backdrop-blur sticky top-0 z-10"></thead>
|
|
214
213
|
<tbody id="seed-preview-tbody" class="font-mono text-[11px]">
|
|
215
214
|
<tr>
|
|
216
215
|
<td colspan="100" class="text-center py-12 opacity-50">
|
|
217
216
|
<div class="flex flex-col items-center gap-2">
|
|
218
217
|
<span class="loading loading-spinner loading-sm text-primary"></span>
|
|
219
218
|
<span class="text-xs">Generating preview…</span>
|
|
220
219
|
</div>
|
|
221
220
|
</td>
|
|
222
221
|
</tr>
|
|
223
222
|
</tbody>
|
|
224
223
|
</table>
|
|
225
224
|
</div>
|
|
226
225
|
</div>
|
|
227
226
|
<div id="preview-view-sql" class="hidden p-3 bg-base-200/20 space-y-2">
|
|
228
227
|
<div class="flex items-center justify-between">
|
|
229
228
|
<span class="text-[11px] font-mono text-base-content/50 uppercase font-bold">Generated SQL (Preview)</span>
|
|
230
229
|
<button type="button" id="btn-copy-sql" class="btn btn-xs btn-outline gap-1 text-[11px]">
|
|
231
230
|
{{{icon "copy" class="h-3 w-3"}}}
|
|
232
231
|
<span>Copy SQL</span>
|
|
233
232
|
</button>
|
|
234
233
|
</div>
|
|
235
234
|
<pre id="preview-sql-code" class="bg-neutral text-neutral-content p-3.5 rounded-lg font-mono text-xs overflow-x-auto max-h-[380px] border border-base-300 leading-relaxed"></pre>
|
|
236
235
|
</div>
|
|
237
236
|
</div>
|
|
238
237
|
<div id="seed-truncate-banner" class="hidden p-3 rounded-lg bg-error/10 border border-error/20 flex items-center gap-2.5">
|
|
239
238
|
<span class="text-error shrink-0">{{{icon "warning" class="h-4 w-4"}}}</span>
|
|
240
239
|
<p class="text-xs font-bold text-error">
|
|
241
240
|
Destructive Action: Existing table rows will be truncated before seeding.
|
|
242
241
|
</p>
|
|
243
242
|
</div>
|
|
244
243
|
<div id="seed-execute-bar" class="hidden"></div>
|
|
245
244
|
<div id="seed-feedback" class="hidden"></div>
|
|
246
245
|
</div>
|
|
247
246
|
</div>
|
|
248
247
|
<div class="modal-box p-0 overflow-hidden max-w-lg rounded-2xl border border-base-200 shadow-xl">
|
|
249
248
|
<div class="px-5 py-4 bg-base-200/50 border-b border-base-200 flex items-center justify-between">
|
|
250
249
|
<div class="flex items-center gap-2.5">
|
|
251
250
|
{{{icon "book" class="h-4 w-4 text-primary"}}}
|
|
252
251
|
<h3 class="font-bold text-sm text-base-content">Seed Profiles & Presets</h3>
|
|
253
252
|
</div>
|
|
254
253
|
<button type="button" class="btn btn-xs btn-circle btn-ghost" id="btn-close-profiles">✕</button>
|
|
255
254
|
</div>
|
|
256
255
|
<div class="p-5 space-y-4 text-xs">
|
|
257
256
|
<div>
|
|
258
257
|
<h4 class="font-bold text-[10px] uppercase tracking-wider text-base-content/50 mb-2">Quick Blueprints</h4>
|
|
259
258
|
<div class="grid grid-cols-3 gap-2">
|
|
260
259
|
<button type="button" class="btn-preset-profile btn btn-xs btn-outline font-mono" data-preset="smoke">⚡ Smoke (10)</button>
|
|
261
260
|
<button type="button" class="btn-preset-profile btn btn-xs btn-outline font-mono" data-preset="realistic">🌱 Standard (100)</button>
|
|
262
261
|
<button type="button" class="btn-preset-profile btn btn-xs btn-outline font-mono" data-preset="stress">🚀 Stress (1000)</button>
|
|
263
262
|
</div>
|
|
264
263
|
</div>
|
|
265
264
|
<div class="p-3 rounded-lg bg-base-200/40 border border-base-300 space-y-2">
|
|
266
265
|
<h4 class="font-bold text-[10px] uppercase tracking-wider text-base-content/60">Save Current Configuration</h4>
|
|
267
266
|
<div class="flex gap-2">
|
|
268
267
|
<input id="profile-name-input" type="text" placeholder="Profile name (e.g. Test Dataset)"
|
|
269
268
|
class="field-input flex-1 text-xs !py-1 font-medium" />
|
|
270
269
|
<button type="button" id="btn-save-profile" class="btn btn-xs btn-primary px-3 font-bold">Save</button>
|
|
271
270
|
</div>
|
|
272
271
|
</div>
|
|
273
272
|
<div>
|
|
274
273
|
<h4 class="font-bold text-[10px] uppercase tracking-wider text-base-content/50 mb-1.5">Saved Profiles</h4>
|
|
275
274
|
<div id="profiles-list-container" class="space-y-1.5 max-h-48 overflow-y-auto pr-1">
|
|
276
275
|
<div class="py-4 text-center text-xs text-base-content/40">No saved profiles yet.</div>
|
|
277
276
|
</div>
|
|
278
277
|
</div>
|
|
279
278
|
</div>
|
|
280
279
|
</div>
|
|
281
280
|
<form method="dialog" class="modal-backdrop bg-base-300/60 backdrop-blur-sm"><button>close</button></form>
|
|
282
281
|
<div class="modal-box p-0 overflow-hidden max-w-md rounded-2xl border border-error/20 shadow-xl">
|
|
283
282
|
<div class="px-5 py-4 bg-error/5 border-b border-error/15 flex items-center gap-2.5">
|
|
284
283
|
<span class="text-error">{{{icon "warning" class="h-5 w-5"}}}</span>
|
|
285
284
|
<h3 class="font-bold text-sm text-error">Confirm Truncate Action</h3>
|
|
286
285
|
</div>
|
|
287
286
|
<div class="p-5 space-y-3 text-xs text-base-content/80 leading-relaxed">
|
|
288
287
|
<p>
|
|
289
288
|
You have enabled <strong class="text-error">Clear tables before inserting</strong>. All existing records in affected tables will be permanently deleted in reverse topological order before new rows are inserted.
|
|
290
289
|
</p>
|
|
291
290
|
</div>
|
|
292
291
|
<div class="px-5 pb-4 flex items-center justify-end gap-2">
|
|
293
292
|
<button type="button" class="btn btn-ghost btn-xs" id="seed-truncate-cancel">Cancel</button>
|
|
294
293
|
<button type="button" class="btn btn-error btn-xs font-bold gap-1.5" id="seed-truncate-confirm">
|
|
295
294
|
{{{icon "warning" class="h-3.5 w-3.5"}}}
|
|
296
295
|
<span>Yes, Truncate & Seed</span>
|
|
297
296
|
</button>
|
|
298
297
|
</div>
|
|
299
298
|
</div>
|
|
300
299
|
<form method="dialog" class="modal-backdrop bg-base-300/60 backdrop-blur-sm"><button>close</button></form>
|
|
300
|
+
<div class="space-y-4 pb-20">
|
|
301
|
+
<div class="app-card p-3.5 flex flex-wrap items-center justify-between gap-4">
|
|
302
|
+
<div class="flex items-center gap-3 min-w-0">
|
|
303
|
+
<a href="{{basePath}}/seed/{{encodeUri dbId}}" class="btn btn-sm btn-ghost btn-square text-base-content/70 hover:text-base-content" title="Choose table & mode">
|
|
304
|
+
{{{icon "arrowLeft" class="h-4 w-4"}}}
|
|
305
|
+
</a>
|
|
306
|
+
<div class="h-4 w-px bg-base-300"></div>
|
|
307
|
+
<div class="flex items-center gap-2 flex-wrap">
|
|
308
|
+
<a href="{{basePath}}/seed/{{encodeUri dbId}}" class="text-xs font-semibold text-base-content/50 hover:text-primary transition-colors">Seed Data</a>
|
|
309
|
+
<span class="text-xs text-base-content/30">/</span>
|
|
310
|
+
{{#if allTables.length}}
|
|
311
|
+
<div class="dropdown dropdown-bottom">
|
|
312
|
+
<label tabindex="0" class="btn btn-xs btn-ghost gap-1 font-mono font-bold text-xs" title="Switch table">
|
|
313
|
+
<span>{{table}}</span>
|
|
314
|
+
{{{icon "chevronDown" class="h-3 w-3 opacity-60"}}}
|
|
315
|
+
</label>
|
|
316
|
+
<ul tabindex="0" class="dropdown-content z-30 menu p-1 shadow-lg bg-base-100 border border-base-300 rounded-box w-52 max-h-60 overflow-y-auto">
|
|
317
|
+
{{#each allTables}}
|
|
318
|
+
<li>
|
|
319
|
+
<a href="{{../basePath}}/seed/{{encodeUri ../dbId}}/{{encodeUri this}}" class="{{#if (eq this ../table)}}active font-bold{{/if}} font-mono text-xs">
|
|
320
|
+
{{{icon "table" class="h-3.5 w-3.5"}}}
|
|
321
|
+
{{this}}
|
|
322
|
+
</a>
|
|
323
|
+
</li>
|
|
324
|
+
{{/each}}
|
|
325
|
+
</ul>
|
|
326
|
+
</div>
|
|
327
|
+
{{else}}
|
|
328
|
+
<span class="font-mono font-bold text-sm text-base-content">{{table}}</span>
|
|
329
|
+
{{/if}}
|
|
330
|
+
<span class="badge badge-sm badge-ghost font-mono text-[11px] text-base-content/60">{{colCount}} cols</span>
|
|
331
|
+
{{#if dialect}}
|
|
332
|
+
<span class="badge badge-sm badge-outline font-mono text-[10px] uppercase text-base-content/50">{{dialect}}</span>
|
|
333
|
+
{{/if}}
|
|
334
|
+
</div>
|
|
335
|
+
</div>
|
|
336
|
+
<div class="flex items-center gap-2.5 flex-wrap">
|
|
337
|
+
<div class="seed-mode-segment">
|
|
338
|
+
<button type="button" id="btn-select-single" class="seed-mode-btn {{#unless isChainMode}}active{{/unless}}">
|
|
339
|
+
{{{icon "table" class="h-3.5 w-3.5"}}}
|
|
340
|
+
<span>Single Table</span>
|
|
341
|
+
</button>
|
|
342
|
+
<button type="button" id="btn-select-chain" class="seed-mode-btn {{#if isChainMode}}active{{/if}}">
|
|
343
|
+
{{{icon "diagram" class="h-3.5 w-3.5"}}}
|
|
344
|
+
<span>ER Chain</span>
|
|
345
|
+
</button>
|
|
346
|
+
</div>
|
|
347
|
+
<div class="h-4 w-px bg-base-300 hidden sm:block"></div>
|
|
348
|
+
<div class="flex items-center gap-1.5" title="Numeric seed for deterministic generation">
|
|
349
|
+
<div class="relative">
|
|
350
|
+
<input id="plan-seed-input" type="number" placeholder="Seed (auto)"
|
|
351
|
+
class="field-input w-28 font-mono text-xs !py-1 pl-2.5 pr-6" />
|
|
352
|
+
<span class="absolute right-2 top-1/2 -translate-y-1/2 text-[10px] font-mono text-base-content/40">#</span>
|
|
353
|
+
</div>
|
|
354
|
+
<button type="button" id="btn-random-seed" class="btn btn-sm btn-ghost btn-square text-base-content/70 hover:text-base-content" title="Roll random seed">
|
|
355
|
+
{{{icon "refresh" class="h-3.5 w-3.5"}}}
|
|
356
|
+
</button>
|
|
357
|
+
</div>
|
|
358
|
+
<div class="h-4 w-px bg-base-300 hidden sm:block"></div>
|
|
359
|
+
<div class="flex items-center gap-1">
|
|
360
|
+
<button type="button" id="btn-profiles-modal" class="btn btn-sm btn-ghost gap-1.5 text-xs text-base-content/80 hover:text-base-content" title="Manage seed profiles">
|
|
361
|
+
{{{icon "book" class="h-3.5 w-3.5 text-primary"}}}
|
|
362
|
+
<span class="hidden md:inline">Profiles</span>
|
|
363
|
+
</button>
|
|
364
|
+
<button type="button" id="btn-export-plan-json" class="btn btn-sm btn-ghost btn-square text-base-content/70 hover:text-base-content" title="Export generation plan JSON">
|
|
365
|
+
{{{icon "download" class="h-3.5 w-3.5"}}}
|
|
366
|
+
</button>
|
|
367
|
+
<label for="input-import-plan-json" class="btn btn-sm btn-ghost btn-square text-base-content/70 hover:text-base-content cursor-pointer" title="Import generation plan JSON">
|
|
368
|
+
{{{icon "upload" class="h-3.5 w-3.5"}}}
|
|
369
|
+
<input type="file" id="input-import-plan-json" accept=".json" class="hidden" />
|
|
370
|
+
</label>
|
|
371
|
+
</div>
|
|
372
|
+
<div class="h-4 w-px bg-base-300 hidden sm:block"></div>
|
|
373
|
+
<button id="seed-insert" type="button" class="btn btn-primary btn-sm gap-2 font-bold px-4 shadow-sm">
|
|
374
|
+
{{{icon "play" class="h-3.5 w-3.5"}}}
|
|
375
|
+
<span>Execute Seed</span>
|
|
376
|
+
</button>
|
|
377
|
+
</div>
|
|
378
|
+
</div>
|
|
379
|
+
<div id="step-content-1" class="hidden">
|
|
380
|
+
<button id="btn-next-1" class="hidden"></button>
|
|
381
|
+
</div>
|
|
382
|
+
<div id="step-content-2" class="contents">
|
|
383
|
+
<button id="btn-prev-2" class="hidden"></button>
|
|
384
|
+
<button id="btn-next-2" class="hidden"></button>
|
|
385
|
+
</div>
|
|
386
|
+
<div id="step-content-3" class="contents">
|
|
387
|
+
<button id="btn-prev-3" class="hidden"></button>
|
|
388
|
+
</div>
|
|
389
|
+
<div id="step-nav-1" class="hidden"><div class="seed-step-circle"><span class="seed-step-num"></span><span class="seed-step-check"></span></div></div>
|
|
390
|
+
<div id="step-nav-2" class="hidden"><div class="seed-step-circle"><span class="seed-step-num"></span><span class="seed-step-check"></span></div></div>
|
|
391
|
+
<div id="step-nav-3" class="hidden"><div class="seed-step-circle"><span class="seed-step-num"></span><span class="seed-step-check"></span></div></div>
|
|
392
|
+
<div id="wizard-progress-bar" class="hidden"></div>
|
|
393
|
+
<div class="grid grid-cols-1 xl:grid-cols-12 gap-4 items-start">
|
|
394
|
+
<div class="xl:col-span-7 space-y-4">
|
|
395
|
+
<div id="config-single" class="{{#if isChainMode}}hidden{{/if}} space-y-4">
|
|
396
|
+
<div class="app-card p-3.5 flex flex-wrap items-center justify-between gap-4">
|
|
397
|
+
<div class="flex items-center gap-3">
|
|
398
|
+
<div class="flex items-center">
|
|
399
|
+
<button type="button" id="seed-count-dec" class="btn btn-xs btn-outline rounded-r-none border-r-0 px-2.5 font-mono text-sm hover:bg-primary hover:text-primary-content hover:border-primary">−</button>
|
|
400
|
+
<input id="seed-count" type="number" value="10" min="1" max="{{maxRows}}"
|
|
401
|
+
class="field-input !rounded-none border-x-0 !py-0.5 font-mono w-20 font-bold text-xs text-center [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none" />
|
|
402
|
+
<button type="button" id="seed-count-inc" class="btn btn-xs btn-outline rounded-l-none border-l-0 px-2.5 font-mono text-sm hover:bg-primary hover:text-primary-content hover:border-primary">+</button>
|
|
403
|
+
</div>
|
|
404
|
+
<span class="text-[11px] uppercase font-bold text-base-content/50">Rows</span>
|
|
405
|
+
<div class="h-4 w-px bg-base-200 hidden sm:block"></div>
|
|
406
|
+
<div class="flex gap-1 flex-wrap">
|
|
407
|
+
{{#each quickCounts}}
|
|
408
|
+
<button type="button" class="preset-pill btn btn-xs btn-ghost border border-base-300 font-mono text-[11px] px-2" data-count="{{this}}">{{this}}</button>
|
|
409
|
+
{{/each}}
|
|
410
|
+
</div>
|
|
411
|
+
</div>
|
|
412
|
+
<div class="flex items-center gap-2 w-full sm:w-auto">
|
|
413
|
+
<input type="text" id="seed-col-search" placeholder="Filter columns…" class="field-input text-xs !py-1 w-full sm:w-48" />
|
|
414
|
+
<span id="col-count-badge" class="badge badge-sm badge-ghost font-mono text-[11px] shrink-0">{{colCount}} cols</span>
|
|
415
|
+
</div>
|
|
416
|
+
</div>
|
|
417
|
+
<div class="app-card p-4 space-y-3">
|
|
418
|
+
<div class="flex items-center justify-between pb-2 border-b border-base-200">
|
|
419
|
+
<span class="text-xs font-bold uppercase tracking-wider text-base-content/70">Columns Specification</span>
|
|
420
|
+
<span class="text-[11px] text-base-content/40">Select generator strategy & customize parameters per column</span>
|
|
421
|
+
</div>
|
|
422
|
+
<div id="seed-columns" class="space-y-2.5">
|
|
423
|
+
</div>
|
|
424
|
+
</div>
|
|
425
|
+
</div>
|
|
426
|
+
<div id="config-chain" class="{{#unless isChainMode}}hidden{{/unless}} space-y-4">
|
|
427
|
+
<div class="app-card p-3.5 flex flex-wrap items-center justify-between gap-4">
|
|
428
|
+
<div class="flex items-center gap-3">
|
|
429
|
+
<label class="text-xs font-bold text-base-content/70">Graph Scope:</label>
|
|
430
|
+
<select id="chain-scope" class="field-select !py-1 text-xs font-semibold w-52">
|
|
431
|
+
<option value="chain">Connected Relational Chain</option>
|
|
432
|
+
<option value="ancestors">Upstream Parents Only</option>
|
|
433
|
+
<option value="descendants">Downstream Children Only</option>
|
|
434
|
+
<option value="all">Entire Database (All Tables)</option>
|
|
435
|
+
</select>
|
|
436
|
+
</div>
|
|
437
|
+
<div class="flex items-center gap-2">
|
|
438
|
+
<span class="text-xs font-bold text-base-content/70">Scale:</span>
|
|
439
|
+
<div class="join">
|
|
440
|
+
<button type="button" class="chain-scale-btn btn btn-xs join-item font-mono" data-scale="0.5">0.5×</button>
|
|
441
|
+
<button type="button" class="chain-scale-btn btn btn-xs join-item btn-neutral font-mono" data-scale="1">1×</button>
|
|
442
|
+
<button type="button" class="chain-scale-btn btn btn-xs join-item font-mono" data-scale="2">2×</button>
|
|
443
|
+
<button type="button" class="chain-scale-btn btn btn-xs join-item font-mono" data-scale="5">5×</button>
|
|
444
|
+
</div>
|
|
445
|
+
<span id="chain-summary-badge" class="badge badge-sm badge-primary font-mono font-bold ml-2">0 Tables</span>
|
|
446
|
+
</div>
|
|
447
|
+
</div>
|
|
448
|
+
<div class="app-card p-4 space-y-3">
|
|
449
|
+
<div class="flex items-center justify-between pb-2 border-b border-base-200">
|
|
450
|
+
<span class="text-xs font-bold uppercase tracking-wider text-base-content/70">Topological Execution Pipeline</span>
|
|
451
|
+
<span class="text-[11px] text-base-content/40">Dependencies ordered upstream-first</span>
|
|
452
|
+
</div>
|
|
453
|
+
<div id="chain-pipeline-container" class="space-y-2.5">
|
|
454
|
+
</div>
|
|
455
|
+
</div>
|
|
456
|
+
</div>
|
|
457
|
+
<details class="app-card group">
|
|
458
|
+
<summary class="p-3.5 flex items-center justify-between cursor-pointer list-none select-none text-xs font-bold text-base-content/70 hover:text-base-content">
|
|
459
|
+
<div class="flex items-center gap-2">
|
|
460
|
+
{{{icon "settings" class="h-3.5 w-3.5"}}}
|
|
461
|
+
<span>Advanced Execution Options</span>
|
|
462
|
+
</div>
|
|
463
|
+
<span class="text-xs text-base-content/40 group-open:rotate-180 transition-transform">▼</span>
|
|
464
|
+
</summary>
|
|
465
|
+
<div class="p-3.5 pt-0 border-t border-base-200/80 mt-1 flex flex-wrap items-center gap-6 text-xs">
|
|
466
|
+
<label class="cursor-pointer flex items-center gap-2 select-none group">
|
|
467
|
+
<input id="plan-transaction-opt" type="checkbox" checked class="checkbox checkbox-primary checkbox-xs" />
|
|
468
|
+
<span class="font-medium text-base-content/80 group-hover:text-base-content">Wrap in Transaction (BEGIN ... COMMIT)</span>
|
|
469
|
+
</label>
|
|
470
|
+
<label class="cursor-pointer flex items-center gap-2 select-none group">
|
|
471
|
+
<input id="plan-rollback-opt" type="checkbox" checked class="checkbox checkbox-primary checkbox-xs" />
|
|
472
|
+
<span class="font-medium text-base-content/80 group-hover:text-base-content">Atomic Rollback on Error</span>
|
|
473
|
+
</label>
|
|
474
|
+
<label class="cursor-pointer flex items-center gap-2 select-none group">
|
|
475
|
+
<input id="seed-truncate" type="checkbox" class="checkbox checkbox-error checkbox-xs" />
|
|
476
|
+
<span class="font-medium text-error/90 group-hover:text-error">Clear tables before inserting (Truncate)</span>
|
|
477
|
+
</label>
|
|
478
|
+
</div>
|
|
479
|
+
</details>
|
|
480
|
+
</div>
|
|
481
|
+
<div class="xl:col-span-5 space-y-4 xl:sticky xl:top-4">
|
|
482
|
+
<div id="validation-report-card" class="app-card p-3.5 space-y-2">
|
|
483
|
+
<div class="flex items-center justify-between">
|
|
484
|
+
<div id="validation-summary-pill" class="flex items-center gap-2">
|
|
485
|
+
<span id="validation-status-dot" class="w-2 h-2 rounded-full bg-success"></span>
|
|
486
|
+
<span id="validation-status-text" class="text-xs font-mono font-bold text-base-content">Plan Ready</span>
|
|
487
|
+
</div>
|
|
488
|
+
<span id="validation-summary-chip" class="badge badge-sm badge-success font-mono text-[10px] font-bold">All Checks Passed</span>
|
|
489
|
+
</div>
|
|
490
|
+
<div id="validation-issues-list" class="space-y-1.5 text-xs">
|
|
491
|
+
<div class="flex items-center gap-2 text-success font-medium text-[11px]">
|
|
492
|
+
{{{icon "check" class="h-3.5 w-3.5 shrink-0"}}}
|
|
493
|
+
<span>Primary key & constraint strategies valid</span>
|
|
494
|
+
</div>
|
|
495
|
+
</div>
|
|
496
|
+
</div>
|
|
497
|
+
<div class="app-card overflow-hidden">
|
|
498
|
+
<div class="flex items-center justify-between p-3 border-b border-base-200 bg-base-100 gap-2 flex-wrap">
|
|
499
|
+
<div class="join">
|
|
500
|
+
<button type="button" id="preview-tab-grid" class="btn btn-xs join-item btn-active font-bold">Table Preview</button>
|
|
501
|
+
<button type="button" id="preview-tab-sql" class="btn btn-xs join-item font-bold">SQL Script</button>
|
|
502
|
+
</div>
|
|
503
|
+
<button id="seed-refresh-preview" type="button" class="btn btn-xs btn-ghost gap-1 text-xs text-base-content/70 hover:text-primary">
|
|
504
|
+
{{{icon "refresh" class="h-3 w-3"}}}
|
|
505
|
+
<span>Refresh</span>
|
|
506
|
+
</button>
|
|
507
|
+
</div>
|
|
508
|
+
<div id="seed-chain-table-tabs" class="tabs tabs-bordered flex-nowrap w-full overflow-x-auto hidden px-3 py-1 bg-base-200/40 border-b border-base-200 text-xs"></div>
|
|
509
|
+
<div id="preview-view-grid">
|
|
510
|
+
<div class="overflow-x-auto max-h-[440px]">
|
|
511
|
+
<table class="table table-zebra table-pin-rows table-xs w-full">
|
|
512
|
+
<thead id="seed-preview-thead" class="bg-base-200/90 text-[10px] uppercase font-mono tracking-wider text-base-content/70 backdrop-blur sticky top-0 z-10"></thead>
|
|
513
|
+
<tbody id="seed-preview-tbody" class="font-mono text-[11px]">
|
|
514
|
+
<tr>
|
|
515
|
+
<td colspan="100" class="text-center py-12 opacity-50">
|
|
516
|
+
<div class="flex flex-col items-center gap-2">
|
|
517
|
+
<span class="loading loading-spinner loading-sm text-primary"></span>
|
|
518
|
+
<span class="text-xs">Generating preview…</span>
|
|
519
|
+
</div>
|
|
520
|
+
</td>
|
|
521
|
+
</tr>
|
|
522
|
+
</tbody>
|
|
523
|
+
</table>
|
|
524
|
+
</div>
|
|
525
|
+
</div>
|
|
526
|
+
<div id="preview-view-sql" class="hidden p-3 bg-base-200/20 space-y-2">
|
|
527
|
+
<div class="flex items-center justify-between">
|
|
528
|
+
<span class="text-[11px] font-mono text-base-content/50 uppercase font-bold">Generated SQL (Preview)</span>
|
|
529
|
+
<button type="button" id="btn-copy-sql" class="btn btn-xs btn-outline gap-1 text-[11px]">
|
|
530
|
+
{{{icon "copy" class="h-3 w-3"}}}
|
|
531
|
+
<span>Copy SQL</span>
|
|
532
|
+
</button>
|
|
533
|
+
</div>
|
|
534
|
+
<pre id="preview-sql-code" class="bg-neutral text-neutral-content p-3.5 rounded-lg font-mono text-xs overflow-x-auto max-h-[380px] border border-base-300 leading-relaxed"></pre>
|
|
535
|
+
</div>
|
|
536
|
+
</div>
|
|
537
|
+
<div id="seed-truncate-banner" class="hidden p-3 rounded-lg bg-error/10 border border-error/20 flex items-center gap-2.5">
|
|
538
|
+
<span class="text-error shrink-0">{{{icon "warning" class="h-4 w-4"}}}</span>
|
|
539
|
+
<p class="text-xs font-bold text-error">
|
|
540
|
+
Destructive Action: Existing table rows will be truncated before seeding.
|
|
541
|
+
</p>
|
|
542
|
+
</div>
|
|
543
|
+
<div id="seed-execute-bar" class="hidden"></div>
|
|
544
|
+
<div id="seed-feedback" class="hidden"></div>
|
|
545
|
+
</div>
|
|
546
|
+
</div>
|
|
547
|
+
</div>
|
|
548
|
+
<dialog id="seed-profiles-dialog" class="modal">
|
|
549
|
+
<div class="modal-box p-0 overflow-hidden max-w-lg rounded-2xl border border-base-200 shadow-xl">
|
|
550
|
+
<div class="px-5 py-4 bg-base-200/50 border-b border-base-200 flex items-center justify-between">
|
|
551
|
+
<div class="flex items-center gap-2.5">
|
|
552
|
+
{{{icon "book" class="h-4 w-4 text-primary"}}}
|
|
553
|
+
<h3 class="font-bold text-sm text-base-content">Seed Profiles & Presets</h3>
|
|
554
|
+
</div>
|
|
555
|
+
<button type="button" class="btn btn-xs btn-circle btn-ghost" id="btn-close-profiles">✕</button>
|
|
556
|
+
</div>
|
|
557
|
+
<div class="p-5 space-y-4 text-xs">
|
|
558
|
+
<div>
|
|
559
|
+
<h4 class="font-bold text-[10px] uppercase tracking-wider text-base-content/50 mb-2">Quick Blueprints</h4>
|
|
560
|
+
<div class="grid grid-cols-3 gap-2">
|
|
561
|
+
<button type="button" class="btn-preset-profile btn btn-xs btn-outline font-mono" data-preset="smoke">⚡ Smoke (10)</button>
|
|
562
|
+
<button type="button" class="btn-preset-profile btn btn-xs btn-outline font-mono" data-preset="realistic">🌱 Standard (100)</button>
|
|
563
|
+
<button type="button" class="btn-preset-profile btn btn-xs btn-outline font-mono" data-preset="stress">🚀 Stress (1000)</button>
|
|
564
|
+
</div>
|
|
565
|
+
</div>
|
|
566
|
+
<div class="p-3 rounded-lg bg-base-200/40 border border-base-300 space-y-2">
|
|
567
|
+
<h4 class="font-bold text-[10px] uppercase tracking-wider text-base-content/60">Save Current Configuration</h4>
|
|
568
|
+
<div class="flex gap-2">
|
|
569
|
+
<input id="profile-name-input" type="text" placeholder="Profile name (e.g. Test Dataset)"
|
|
570
|
+
class="field-input flex-1 text-xs !py-1 font-medium" />
|
|
571
|
+
<button type="button" id="btn-save-profile" class="btn btn-xs btn-primary px-3 font-bold">Save</button>
|
|
572
|
+
</div>
|
|
573
|
+
</div>
|
|
574
|
+
<div>
|
|
575
|
+
<h4 class="font-bold text-[10px] uppercase tracking-wider text-base-content/50 mb-1.5">Saved Profiles</h4>
|
|
576
|
+
<div id="profiles-list-container" class="space-y-1.5 max-h-48 overflow-y-auto pr-1">
|
|
577
|
+
<div class="py-4 text-center text-xs text-base-content/40">No saved profiles yet.</div>
|
|
578
|
+
</div>
|
|
579
|
+
</div>
|
|
580
|
+
</div>
|
|
581
|
+
</div>
|
|
582
|
+
<form method="dialog" class="modal-backdrop bg-base-300/60 backdrop-blur-sm"><button>close</button></form>
|
|
583
|
+
</dialog>
|
|
584
|
+
<dialog id="seed-truncate-dialog" class="modal">
|
|
585
|
+
<div class="modal-box p-0 overflow-hidden max-w-md rounded-2xl border border-error/20 shadow-xl">
|
|
586
|
+
<div class="px-5 py-4 bg-error/5 border-b border-error/15 flex items-center gap-2.5">
|
|
587
|
+
<span class="text-error">{{{icon "warning" class="h-5 w-5"}}}</span>
|
|
588
|
+
<h3 class="font-bold text-sm text-error">Confirm Truncate Action</h3>
|
|
589
|
+
</div>
|
|
590
|
+
<div class="p-5 space-y-3 text-xs text-base-content/80 leading-relaxed">
|
|
591
|
+
<p>
|
|
592
|
+
You have enabled <strong class="text-error">Clear tables before inserting</strong>. All existing records in affected tables will be permanently deleted in reverse topological order before new rows are inserted.
|
|
593
|
+
</p>
|
|
594
|
+
</div>
|
|
595
|
+
<div class="px-5 pb-4 flex items-center justify-end gap-2">
|
|
596
|
+
<button type="button" class="btn btn-ghost btn-xs" id="seed-truncate-cancel">Cancel</button>
|
|
597
|
+
<button type="button" class="btn btn-error btn-xs font-bold gap-1.5" id="seed-truncate-confirm">
|
|
598
|
+
{{{icon "warning" class="h-3.5 w-3.5"}}}
|
|
599
|
+
<span>Yes, Truncate & Seed</span>
|
|
600
|
+
</button>
|
|
601
|
+
</div>
|
|
602
|
+
</div>
|
|
603
|
+
<form method="dialog" class="modal-backdrop bg-base-300/60 backdrop-blur-sm"><button>close</button></form>
|
|
604
|
+
</dialog>
|
|
605
|
+
<script id="seed-config" type="application/json">{{{json seedConfig}}}</script>
|
|
606
|
+
<script src="{{basePath}}/js/seed.js" defer></script>
|