remove default_view
This commit is contained in:
@@ -683,7 +683,7 @@ export const dashboard = new Elysia()
|
||||
const resolved = await getAccountId(cookie, headers);
|
||||
if (!resolved?.accountId) return redirect("/dashboard");
|
||||
const pages = await sql`
|
||||
SELECT id, slug, title, description, theme, default_window
|
||||
SELECT id, slug, title, description, theme
|
||||
FROM status_pages WHERE account_id = ${resolved.accountId}
|
||||
ORDER BY created_at DESC
|
||||
`;
|
||||
@@ -734,7 +734,7 @@ export const dashboard = new Elysia()
|
||||
title: b.title,
|
||||
description: b.description || null,
|
||||
theme: b.theme || "auto",
|
||||
default_window: b.default_window || "24h",
|
||||
|
||||
display_mode: b.display_mode || "expanded",
|
||||
bar_frequency: b.bar_frequency || "daily",
|
||||
bar_count: Number(b.bar_count) || 90,
|
||||
@@ -767,7 +767,6 @@ export const dashboard = new Elysia()
|
||||
title: b.title,
|
||||
description: b.description || null,
|
||||
theme: b.theme || "auto",
|
||||
default_window: b.default_window || "24h",
|
||||
display_mode: b.display_mode || "expanded",
|
||||
bar_frequency: b.bar_frequency || "daily",
|
||||
bar_count: Number(b.bar_count) || 90,
|
||||
|
||||
@@ -294,7 +294,6 @@ Content-Type: application/json
|
||||
<tr><td>theme</td><td>string?</td><td><code>auto</code>, <code>light</code>, or <code>dark</code>. Default <code>auto</code>.</td></tr>
|
||||
<tr><td>password</td><td>string?</td><td>Plain text, hashed at write time. Pass <code>null</code> to clear.</td></tr>
|
||||
<tr><td>display_mode</td><td>string?</td><td><code>compact</code> or <code>expanded</code>. Default <code>expanded</code>.</td></tr>
|
||||
<tr><td>default_window</td><td>string?</td><td><code>24h</code>, <code>7d</code>, <code>30d</code>, or <code>90d</code>. Default <code>24h</code>.</td></tr>
|
||||
<tr><td>bar_frequency</td><td>string?</td><td><code>hourly</code> or <code>daily</code>. Default <code>daily</code>.</td></tr>
|
||||
<tr><td>bar_count</td><td>number?</td><td>How many bars to show (1-180). Default 90.</td></tr>
|
||||
<tr><td>auto_refresh_s</td><td>number?</td><td>Auto-refresh interval in seconds (10-3600). Default 60.</td></tr>
|
||||
|
||||
@@ -61,14 +61,6 @@
|
||||
<% }) %>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
<label class="block text-sm text-gray-400 mb-1.5">Default window</label>
|
||||
<select name="default_window" class="w-full bg-surface-solid border border-border-subtle rounded-lg px-4 py-2.5 text-gray-100 focus:outline-none focus:border-blue-500">
|
||||
<% ['24h','7d','30d','90d'].forEach(function(w) { %>
|
||||
<option value="<%= w %>" <%= (p.default_window || '24h') === w ? 'selected' : '' %>><%= w %></option>
|
||||
<% }) %>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
<label class="block text-sm text-gray-400 mb-1.5">Display mode</label>
|
||||
<select name="display_mode" class="w-full bg-surface-solid border border-border-subtle rounded-lg px-4 py-2.5 text-gray-100 focus:outline-none focus:border-blue-500">
|
||||
|
||||
Reference in New Issue
Block a user