feat(report): show live slow-sql threshold in header
This commit is contained in:
@@ -453,6 +453,18 @@ function openSlowSqlDetails() {
|
||||
slowSqlDetailsOpen.value = true
|
||||
}
|
||||
|
||||
const reportSlowSqlThreshold = computed(() => {
|
||||
const runtimeThreshold = slowSqlMetrics.value?.slow_threshold_ms
|
||||
if (runtimeThreshold !== undefined && runtimeThreshold !== null) {
|
||||
return formatMs(runtimeThreshold)
|
||||
}
|
||||
const configThreshold = systemConfig.value?.db_slow_query_ms
|
||||
if (configThreshold !== undefined && configThreshold !== null) {
|
||||
return formatMs(configThreshold)
|
||||
}
|
||||
return '-'
|
||||
})
|
||||
|
||||
const configModuleItems = computed(() => [
|
||||
{ label: '定时任务', value: scheduleEnabled.value ? '启用' : '关闭' },
|
||||
{ label: '执行时间', value: scheduleTime.value || '-' },
|
||||
@@ -462,6 +474,7 @@ const configModuleItems = computed(() => [
|
||||
{ label: '全局并发', value: maxConcurrentGlobal.value || '-' },
|
||||
{ label: '单账号并发', value: maxConcurrentPerAccount.value || '-' },
|
||||
{ label: '截图并发', value: maxScreenshotConcurrent.value || '-' },
|
||||
{ label: '慢SQL阈值', value: reportSlowSqlThreshold.value },
|
||||
])
|
||||
|
||||
const mobileModules = computed(() => [
|
||||
@@ -646,6 +659,8 @@ onUnmounted(() => {
|
||||
<h2>报表中心</h2>
|
||||
<div class="hero-meta app-muted">
|
||||
<span v-if="lastUpdatedAt">更新时间:{{ lastUpdatedAt }}</span>
|
||||
<span class="hero-dot">·</span>
|
||||
<span>慢SQL阈值 {{ reportSlowSqlThreshold }}</span>
|
||||
<span v-if="serverInfo?.uptime" class="hero-dot">·</span>
|
||||
<span v-if="serverInfo?.uptime">运行 {{ serverInfo.uptime }}</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user