towerops/lib/towerops_web/live/escalation_policy_live/index.html.heex
Graham McIntire 5a7cdc7138 refactor: apply custom color palette across entire codebase
- Replace gray->cool-steel, blue/indigo->cerulean, red->sweet-salmon, yellow/amber->wheat
- Dark sidebar: sidebar/footer use cool-steel-800 bg, text lightened for contrast
- ~11,600 color replacements across ~99 files
- Update tests for new color class names
2026-06-23 10:58:48 -05:00

74 lines
3 KiB
Text

<Layouts.authenticated
flash={@flash}
current_scope={@current_scope}
active_page="schedules"
unresolved_alert_count={assigns[:unresolved_alert_count] || 0}
>
<div class="flex items-center justify-between mb-6">
<div class="flex items-center gap-3">
<.link
navigate={~p"/schedules"}
class="text-cool-steel-400 hover:text-cool-steel-600 dark:hover:text-cool-steel-300"
>
<.icon name="hero-arrow-left" class="h-5 w-5" />
</.link>
<h1 class="text-xl font-bold text-cool-steel-900 dark:text-white">
{t("Escalation Policies")}
</h1>
</div>
<.link
navigate={~p"/schedules/escalation-policies/new"}
class="inline-flex items-center gap-2 rounded-lg bg-cerulean-600 px-4 py-2 text-sm font-semibold text-white hover:bg-cerulean-500 transition-colors"
>
<.icon name="hero-plus" class="h-4 w-4" />
{t("New Policy")}
</.link>
</div>
<%= if Enum.empty?(@policies) do %>
<div class="flex items-center justify-center py-16">
<div class="text-center">
<.icon
name="hero-arrow-trending-up"
class="h-12 w-12 text-cool-steel-300 dark:text-cool-steel-600 mx-auto mb-4"
/>
<h3 class="text-lg font-semibold text-cool-steel-700 dark:text-cool-steel-300">
{t("No escalation policies")}
</h3>
<p class="mt-2 text-sm text-cool-steel-500 dark:text-cool-steel-400">
{t("Create an escalation policy to define how alerts are escalated to on-call users.")}
</p>
</div>
</div>
<% else %>
<div class="overflow-hidden rounded-lg border border-cool-steel-200 dark:border-white/10">
<table class="min-w-full divide-y divide-cool-steel-200 dark:divide-white/10">
<thead class="bg-cool-steel-50 dark:bg-cool-steel-800/50">
<tr>
<th class="px-4 py-3 text-left text-xs font-semibold uppercase tracking-wider text-cool-steel-500 dark:text-cool-steel-400">
{t("Name")}
</th>
<th class="px-4 py-3 text-left text-xs font-semibold uppercase tracking-wider text-cool-steel-500 dark:text-cool-steel-400">
{t("Levels")}
</th>
</tr>
</thead>
<tbody class="divide-y divide-cool-steel-100 dark:divide-white/5 bg-white dark:bg-cool-steel-900">
<%= for policy <- @policies do %>
<tr
class="hover:bg-cool-steel-50 dark:hover:bg-cool-steel-800/30 transition-colors cursor-pointer"
phx-click={JS.navigate(~p"/schedules/escalation-policies/#{policy.id}")}
>
<td class="px-4 py-3 text-sm font-medium text-cool-steel-900 dark:text-white">
{policy.name}
</td>
<td class="px-4 py-3 text-sm text-cool-steel-600 dark:text-cool-steel-400">
{length(policy.rules)}
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
<% end %>
</Layouts.authenticated>