feat(宏观): ifinance 分类动态挂载为宏观 tab, 报警迁入监控, 下线油价/本地经济数据/策略研究
Docker Build and Push / build-image (push) Successful in 2m37s

- 宏观只保留本地 新闻/经济文章, 外接 ifinance categories[] 动态成为 tab (纯前端直连, CORS/_headers, https)
- 报警从宏观迁到监控第 4 个 tab (保留 Alert 模块, 供未来新增报警源)
- 彻底删除油价/经济数据/策略研究: 前端组件+api、后端 apizero/data 路由、cron、fetchers、种子数据
- 新增迁移 DROP Indicator/IndicatorPoint/Strategy/OilPriceHistory; 重新生成 Prisma Client
- CSP 放开 *.honor3.com (含端口通配), 避免新增子域反复重装外壳
This commit is contained in:
jif2.zhang
2026-10-30 17:17:10 +08:00
parent 82c4ae8a84
commit afbb9bc603
66 changed files with 995 additions and 9916 deletions
+16 -2
View File
@@ -1,15 +1,18 @@
import { useEffect, useState, useCallback } from 'react'
import { useNavigate } from 'react-router-dom'
import { Card, Empty, DotLoading } from 'antd-mobile'
import { Badge, Card, Empty, DotLoading } from 'antd-mobile'
import { api } from '../api/client.js'
import PageHeader from '../components/PageHeader.jsx'
import SwipeTabs from '../components/SwipeTabs.jsx'
import useRefreshOnVisible from '../hooks/useRefreshOnVisible.js'
import EnvView from './monitor/EnvView.jsx'
import AlertsView from './monitor/AlertsView.jsx'
// 监控页: 两个横向分类
// 监控页: 四个横向分类
// - 主机监控: 实时数据来自 komari (服务端实时代理, 不落库), 点击节点看 24h 时序
// - 服务监控: 暂留空占位
// - 环境监控: 米家温湿度
// - 报警: V0.2.2 从「宏观」迁入, 数据差异/任务异常按时间倒序
function fmtTime(s) {
if (!s) return ''
const d = new Date(s)
@@ -40,10 +43,21 @@ function pct(used, total) {
export default function MonitorPage() {
const [active, setActive] = useState('servers')
// 报警角标: 由 AlertsView 回传总数
const [alertCount, setAlertCount] = useState(0)
const tabs = [
{ key: 'servers', label: '主机监控', render: () => <ServerView /> },
{ key: 'services', label: '服务监控', render: () => <ServiceView /> },
{ key: 'env', label: '环境监控', render: () => <EnvView /> },
{
key: 'alerts',
label: (
<span className="tab-label">
报警{alertCount > 0 && <Badge content={alertCount} />}
</span>
),
render: () => <AlertsView onCount={setAlertCount} />,
},
]
return (
<div className="page-with-navbar">