mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-03 23:06:36 +08:00
[优化] 添加 Relay frps 连接和代理计数字段,重构相关逻辑以支持监控和可观测性
This commit is contained in:
@@ -1252,7 +1252,7 @@ export function NodeDetailPage({ nodeId }: { nodeId: string }) {
|
||||
{node.node_type === 'tunnel_relay' ? (
|
||||
<div className="grid gap-6 xl:grid-cols-1">
|
||||
<AppCard title="隧道运行状态" description="当前中继节点上活跃的代理通道。">
|
||||
{observability?.relay_dashboard?.proxies ? (
|
||||
{observability?.relay_dashboard?.proxies?.length ? (
|
||||
<div className="overflow-x-auto">
|
||||
<table className="w-full text-left text-sm text-[var(--foreground-secondary)]">
|
||||
<thead className="border-b border-[var(--border-default)]">
|
||||
@@ -1507,8 +1507,17 @@ export function NodeDetailPage({ nodeId }: { nodeId: string }) {
|
||||
|
||||
<AppCard title="版本信息">
|
||||
<div className="space-y-2 text-sm text-[var(--foreground-secondary)]">
|
||||
<p>Agent:{node.agent_version || 'unknown'}</p>
|
||||
<p>Nginx:{node.nginx_version || 'unknown'}</p>
|
||||
{node.node_type === 'tunnel_relay' ? (
|
||||
<>
|
||||
<p>Relay:{node.relay_version || 'unknown'}</p>
|
||||
<p>frps:{node.relay_frp_version || 'unknown'}</p>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<p>Agent:{node.agent_version || 'unknown'}</p>
|
||||
<p>Nginx:{node.nginx_version || 'unknown'}</p>
|
||||
</>
|
||||
)}
|
||||
<p>当前配置:{node.current_version || '未应用'}</p>
|
||||
</div>
|
||||
</AppCard>
|
||||
@@ -1776,7 +1785,7 @@ export function NodeDetailPage({ nodeId }: { nodeId: string }) {
|
||||
</div>
|
||||
<div>
|
||||
<p className="font-medium text-[var(--foreground-primary)]">
|
||||
OpenResty 状态消息
|
||||
状态消息
|
||||
</p>
|
||||
<p className="mt-1 break-words whitespace-pre-wrap">
|
||||
{node.openresty_message || '无'}
|
||||
|
||||
@@ -344,7 +344,9 @@ export function NodesPage() {
|
||||
/>
|
||||
</td>
|
||||
<td className="px-3 py-4 text-sm text-[var(--foreground-secondary)]">
|
||||
{node.agent_version || 'unknown'}
|
||||
{node.node_type === 'tunnel_relay'
|
||||
? node.relay_version || node.agent_version || 'unknown'
|
||||
: node.agent_version || 'unknown'}
|
||||
</td>
|
||||
<td className="px-3 py-4">
|
||||
<div className="space-y-2">
|
||||
|
||||
@@ -13,6 +13,10 @@ export interface NodeItem {
|
||||
relay_client_proxy_url: string;
|
||||
relay_auth_token: string;
|
||||
relay_status: string;
|
||||
relay_frp_version: string;
|
||||
relay_version: string;
|
||||
relay_frps_connections: number;
|
||||
relay_frps_proxy_count: number;
|
||||
geo_name: string;
|
||||
geo_latitude?: number | null;
|
||||
geo_longitude?: number | null;
|
||||
|
||||
Reference in New Issue
Block a user