Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
f7c8377a
Commit
f7c8377a
authored
Apr 23, 2026
by
erio
Browse files
fix(monitor): remove UNAVAILABLE status, keep only OPERATIONAL/DEGRADED
parent
0dcc0e05
Changes
2
Show whitespace changes
Inline
Side-by-side
frontend/src/components/user/monitor/MonitorHero.vue
View file @
f7c8377a
...
...
@@ -67,7 +67,7 @@ import AutoRefreshButton from '@/components/common/AutoRefreshButton.vue'
import
{
useChannelMonitorFormat
}
from
'
@/composables/useChannelMonitorFormat
'
export
type
MonitorWindow
=
'
7d
'
|
'
15d
'
|
'
30d
'
export
type
OverallStatus
=
'
operational
'
|
'
degraded
'
|
'
unavailable
'
export
type
OverallStatus
=
'
operational
'
|
'
degraded
'
const
props
=
defineProps
<
{
overallStatus
:
OverallStatus
...
...
@@ -106,10 +106,8 @@ const overallChipClass = computed(() => {
case
'
operational
'
:
return
'
bg-emerald-100 text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300
'
case
'
degraded
'
:
return
'
bg-amber-100 text-amber-700 dark:bg-amber-500/15 dark:text-amber-300
'
case
'
unavailable
'
:
default
:
return
'
bg-
red
-100 text-
red
-700 dark:bg-
red
-500/15 dark:text-
red
-300
'
return
'
bg-
amber
-100 text-
amber
-700 dark:bg-
amber
-500/15 dark:text-
amber
-300
'
}
})
...
...
@@ -118,10 +116,8 @@ const overallDotClass = computed(() => {
case
'
operational
'
:
return
'
bg-emerald-500 animate-pulse
'
case
'
degraded
'
:
return
'
bg-amber-500 animate-pulse
'
case
'
unavailable
'
:
default
:
return
'
bg-
red
-500 animate-pulse
'
return
'
bg-
amber
-500 animate-pulse
'
}
})
...
...
frontend/src/views/user/ChannelStatusView.vue
View file @
f7c8377a
...
...
@@ -75,16 +75,11 @@ const countdown = autoRefresh.countdown
// ── Computed ──
const
overallStatus
=
computed
<
OverallStatus
>
(()
=>
{
const
total
=
items
.
value
.
length
if
(
total
===
0
)
return
'
operational
'
let
failCount
=
0
let
degradedCount
=
0
if
(
items
.
value
.
length
===
0
)
return
'
operational
'
for
(
const
it
of
items
.
value
)
{
if
(
it
.
primary_status
===
'
failed
'
||
it
.
primary_status
===
'
error
'
)
failCount
++
else
if
(
it
.
primary_status
!==
STATUS_OPERATIONAL
)
degraded
Count
++
if
(
it
.
primary_status
===
'
failed
'
||
it
.
primary_status
===
'
error
'
)
return
'
degraded
'
if
(
it
.
primary_status
!==
STATUS_OPERATIONAL
)
return
'
degraded
'
}
if
(
failCount
>
total
/
2
)
return
'
unavailable
'
if
(
failCount
>
0
||
degradedCount
>
0
)
return
'
degraded
'
return
'
operational
'
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment