- <.link
- navigate={~p"/agents/#{agent.id}"}
- class="font-medium text-blue-600 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300"
- >
- {agent.name}
-
- <%= if agent.is_cloud_poller do %>
-
- <.icon name="hero-cloud" class="h-3 w-3" /> Cloud
+ <%!-- Cloud Pollers --%>
+ <%= if @has_cloud_pollers do %>
+
+
+ <.icon name="hero-cloud" class="w-5 h-5 inline mr-1" /> Cloud Pollers
+
+ <.table id="cloud-pollers-table" rows={@streams.cloud_pollers}>
+ <:col :let={{_id, agent}} label="Name">
+
+ <.link
+ navigate={~p"/agents/#{agent.id}"}
+ class="font-medium text-blue-600 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300"
+ >
+ {agent.name}
+
+ <%= if agent.allow_remote_debug do %>
+
+ <.icon name="hero-bug-ant" class="h-3 w-3" /> Debug
+
+ <% end %>
+
+
+
+ <:col :let={{_id, agent}} label="Status">
+ <% {status, label} = agent_status(agent) %>
+
+
+ {label}
- <% end %>
- <%= if agent.allow_remote_debug do %>
-
- <.icon name="hero-bug-ant" class="h-3 w-3" /> Debug
+
+
+ <:col :let={{_id, agent}} label="Devices">
+ <% counts = Map.get(@device_counts, agent.id, %{direct: 0, total: 0}) %>
+
+ {counts.total} total
+
+
+ {counts.direct} direct
+ <%= if counts.total > counts.direct do %>
+ · {counts.total - counts.direct} inherited
+ <% end %>
+
+
+
+ <:col :let={{_id, agent}} label="Last Seen">
+
+ <.timestamp datetime={agent.last_seen_at} timezone={@timezone} now={@now} />
+
+ <%= if agent.last_seen_at do %>
+
+ <.timestamp
+ datetime={agent.last_seen_at}
+ timezone={@timezone}
+ format="absolute"
+ />
+
+ <% end %>
+
+
+ <:col :let={{_id, agent}} label="Version">
+ <%= if agent.metadata["version"] do %>
+
+ {format_agent_version(agent.metadata["version"])}
+
+ <% end %>
+
+
+
+ <% end %>
+
+ <%!-- Organization Agents --%>
+ <%= if @has_org_agents do %>
+
+
+ <.icon name="hero-server" class="w-5 h-5 inline mr-1" /> Organization Agents
+
+ <.table id="org-agents-table" rows={@streams.org_agents}>
+ <:col :let={{_id, agent}} label="Name">
+
+
+ <.link
+ navigate={~p"/agents/#{agent.id}"}
+ class="font-medium text-blue-600 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300"
+ >
+ {agent.name}
+
+ <%= if agent.allow_remote_debug do %>
+
+ <.icon name="hero-bug-ant" class="h-3 w-3" /> Debug
+
+ <% end %>
+
+
+ {agent.organization && agent.organization.name}
+
+
+
+
+ <:col :let={{_id, agent}} label="Status">
+ <% {status, label} = agent_status(agent) %>
+
+
+ {label}
- <% end %>
-
-
+
- <:col :let={{_id, agent}} label="Organization">
- <%= if agent.is_cloud_poller do %>
- Cloud Poller
- <% else %>
-
- {agent.organization && agent.organization.name}
-
- <% end %>
-
+ <:col :let={{_id, agent}} label="Devices">
+ <% counts = Map.get(@device_counts, agent.id, %{direct: 0, total: 0}) %>
+
+ {counts.total} total
+
+
+ {counts.direct} direct
+ <%= if counts.total > counts.direct do %>
+ · {counts.total - counts.direct} inherited
+ <% end %>
+
+
- <:col :let={{_id, agent}} label="Status">
- <% {status, label} = agent_status(agent) %>
-
-
- {label}
-
-
+ <:col :let={{_id, agent}} label="Last Seen">
+
+ <.timestamp datetime={agent.last_seen_at} timezone={@timezone} now={@now} />
+
+ <%= if agent.last_seen_at do %>
+
+ <.timestamp
+ datetime={agent.last_seen_at}
+ timezone={@timezone}
+ format="absolute"
+ />
+
+ <% end %>
+
- <:col :let={{_id, agent}} label="Devices">
- <% counts = Map.get(@device_counts, agent.id, %{direct: 0, total: 0}) %>
-
- {counts.total} total
-
-
- {counts.direct} direct
- <%= if counts.total > counts.direct do %>
- · {counts.total - counts.direct} inherited
- <% end %>
-
-
-
- <:col :let={{_id, agent}} label="Last Seen">
-
- <.timestamp datetime={agent.last_seen_at} timezone={@timezone} now={@now} />
-
- <%= if agent.last_seen_at do %>
-
- <.timestamp datetime={agent.last_seen_at} timezone={@timezone} format="absolute" />
-
- <% end %>
-
-
- <:col :let={{_id, agent}} label="Version">
- <%= if agent.metadata["version"] do %>
-
- {format_agent_version(agent.metadata["version"])}
-
- <% end %>
-
-
+ <:col :let={{_id, agent}} label="Version">
+ <%= if agent.metadata["version"] do %>
+
+ {format_agent_version(agent.metadata["version"])}
+
+ <% end %>
+
+
+