58 lines
1.8 KiB
Text
58 lines
1.8 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-blue-600 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300"
|
|
>
|
|
<span class="hero-arrow-left h-4 w-4 inline"></span> Back to agent
|
|
</.link>
|
|
</div>
|
|
|
|
<div class="bg-white dark:bg-gray-800/50 shadow rounded-lg">
|
|
<div class="px-6 py-5 border-b border-gray-200 dark:border-white/10">
|
|
<h3 class="text-lg font-medium text-gray-900 dark:text-white">
|
|
Edit Agent
|
|
</h3>
|
|
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
|
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="Agent Name"
|
|
placeholder="e.g., Datacenter Agent"
|
|
required
|
|
/>
|
|
<p class="mt-2 text-sm text-gray-600 dark:text-gray-400">
|
|
A descriptive name to identify this agent in your organization.
|
|
</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-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white"
|
|
>
|
|
Cancel
|
|
</.link>
|
|
<.button type="submit" phx-disable-with="Saving...">
|
|
Save Changes
|
|
</.button>
|
|
</div>
|
|
</.form>
|
|
</div>
|
|
</div>
|
|
</Layouts.app>
|