feat(ui): show diagnostics log state in the Brain overview
This commit is contained in:
parent
d68840202e
commit
c8101a3e54
|
|
@ -4320,7 +4320,11 @@ window.__ModuleLoader__.load({
|
|||
label: "记忆",
|
||||
value: settings.memoryEnabled === true ? "开" : "关",
|
||||
tone: settings.memoryEnabled === true ? "ok" : "muted"
|
||||
})), status?.lastCheck === null || status?.lastCheck === void 0 ? null : h$5("p", { className: BrainPanel_module_css_default.hint }, "最近检查:" + formatTime(status.lastCheck.at) + " · " + String(status.lastCheck.status ?? ""))), h$5(Card, { title: "五个 bundle 开关态" }, h$5("div", { className: BrainPanel_module_css_default.pills }, bundleKeys.map((key) => h$5(Pill, {
|
||||
}), h$5(Pill, {
|
||||
label: "诊断日志",
|
||||
value: settings.diagnosticsEnabled === false ? "关" : "开",
|
||||
tone: settings.diagnosticsEnabled === false ? "muted" : "ok"
|
||||
})), h$5("p", { className: BrainPanel_module_css_default.hint }, "诊断日志位置:$DSH_HOME/brain/logs(全局)与 <项目>/.dsh/brain/logs(项目)"), status?.lastCheck === null || status?.lastCheck === void 0 ? null : h$5("p", { className: BrainPanel_module_css_default.hint }, "最近检查:" + formatTime(status.lastCheck.at) + " · " + String(status.lastCheck.status ?? ""))), h$5(Card, { title: "五个 bundle 开关态" }, h$5("div", { className: BrainPanel_module_css_default.pills }, bundleKeys.map((key) => h$5(Pill, {
|
||||
key,
|
||||
label: BUNDLE_LABELS[key] ?? key,
|
||||
value: bundles[key] === true ? "启用" : bundles[key] === false ? "停用" : "未知",
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ export function buildStatusPayload(deps) {
|
|||
autoSummaryEnabled: view.autoSummaryEnabled,
|
||||
autoProfileEnabled: view.autoProfileEnabled,
|
||||
localMemoryK: view.localMemoryK,
|
||||
diagnosticsEnabled: view.diagnosticsEnabled,
|
||||
};
|
||||
return {
|
||||
ok: true,
|
||||
|
|
|
|||
|
|
@ -85,7 +85,9 @@ export function Overview(props: { active?: boolean }): any {
|
|||
h(Pill, { label: '服务', value: settings.baseUrlConfigured === false ? '未配置' : (settings.baseUrlOrigin || '已配置'), tone: settings.baseUrlConfigured === false ? 'warn' : 'muted' }),
|
||||
h(Pill, { label: '上报', value: settings.activityEnabled === true ? '开' : '关', tone: settings.activityEnabled === true ? 'ok' : 'muted' }),
|
||||
h(Pill, { label: '记忆', value: settings.memoryEnabled === true ? '开' : '关', tone: settings.memoryEnabled === true ? 'ok' : 'muted' }),
|
||||
h(Pill, { label: '诊断日志', value: settings.diagnosticsEnabled === false ? '关' : '开', tone: settings.diagnosticsEnabled === false ? 'muted' : 'ok' }),
|
||||
),
|
||||
h('p', { className: styles.hint }, '诊断日志位置:$DSH_HOME/brain/logs(全局)与 <项目>/.dsh/brain/logs(项目)'),
|
||||
status?.lastCheck === null || status?.lastCheck === undefined ? null : h('p', { className: styles.hint }, '最近检查:' + formatTime(status.lastCheck.at) + ' · ' + String(status.lastCheck.status ?? '')),
|
||||
),
|
||||
h(Card, { title: '五个 bundle 开关态' },
|
||||
|
|
|
|||
|
|
@ -183,6 +183,7 @@ export function buildStatusPayload(deps: RouteDeps): Record<string, unknown> {
|
|||
autoSummaryEnabled: view.autoSummaryEnabled,
|
||||
autoProfileEnabled: view.autoProfileEnabled,
|
||||
localMemoryK: view.localMemoryK,
|
||||
diagnosticsEnabled: view.diagnosticsEnabled,
|
||||
}
|
||||
return {
|
||||
ok: true,
|
||||
|
|
|
|||
Loading…
Reference in New Issue