Set a default agent for SNMP polling at this site. This will override the organization default for all devices at this site. Leave blank to inherit from organization.
<.input field={@form[:agent_token_id]} type="select" label="Default Agent for Site" prompt="Inherit from organization" options={Enum.map(@available_agents, &{&1.name, &1.id})} /> <%= if @live_action == :edit and @site.agent_token_id do %><.icon name="hero-exclamation-triangle" class="h-4 w-4" /> Overriding organization default - all devices at this site will use this agent
Force Apply to Site Device
This will assign this agent to ALL devices at this site.
<.button type="button" phx-click="apply_agent_to_all" data-confirm="This will replace agent assignments for ALL devices at this site. Are you sure?" variant="danger" > <.icon name="hero-arrow-path" class="h-4 w-4" /> Apply Agent to All Device<.icon name="hero-building-office-2" class="h-4 w-4" /> Currently inheriting organization default: {@org_agent.name}
<% else %>Set a default agent for all devices at this site. Device can override this setting individually.
<% end %> <% end %>Override organization SNMP defaults for all devices at this site. Leave blank to inherit from organization.
<.input field={@form[:snmp_version]} type="select" label="SNMP Version" prompt="Inherit from organization" options={[{"SNMP v1", "1"}, {"SNMP v2c", "2c"}, {"SNMP v3", "3"}]} /> <.input field={@form[:snmp_community]} type="text" label="SNMP Community String" placeholder="Leave blank to inherit from organization" /> <%= if @live_action == :edit and @site.snmp_community do %>Force Apply to Site Device
This will override SNMP settings for ALL devices at this site.
<.button type="button" phx-click="apply_snmp_to_all" data-confirm="This will replace SNMP settings for ALL devices at this site. Are you sure?" variant="danger" > <.icon name="hero-arrow-path" class="h-4 w-4" /> Apply SNMP Config to All DeviceOverride organization MikroTik API defaults for all devices at this site. Leave blank to inherit from organization. Only applies to MikroTik devices.
<.input field={@form[:mikrotik_enabled]} type="checkbox" label="Enable MikroTik API" /> <%= if @form[:mikrotik_enabled].value do %> <.input field={@form[:mikrotik_username]} type="text" label="Username" placeholder="Leave blank to inherit from organization" /> <.input field={@form[:mikrotik_password]} type="password" label="Password" placeholder="Leave blank to inherit from organization" /> <.input field={@form[:mikrotik_port]} type="number" label="API Port" placeholder="8729 (SSL) or 8728 (plain)" /> <.input field={@form[:mikrotik_use_ssl]} type="checkbox" label="Use SSL (API-SSL)" /> <%= if @form[:mikrotik_use_ssl].value == false do %>🚨 Critical Security Warning: Plain API (port 8728) sends credentials unencrypted over the network. This setting is blocked for devices using cloud pollers and should only be used with local agents on trusted networks.
⚠️ Security Warning: Plain API (port 8728) sends credentials unencrypted. Use SSL (port 8729) whenever possible.
Once you delete a site, there is no going back. This will also delete all devices at this site.
<.button phx-click="delete" data-confirm="Are you sure you want to delete this site? This will also delete all devices at this site." variant="danger" > <.icon name="hero-trash" class="h-4 w-4" /> Delete Site