mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-07 13:28:39 +08:00
Merge pull request #4057 from feitianbubu/fix/ops-sla-zero-window
fix(ops): show neutral SLA card when window has no requests
This commit is contained in:
@@ -394,6 +394,7 @@ const tpsAvgLabel = computed(() => {
|
||||
const slaPercent = computed(() => {
|
||||
const v = overview.value?.sla
|
||||
if (typeof v !== 'number') return null
|
||||
if ((overview.value?.request_count_sla ?? 0) <= 0) return null
|
||||
return v * 100
|
||||
})
|
||||
|
||||
@@ -1272,7 +1273,7 @@ function handleToolbarRefresh() {
|
||||
<div class="mt-3 text-xs">
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-500">{{ t('admin.ops.exceptions') }}:</span>
|
||||
<span class="font-bold text-red-600 dark:text-red-400">{{ formatNumber((overview.request_count_sla ?? 0) - (overview.success_count ?? 0)) }}</span>
|
||||
<span class="font-bold text-gray-900 dark:text-white">{{ formatNumber((overview.request_count_sla ?? 0) - (overview.success_count ?? 0)) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user