fix: comma-separate D-level profiles, map restart to blue in timeline
- D-level profile names now joined with commas instead of concatenated spans - Gateway trend restart indicator changed from yellow to blue (red/orange/blue scheme) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -35,7 +35,7 @@ const statusIcon = (s: string) => {
|
|||||||
const trendColor = (item: GatewayTrendItem): string => {
|
const trendColor = (item: GatewayTrendItem): string => {
|
||||||
if (item.heartbeat_timeouts > 0) return 'var(--red)'
|
if (item.heartbeat_timeouts > 0) return 'var(--red)'
|
||||||
if (item.feishu_disconnects > 0) return 'var(--orange)'
|
if (item.feishu_disconnects > 0) return 'var(--orange)'
|
||||||
if (item.restarts > 0) return 'var(--yellow)'
|
if (item.restarts > 0) return 'var(--blue)'
|
||||||
return 'var(--green)'
|
return 'var(--green)'
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,11 +98,9 @@ function HealthBarChart({
|
|||||||
{dist.d_profiles && dist.d_profiles.length > 0 && (
|
{dist.d_profiles && dist.d_profiles.length > 0 && (
|
||||||
<div className="mt-3 pt-3 border-t" style={{ borderColor: 'var(--border)' }}>
|
<div className="mt-3 pt-3 border-t" style={{ borderColor: 'var(--border)' }}>
|
||||||
<span className="text-[12px]" style={{ color: 'var(--text-dim)' }}>D 级 Profile: </span>
|
<span className="text-[12px]" style={{ color: 'var(--text-dim)' }}>D 级 Profile: </span>
|
||||||
{dist.d_profiles.map((name) => (
|
<span className="inline-block text-[12px] px-2 py-0.5 rounded-[var(--radius-sm)]" style={{ background: 'var(--bg-hover)', color: 'var(--red)' }}>
|
||||||
<span key={name} className="inline-block text-[12px] px-2 py-0.5 mr-1 mb-1 rounded-[var(--radius-sm)]" style={{ background: 'var(--bg-hover)', color: 'var(--red)' }}>
|
{dist.d_profiles.join(', ')}
|
||||||
{name}
|
|
||||||
</span>
|
</span>
|
||||||
))}
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
@@ -207,7 +205,7 @@ export default function DashboardPage() {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
time: hourLabel(item.hour),
|
time: hourLabel(item.hour),
|
||||||
type: item.heartbeat_timeouts > 0 ? 'red' : item.feishu_disconnects > 0 ? 'orange' : item.restarts > 0 ? 'orange' : 'green',
|
type: item.heartbeat_timeouts > 0 ? 'red' : item.feishu_disconnects > 0 ? 'orange' : item.restarts > 0 ? 'blue' : 'green',
|
||||||
tooltip: tooltipText,
|
tooltip: tooltipText,
|
||||||
color: trendColor(item),
|
color: trendColor(item),
|
||||||
}
|
}
|
||||||
@@ -286,7 +284,7 @@ export default function DashboardPage() {
|
|||||||
<span><span style={{ color: 'var(--green)' }}>●</span> 正常</span>
|
<span><span style={{ color: 'var(--green)' }}>●</span> 正常</span>
|
||||||
<span><span style={{ color: 'var(--red)' }}>●</span> 心跳超时</span>
|
<span><span style={{ color: 'var(--red)' }}>●</span> 心跳超时</span>
|
||||||
<span><span style={{ color: 'var(--orange)' }}>●</span> 飞书断连</span>
|
<span><span style={{ color: 'var(--orange)' }}>●</span> 飞书断连</span>
|
||||||
<span><span style={{ color: 'var(--yellow)' }}>●</span> 重启</span>
|
<span><span style={{ color: 'var(--blue)' }}>●</span> 重启</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user