<.link navigate={~p"/orgs/#{@organization.slug}"} class="inline-flex items-center gap-1 text-sm text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white" > <.icon name="hero-arrow-left" class="h-4 w-4" /> Back to Dashboard

Organization Settings

Manage organization defaults for SNMP, agents, and MikroTik API configuration

<.form for={@form} id="organization-form" phx-change="validate" phx-submit="save" data-1p-ignore data-form-type="other" >

Organization Name

Update the name of your organization.

<.input field={@form[:name]} type="text" label="Organization Name" required />

SNMP Configuration

Set default SNMP settings for all devices in this organization. These can be overridden at the site or device level.

<.icon name="hero-information-circle" class="h-4 w-4 inline" /> Hierarchy: Device > Site > Organization

<.input field={@form[:snmp_version]} type="select" label="SNMP Version" prompt="Select SNMP version" options={[{"SNMP v1", "1"}, {"SNMP v2c", "2c"}, {"SNMP v3", "3"}]} /> <.input field={@form[:snmp_community]} type="text" label="SNMP Community String" placeholder="e.g., public" /> <%= if @organization.snmp_community do %>

Force Apply to All Devices

This will override SNMP settings for ALL devices across all sites in this organization.

<% end %>
<%= if @current_scope.user.is_superuser do %>

MikroTik API Configuration

Set default MikroTik RouterOS API credentials for all devices in this organization. Only applies to devices detected as MikroTik.

<.icon name="hero-information-circle" class="h-4 w-4 inline" /> Hierarchy: Device > Site > Organization

<.input field={@form[:mikrotik_enabled]} type="checkbox" label="Enable MikroTik API" />
<.input field={@form[:mikrotik_username]} type="text" label="Username" placeholder="e.g., admin" autocomplete="off" />
<.input field={@form[:mikrotik_password]} type="password" label="Password" placeholder="RouterOS API password" autocomplete="off" />
<.input field={@form[:mikrotik_port]} type="number" label="API Port" placeholder="8729" autocomplete="off" />
<.input field={@form[:mikrotik_use_ssl]} type="checkbox" label="Use SSL (API-SSL)" />

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.

<% end %> <%= if @available_agents != [] do %>

Default Agent

Select a default agent for SNMP polling. This will be used for all devices in this organization unless overridden at the site or device level.

<.icon name="hero-information-circle" class="h-4 w-4 inline" /> Hierarchy: Device > Site > Organization

<.input field={@form[:default_agent_token_id]} type="select" label="Default Remote Agent" prompt="No default agent - cloud polling" options={Enum.map(@available_agents, &{&1.name, &1.id})} />

Current Device Assignment:

<.icon name="hero-server" class="h-4 w-4" /> {@assignment_breakdown.direct} device-level override
<.icon name="hero-building-office" class="h-4 w-4" /> {@assignment_breakdown.site} inherited from site
<.icon name="hero-building-office-2" class="h-4 w-4" /> {@assignment_breakdown.organization} inheriting organization default
<.icon name="hero-cloud" class="h-4 w-4" /> {@assignment_breakdown.cloud} cloud polling (no agent)
<%= if @organization.default_agent_token_id do %>

Force Apply to All Devices

This will assign the default agent to ALL devices across all sites in this organization.

<% end %>
<% else %>

Default Agent

No agents configured yet. <.link navigate={~p"/agents"} class="text-indigo-600 hover:text-indigo-700 dark:text-indigo-400 dark:hover:text-indigo-300" > Create an agent to enable remote polling.

<% end %>
<.link navigate={~p"/orgs/#{@organization.slug}"} class="text-sm font-semibold text-gray-900 dark:text-white" > Cancel