{contextHolder}
-
- } onClick={loadShareJobs} disabled={pending} aria-label="刷新" />
-
+
+ 共 {jobs.length} 个导入任务
+
+ } onClick={loadShareJobs} disabled={pending} aria-label="刷新" />
+ } onClick={() => setCreateOpen(true)}>
+ 新建导入任务
+
+
+
{error ? (
重试} />
) : null}
diff --git a/web/src/pages/browsers/index.tsx b/web/src/pages/browsers/index.tsx
index cc18264..aa9ca9f 100644
--- a/web/src/pages/browsers/index.tsx
+++ b/web/src/pages/browsers/index.tsx
@@ -2,11 +2,10 @@
// 动作保持显式动词(start/stop/recycle),启停禁用条件与归档版一致。
import { useCallback, useEffect, useState } from 'react';
import { history } from '@umijs/max';
-import { Alert, Button, Card, Popconfirm, Space, Table, Tag, Typography, message } from 'antd';
+import { Alert, Button, Card, Flex, Popconfirm, Space, Table, Tag, Typography, message } from 'antd';
import { CopyOutlined, PlusOutlined } from '@ant-design/icons';
import type { ColumnsType } from 'antd/es/table';
import { browserAction, getList } from '@/services/api';
-import { usePageActions } from '@/components/PageActions';
const stateText: Record = {
created: '已创建',
@@ -160,15 +159,15 @@ export default function Page() {
},
];
- usePageActions(
- } onClick={() => history.push('/browsers/new')}>
- 创建环境
- ,
- );
-
return (
{contextHolder}
+
+ 共 {runtimes.length} 个运行环境
+ } onClick={() => history.push('/browsers/new')}>
+ 创建环境
+
+
{error ? (
重试} />
) : null}
diff --git a/web/src/pages/gateways/index.tsx b/web/src/pages/gateways/index.tsx
index 06bf1b8..607c089 100644
--- a/web/src/pages/gateways/index.tsx
+++ b/web/src/pages/gateways/index.tsx
@@ -1,11 +1,10 @@
// 网关管理:语义对齐 web.archived GatewaysPage.jsx(注册/编辑 Modal、令牌显隐复制、删除)。
import { useCallback, useEffect, useState } from 'react';
-import { Alert, Button, Card, Form, Input, Modal, Popconfirm, Space, Table, Typography, message } from 'antd';
+import { Alert, Button, Card, Flex, Form, Input, Modal, Popconfirm, Space, Table, Typography, message } from 'antd';
import { CopyOutlined, EyeInvisibleOutlined, EyeOutlined, PlusOutlined } from '@ant-design/icons';
import type { ColumnsType } from 'antd/es/table';
import { create, getList, remove, update } from '@/services/api';
import { conflictMessage } from '@/utils/helpers';
-import { usePageActions } from '@/components/PageActions';
const namePattern = /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;
const tokenPattern = /^[A-Za-z0-9][A-Za-z0-9._-]{15,127}$/;
@@ -23,7 +22,7 @@ function GatewayFormModal({
busy: boolean;
error: any;
onCancel: () => void;
- onSubmit: (values: { name: string; endpoint: string; token: string }) => Promise;
+ onSubmit: (values: { name: string; endpoint: string; token?: string }) => Promise;
}) {
const editing = initial !== null;
const [form] = Form.useForm<{ name: string; endpoint: string; token?: string }>();
@@ -99,7 +98,7 @@ export default function Page() {
load();
}, [load]);
- async function createGateway(values: { name: string; endpoint: string; token: string }): Promise {
+ async function createGateway(values: { name: string; endpoint: string; token?: string }): Promise {
setBusy('create');
try {
const record = await create('gateways', values);
@@ -115,7 +114,7 @@ export default function Page() {
}
}
- async function updateGateway(values: { name: string; endpoint: string; token: string }): Promise {
+ async function updateGateway(values: { name: string; endpoint: string; token?: string }): Promise {
if (!editing) return false;
setBusy('edit');
try {
@@ -170,15 +169,15 @@ export default function Page() {
},
];
- usePageActions(
- } onClick={() => setCreateOpen(true)}>
- 注册网关
- ,
- );
-
return (
{contextHolder}
+
+ 共 {gateways.length} 个网关
+ } onClick={() => setCreateOpen(true)}>
+ 注册网关
+
+
{created ? (
= {
unchecked: '未检测',
@@ -278,15 +277,15 @@ export default function Page() {
},
];
- usePageActions(
- } onClick={() => setCreateOpen(true)}>
- 创建网络出口
- ,
- );
-
return (
{contextHolder}
+
+ 共 {exits.length} 个网络出口
+ } onClick={() => setCreateOpen(true)}>
+ 创建网络出口
+
+
{error ? (
重试} />
) : null}
diff --git a/web/src/pages/tasks/index.tsx b/web/src/pages/tasks/index.tsx
index 5f8ab79..8d67191 100644
--- a/web/src/pages/tasks/index.tsx
+++ b/web/src/pages/tasks/index.tsx
@@ -1,7 +1,7 @@
// 任务中心列表:语义对齐 web.archived TasksPage.jsx 的 TaskList。
import { useCallback, useEffect, useState } from 'react';
import { history } from '@umijs/max';
-import { Alert, Button, Card, Input, Select, Space, Table, Tag, Typography } from 'antd';
+import { Alert, Button, Card, Flex, Input, Select, Space, Table, Tag, Typography } from 'antd';
import type { ColumnsType } from 'antd/es/table';
import { getList } from '@/services/api';
import { dateTime } from '@/utils/helpers';
@@ -112,23 +112,26 @@ export default function Page() {
return (