CRITICAL: - Membership: remove :role/:org_id/:user_id from mass-assignment cast; use explicit create_changeset/4 and role_update_changeset/2 - GraphQL member resolver: add authorize_invite/3 checking admin/owner role and role hierarchy - REST invitations controller: add auth check for invite creation HIGH: - ApiToken: remove :organization_id/:user_id from cast; use explicit create_changeset/4 MEDIUM: - Move 8 LiveView Ecto queries into context modules (Admin, Alerts, Coverages, OnCall, Snmp) - Replace Process.put/Process.get with socket assigns for unresolved_alert_count (user_auth + layouts + 50 templates) - Add batch get_utilization_for_interfaces/1 to eliminate N+1 capacity queries in device show - Replace Process.sleep with Process.monitor/assert_receive or Process.send_after in 5 test files LOW: - Add handle_params/3 to UserResetPasswordLive, UserRegistrationLive, StatusPageLive - Remove redundant Repo.preload calls; add preloads to list_site_devices/1 - Fix @impl annotations and credo nesting warnings
47 lines
1.4 KiB
Text
47 lines
1.4 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 gap-3 mb-6">
|
|
<.link
|
|
navigate={~p"/schedules"}
|
|
class="text-gray-400 hover:text-gray-600 dark:hover:text-gray-300"
|
|
>
|
|
<.icon name="hero-arrow-left" class="h-5 w-5" />
|
|
</.link>
|
|
<h1 class="text-xl font-bold text-gray-900 dark:text-white">{@page_title}</h1>
|
|
</div>
|
|
|
|
<div class="max-w-2xl">
|
|
<.form for={@form} phx-change="validate" phx-submit="save" class="space-y-6">
|
|
<div>
|
|
<.input field={@form[:name]} type="text" label={t("Name")} required />
|
|
</div>
|
|
<div>
|
|
<.input
|
|
field={@form[:timezone]}
|
|
type="text"
|
|
label={t("Timezone")}
|
|
placeholder="America/Chicago"
|
|
required
|
|
/>
|
|
</div>
|
|
<div>
|
|
<.input field={@form[:description]} type="textarea" label={t("Description")} />
|
|
</div>
|
|
<div class="flex items-center gap-3">
|
|
<.button type="submit" phx-disable-with={t("Saving...")}>
|
|
{t("Save Schedule")}
|
|
</.button>
|
|
<.link
|
|
navigate={~p"/schedules"}
|
|
class="text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white"
|
|
>
|
|
{t("Cancel")}
|
|
</.link>
|
|
</div>
|
|
</.form>
|
|
</div>
|
|
</Layouts.authenticated>
|