feat: add monitoring settings tab, workbench view, and inspection alert improvements
Some checks failed
AI automation / Route event (push) Has been cancelled
AI automation / Hand reopened issue to maintainers (push) Has been cancelled
AI automation / Clean source issue state (push) Has been cancelled
AI automation / Reconcile handoffs (push) Has been cancelled
AI automation / Classify issue (push) Has been cancelled
AI automation / Claude Code smoke (push) Has been cancelled
AI automation / Review issue follow-up (push) Has been cancelled
AI automation / Publish issue follow-up (push) Has been cancelled
AI automation / Implement with Claude Code (push) Has been cancelled
AI automation / Publish implement PR (push) Has been cancelled
AI automation / Continue queued issue comments (push) Has been cancelled
AI automation / Codex review loop (push) Has been cancelled
AI automation / Publish Codex fix (push) Has been cancelled
AI automation / Clear Codex dispatch marker (push) Has been cancelled
AI automation / Own PR re-request Codex (push) Has been cancelled
AI automation / External PR re-request Codex (push) Has been cancelled
AI automation / Poll Codex reaction / retry (push) Has been cancelled
Some checks failed
AI automation / Route event (push) Has been cancelled
AI automation / Hand reopened issue to maintainers (push) Has been cancelled
AI automation / Clean source issue state (push) Has been cancelled
AI automation / Reconcile handoffs (push) Has been cancelled
AI automation / Classify issue (push) Has been cancelled
AI automation / Claude Code smoke (push) Has been cancelled
AI automation / Review issue follow-up (push) Has been cancelled
AI automation / Publish issue follow-up (push) Has been cancelled
AI automation / Implement with Claude Code (push) Has been cancelled
AI automation / Publish implement PR (push) Has been cancelled
AI automation / Continue queued issue comments (push) Has been cancelled
AI automation / Codex review loop (push) Has been cancelled
AI automation / Publish Codex fix (push) Has been cancelled
AI automation / Clear Codex dispatch marker (push) Has been cancelled
AI automation / Own PR re-request Codex (push) Has been cancelled
AI automation / External PR re-request Codex (push) Has been cancelled
AI automation / Poll Codex reaction / retry (push) Has been cancelled
This commit is contained in:
@@ -80,8 +80,8 @@ export default function SettingsApplicationTab({ updateState, checkNow, openRele
|
||||
}, [monitoringTitle, reportProductName]);
|
||||
|
||||
// 远程 HTTP Server 状态
|
||||
const [remoteStatus, setRemoteStatus] = useState<{ running: boolean; port: number; token: string | null }>({
|
||||
running: false, port: 8848, token: null,
|
||||
const [remoteStatus, setRemoteStatus] = useState<{ running: boolean; port: number; token: string | null; url: string | null }>({
|
||||
running: false, port: 8848, token: null, url: null,
|
||||
});
|
||||
const [remoteLoading, setRemoteLoading] = useState(false);
|
||||
const [remotePortDraft, setRemotePortDraft] = useState("8848");
|
||||
@@ -90,7 +90,12 @@ export default function SettingsApplicationTab({ updateState, checkNow, openRele
|
||||
try {
|
||||
const s = await (window as any).netcatty?.remoteHttp?.getStatus?.();
|
||||
if (s) {
|
||||
setRemoteStatus({ running: !!s.running, port: s.port || 8848, token: s.token || null });
|
||||
setRemoteStatus({
|
||||
running: !!s.running,
|
||||
port: s.port || 8848,
|
||||
token: s.token || null,
|
||||
url: s.url || null,
|
||||
});
|
||||
setRemotePortDraft(String(s.port || 8848));
|
||||
}
|
||||
} catch {}
|
||||
@@ -172,6 +177,7 @@ export default function SettingsApplicationTab({ updateState, checkNow, openRele
|
||||
running: !!checked,
|
||||
port: res.port || port,
|
||||
token: res.token || remoteStatus.token,
|
||||
url: res.url || null,
|
||||
});
|
||||
setRemotePortDraft(String(res.port || port));
|
||||
if (checked) toast.success("远程访问已启动");
|
||||
@@ -189,10 +195,9 @@ export default function SettingsApplicationTab({ updateState, checkNow, openRele
|
||||
};
|
||||
|
||||
const handleCopyUrl = async () => {
|
||||
if (!remoteStatus.token) { toast.error("请先启用远程访问"); return; }
|
||||
const url = `http://localhost:${remoteStatus.port}/dashboard?token=${remoteStatus.token}`;
|
||||
if (!remoteStatus.url) { toast.error("请先启用远程访问"); return; }
|
||||
try {
|
||||
await navigator.clipboard.writeText(url);
|
||||
await navigator.clipboard.writeText(remoteStatus.url);
|
||||
toast.success("访问链接已复制");
|
||||
} catch {
|
||||
toast.error("复制失败");
|
||||
@@ -308,11 +313,11 @@ export default function SettingsApplicationTab({ updateState, checkNow, openRele
|
||||
<span className="text-xs text-muted-foreground ml-2">(默认 8848,修改后需重启远程访问生效)</span>
|
||||
</div>
|
||||
|
||||
{remoteStatus.running && remoteStatus.token && (
|
||||
{remoteStatus.running && remoteStatus.url && (
|
||||
<div className="flex items-center gap-2">
|
||||
<Globe size={14} className="text-muted-foreground shrink-0" />
|
||||
<code className="flex-1 px-2 py-1 rounded-md bg-muted text-xs text-foreground truncate select-all">
|
||||
http://localhost:{remoteStatus.port}/dashboard?token={remoteStatus.token}
|
||||
{remoteStatus.url}
|
||||
</code>
|
||||
<Button variant="outline" size="sm" onClick={handleCopyUrl} className="shrink-0">
|
||||
<Copy size={14} className="mr-1" /> 复制
|
||||
|
||||
Reference in New Issue
Block a user