feat: add integration event log panel
这个提交存在于:
父节点
9e267fe6bd
当前提交
0013c6d2bf
共有 7 个文件被更改,包括 45 次插入 和 21 次删除
|
|
@ -35,6 +35,8 @@ export interface IntegrationLog {
|
|||
integration_name: string
|
||||
action: string
|
||||
status: string
|
||||
request?: Record<string, unknown>
|
||||
response?: Record<string, unknown>
|
||||
error_message?: string | null
|
||||
created_at: string
|
||||
}
|
||||
|
|
|
|||
|
|
@ -191,6 +191,7 @@ const text = {
|
|||
errorLogs: "\u9519\u8bef",
|
||||
workflowLogs: "\u5de5\u4f5c\u6d41",
|
||||
integrationLogs: "\u96c6\u6210",
|
||||
integrationEvents: "\u96c6\u6210\u4e8b\u4ef6",
|
||||
auditLogs: "\u5ba1\u8ba1",
|
||||
targetType: "TargetType",
|
||||
actor: "\u64cd\u4f5c\u4eba",
|
||||
|
|
@ -260,6 +261,7 @@ const dialects = ref<ApiDialect[]>([])
|
|||
const capabilities = ref<CapabilityProfile[]>([])
|
||||
const wardrobeMatch = ref<WardrobeMatchResult | null>(null)
|
||||
const logs = ref<LogBundle>({ generation: [], workflows: [], errors: [], integrations: [], audit: [] })
|
||||
const integrationEventLogs = ref<LogBundle["integrations"]>([])
|
||||
const signedMedia = ref<MediaSignResult | null>(null)
|
||||
const settingsDraft = ref("")
|
||||
const settingsImportDraft = ref("")
|
||||
|
|
@ -451,11 +453,12 @@ async function load() {
|
|||
}
|
||||
|
||||
async function loadLogs() {
|
||||
const [generation, workflows, errors, integrations, audit] = await Promise.allSettled([
|
||||
const [generation, workflows, errors, integrations, integrationEvents, audit] = await Promise.allSettled([
|
||||
getJson<LogBundle["generation"]>(endpoints.generationLogs, { limit: 12 }),
|
||||
getJson<LogBundle["workflows"]>(endpoints.workflowLogs, { limit: 12 }),
|
||||
getJson<LogBundle["errors"]>(endpoints.errorLogs, { limit: 12 }),
|
||||
getJson<LogBundle["integrations"]>(endpoints.integrationLogs, { limit: 12 }),
|
||||
getJson<LogBundle["integrations"]>(endpoints.integrationEventLogs),
|
||||
getJson<LogBundle["audit"]>(endpoints.auditLogs, { limit: 12 }),
|
||||
])
|
||||
logs.value = {
|
||||
|
|
@ -465,6 +468,7 @@ async function loadLogs() {
|
|||
integrations: settledValue(integrations),
|
||||
audit: settledValue(audit),
|
||||
}
|
||||
integrationEventLogs.value = settledValue(integrationEvents)
|
||||
}
|
||||
|
||||
async function loadAuditLogs() {
|
||||
|
|
@ -2349,6 +2353,24 @@ function storageRootBytes(uriPrefix: string) {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="list-view">
|
||||
<header>
|
||||
<h2>{{ text.integrationEvents }}</h2>
|
||||
<span>{{ integrationEventLogs.length }}</span>
|
||||
</header>
|
||||
<ul>
|
||||
<li v-for="item in integrationEventLogs" :key="`event-${item.integration_log_id}`">
|
||||
<div>
|
||||
<strong>{{ item.integration_name }}</strong>
|
||||
<small>{{ item.action }} / {{ item.created_at }}</small>
|
||||
</div>
|
||||
<span class="badge">{{ item.status }}</span>
|
||||
</li>
|
||||
<li v-if="!integrationEventLogs.length" class="empty">{{ text.emptyIntegrationLogs }}</li>
|
||||
</ul>
|
||||
<pre v-if="integrationEventLogs.length">{{ JSON.stringify(integrationEventLogs[0], null, 2) }}</pre>
|
||||
</div>
|
||||
|
||||
<div class="list-view">
|
||||
<header>
|
||||
<h2>{{ text.auditLogs }}</h2>
|
||||
|
|
|
|||
文件差异因一行或多行过长而隐藏
文件差异因一行或多行过长而隐藏
17
web/assets/index-tce9D-Z6.js
普通文件
17
web/assets/index-tce9D-Z6.js
普通文件
文件差异因一行或多行过长而隐藏
文件差异因一行或多行过长而隐藏
|
|
@ -1,3 +1,3 @@
|
|||
<script type="module" crossorigin src="/api/v1/plugins/extensions/astrbot_plugin_imagestudio/web/assets/index-DvLE7l5o.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/api/v1/plugins/extensions/astrbot_plugin_imagestudio/web/assets/index-xqawizKu.css">
|
||||
<script type="module" crossorigin src="/api/v1/plugins/extensions/astrbot_plugin_imagestudio/web/assets/index-tce9D-Z6.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/api/v1/plugins/extensions/astrbot_plugin_imagestudio/web/assets/index-BdP4se3A.css">
|
||||
<div id="app"></div>
|
||||
|
|
|
|||
正在加载…
添加表格
在新工单中引用