towerops/lib/towerops_web/live/agent_live/edit.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

89 lines
3.2 KiB
Text

<Layouts.app flash={@flash} timezone={@timezone}>
<div class="max-w-2xl mx-auto">
<div class="mb-6">
<.link
navigate={~p"/agents/#{@agent_token.id}"}
class="text-sm font-medium text-cerulean-600 hover:text-cerulean-700 dark:text-cerulean-400 dark:hover:text-cerulean-300"
>
<span class="hero-arrow-left h-4 w-4 inline"></span> Back to agent
</.link>
</div>
<div class="bg-white dark:bg-cool-steel-800/50 shadow rounded-lg">
<div class="px-6 py-5 border-b border-cool-steel-200 dark:border-white/10">
<h3 class="text-lg font-medium text-cool-steel-900 dark:text-white">
{t("Edit Agent")}
</h3>
<p class="mt-1 text-sm text-cool-steel-600 dark:text-cool-steel-400">
{t("Update the agent name. The authentication token cannot be changed.")}
</p>
</div>
<.form
for={@form}
id="edit-agent-form"
phx-change="validate"
phx-submit="save"
class="px-6 py-5"
>
<div class="space-y-6">
<div>
<.input
field={@form[:name]}
type="text"
label={t("Agent Name")}
placeholder="e.g., Datacenter Agent"
required
/>
<p class="mt-2 text-sm text-cool-steel-600 dark:text-cool-steel-400">
{t("A descriptive name to identify this agent in your organization.")}
</p>
</div>
<div>
<.input
field={@form[:allow_remote_debug]}
type="checkbox"
label={t("Allow Remote Debugging")}
/>
<div
:if={@form[:allow_remote_debug].value}
class="rounded-md bg-wheat-50 dark:bg-wheat-900/20 p-3 mt-2"
>
<div class="flex items-start gap-2 text-wheat-800 dark:text-wheat-200">
<.icon name="hero-exclamation-triangle" class="h-5 w-5 flex-shrink-0 mt-0.5" />
<div class="text-sm">
<p class="font-medium">Performance Impact</p>
<p class="mt-1">
{t("When enabled, the server logs all SNMP data and messages for this agent.")}
{t(
"This generates significant log volume and should only be enabled temporarily"
)} for troubleshooting.
</p>
</div>
</div>
</div>
<p class="mt-2 text-sm text-cool-steel-600 dark:text-cool-steel-400">
{t("Enable verbose logging for troubleshooting SNMP discovery and polling issues.")}
{t("Only organization members can toggle this setting.")}
</p>
</div>
</div>
<div class="mt-6 flex items-center justify-end gap-x-4">
<.link
navigate={~p"/agents/#{@agent_token.id}"}
class="text-sm font-semibold text-cool-steel-700 dark:text-cool-steel-300 hover:text-cool-steel-900 dark:hover:text-white"
>
{t("Cancel")}
</.link>
<.button type="submit" phx-disable-with={t("Saving...")}>
{t("Save Changes")}
</.button>
</div>
</.form>
</div>
</div>
</Layouts.app>