From 6232d8e4f280af3c7e05fc9955a269490b11a383 Mon Sep 17 00:00:00 2001 From: dushixiang Date: Mon, 15 Dec 2025 19:09:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20ICON=20=E5=92=8C=20?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/api/monitor.ts | 5 ----- web/src/components/PublicHeader.tsx | 25 +++++++++++++++++++------ web/src/pages/Public/ServerList.tsx | 25 ++++++++++--------------- 3 files changed, 29 insertions(+), 26 deletions(-) diff --git a/web/src/api/monitor.ts b/web/src/api/monitor.ts index 403239a..09624dd 100644 --- a/web/src/api/monitor.ts +++ b/web/src/api/monitor.ts @@ -44,11 +44,6 @@ export const getMonitorAgentStats = (id: string) => { return get(`/monitors/${encodeURIComponent(id)}/agents`); }; -// 公开接口 - 获取监控详情(整合版,包含stats和agents) -export const getMonitorDetail = (id: string) => { - return get(`/monitors/${encodeURIComponent(id)}`); -}; - // VictoriaMetrics 时序数据点 export interface MetricDataPoint { timestamp: number; // 毫秒时间戳 diff --git a/web/src/components/PublicHeader.tsx b/web/src/components/PublicHeader.tsx index d62c734..3912e17 100644 --- a/web/src/components/PublicHeader.tsx +++ b/web/src/components/PublicHeader.tsx @@ -1,5 +1,5 @@ import {useEffect, useState} from 'react'; -import {Activity, LogIn, ServerIcon, Settings, Menu, X} from 'lucide-react'; +import {Activity, LogIn, Menu, ServerIcon, Settings, X} from 'lucide-react'; import {getCurrentUser} from '../api/auth'; import {Link, useLocation} from "react-router-dom"; @@ -47,6 +47,18 @@ const PublicHeader = () => { activeTab = 'monitors'; } + // let systemName = window.SystemConfig?.SystemNameZh; + let systemName = "Best Zhen"; + + let leftName = ''; + let rightName = ''; + + if (systemName) { + const mid = Math.floor(systemName.length / 2); + leftName = systemName.substring(0, mid); + rightName = systemName.substring(mid); + } + return ( <>
@@ -66,7 +78,7 @@ const PublicHeader = () => {

- {window.SystemConfig?.SystemNameEn} + {leftName}{rightName}

{window.SystemConfig?.SystemNameZh} @@ -150,7 +162,8 @@ const PublicHeader = () => { {/* Mobile Menu */} {mobileMenuOpen && ( -

+
{/* Mobile Navigation */} {[ @@ -164,9 +177,9 @@ const PublicHeader = () => { className={` flex items-center gap-3 p-4 rounded-lg border transition-all ${activeTab === tab.id - ? 'bg-cyan-500/20 border-cyan-500/50 text-cyan-400' - : 'bg-cyan-500/5 border-cyan-500/20 text-slate-400 hover:bg-cyan-500/10 hover:border-cyan-500/30' - } + ? 'bg-cyan-500/20 border-cyan-500/50 text-cyan-400' + : 'bg-cyan-500/5 border-cyan-500/20 text-slate-400 hover:bg-cyan-500/10 hover:border-cyan-500/30' + } `} > diff --git a/web/src/pages/Public/ServerList.tsx b/web/src/pages/Public/ServerList.tsx index 21ad8e2..6122795 100644 --- a/web/src/pages/Public/ServerList.tsx +++ b/web/src/pages/Public/ServerList.tsx @@ -6,14 +6,14 @@ import { ArrowDown, ArrowUp, Calendar, - CheckCircle2, Cpu, Filter, HardDrive, + LinkIcon, Loader2, MemoryStick, Server, - XCircle + UnlinkIcon } from 'lucide-react'; import {getPublicTags, listAgents} from '@/api/agent.ts'; import type {Agent, LatestMetrics} from '@/types'; @@ -95,11 +95,6 @@ const ServerList = () => { refetchInterval: 30000, }); - // 根据选中的标签过滤服务器 - const filteredAgents = selectedTag - ? agents.filter(agent => agent.tags?.includes(selectedTag)) - : agents; - // 计算统计数据 const stats = useMemo(() => { const total = agents.length; @@ -173,13 +168,13 @@ const ServerList = () => { { {/* 标签过滤器 */} {allTags.length > 1 && (
-
+
FILTERS:
@@ -234,14 +230,15 @@ const ServerList = () => { ) : ( <> {/* 桌面端表格布局 */} -
+
- + @@ -334,7 +331,7 @@ const ServerList = () => { OUT: {formatSpeed(upload)} - {server.trafficLimit > 0 ? ( + {server.trafficLimit > 0 && (
@@ -346,8 +343,6 @@ const ServerList = () => { style={{width: `${((server.trafficUsed || 0) / server.trafficLimit) * 100}%`}}>
- ) : ( -
-- NO METERING --
)}
System Identity Resource Telemetry Network I/OMeta / StatusMeta / Tags