mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-29 02:46:38 +00:00
Update notification service
This commit is contained in:
@@ -983,8 +983,8 @@ export function LatencyDetailModal({ open, onOpenChange, currentLatency }: Laten
|
|||||||
<AreaChart data={realtimeChartData}>
|
<AreaChart data={realtimeChartData}>
|
||||||
<defs>
|
<defs>
|
||||||
<linearGradient id="latencyRealtimeGradient" x1="0" y1="0" x2="0" y2="1">
|
<linearGradient id="latencyRealtimeGradient" x1="0" y1="0" x2="0" y2="1">
|
||||||
<stop offset="5%" stopColor="#3b82f6" stopOpacity={0.3} />
|
<stop offset="0%" stopColor="#3b82f6" stopOpacity={0.4} />
|
||||||
<stop offset="95%" stopColor="#3b82f6" stopOpacity={0} />
|
<stop offset="100%" stopColor="#3b82f6" stopOpacity={0.05} />
|
||||||
</linearGradient>
|
</linearGradient>
|
||||||
</defs>
|
</defs>
|
||||||
<CartesianGrid strokeDasharray="3 3" stroke="#374151" opacity={0.3} />
|
<CartesianGrid strokeDasharray="3 3" stroke="#374151" opacity={0.3} />
|
||||||
@@ -999,8 +999,8 @@ export function LatencyDetailModal({ open, onOpenChange, currentLatency }: Laten
|
|||||||
stroke="#6b7280"
|
stroke="#6b7280"
|
||||||
fontSize={10}
|
fontSize={10}
|
||||||
tickLine={false}
|
tickLine={false}
|
||||||
domain={['dataMin - 5', 'dataMax + 10']}
|
domain={[(dataMin: number) => Math.max(0, dataMin - Math.max(5, dataMin * 0.5)), (dataMax: number) => dataMax + Math.max(10, dataMax * 0.3)]}
|
||||||
tickFormatter={(v) => `${v}ms`}
|
tickFormatter={(v) => `${v.toFixed(1)}ms`}
|
||||||
/>
|
/>
|
||||||
<Tooltip content={<CustomTooltip />} />
|
<Tooltip content={<CustomTooltip />} />
|
||||||
<Area
|
<Area
|
||||||
@@ -1011,6 +1011,7 @@ export function LatencyDetailModal({ open, onOpenChange, currentLatency }: Laten
|
|||||||
fill="url(#latencyRealtimeGradient)"
|
fill="url(#latencyRealtimeGradient)"
|
||||||
dot={{ fill: '#3b82f6', strokeWidth: 0, r: 3 }}
|
dot={{ fill: '#3b82f6', strokeWidth: 0, r: 3 }}
|
||||||
activeDot={{ r: 5, fill: '#3b82f6' }}
|
activeDot={{ r: 5, fill: '#3b82f6' }}
|
||||||
|
baseValue="dataMin"
|
||||||
/>
|
/>
|
||||||
</AreaChart>
|
</AreaChart>
|
||||||
</ResponsiveContainer>
|
</ResponsiveContainer>
|
||||||
@@ -1031,8 +1032,8 @@ export function LatencyDetailModal({ open, onOpenChange, currentLatency }: Laten
|
|||||||
<AreaChart data={chartData}>
|
<AreaChart data={chartData}>
|
||||||
<defs>
|
<defs>
|
||||||
<linearGradient id="latencyGradient" x1="0" y1="0" x2="0" y2="1">
|
<linearGradient id="latencyGradient" x1="0" y1="0" x2="0" y2="1">
|
||||||
<stop offset="5%" stopColor="#3b82f6" stopOpacity={0.3} />
|
<stop offset="0%" stopColor="#3b82f6" stopOpacity={0.4} />
|
||||||
<stop offset="95%" stopColor="#3b82f6" stopOpacity={0} />
|
<stop offset="100%" stopColor="#3b82f6" stopOpacity={0.05} />
|
||||||
</linearGradient>
|
</linearGradient>
|
||||||
</defs>
|
</defs>
|
||||||
<CartesianGrid strokeDasharray="3 3" stroke="#374151" opacity={0.3} />
|
<CartesianGrid strokeDasharray="3 3" stroke="#374151" opacity={0.3} />
|
||||||
@@ -1047,8 +1048,8 @@ export function LatencyDetailModal({ open, onOpenChange, currentLatency }: Laten
|
|||||||
stroke="#6b7280"
|
stroke="#6b7280"
|
||||||
fontSize={10}
|
fontSize={10}
|
||||||
tickLine={false}
|
tickLine={false}
|
||||||
domain={['dataMin - 5', 'dataMax + 10']}
|
domain={[(dataMin: number) => Math.max(0, dataMin - Math.max(5, dataMin * 0.5)), (dataMax: number) => dataMax + Math.max(10, dataMax * 0.3)]}
|
||||||
tickFormatter={(v) => `${v}ms`}
|
tickFormatter={(v) => `${v.toFixed(1)}ms`}
|
||||||
/>
|
/>
|
||||||
<Tooltip content={<CustomTooltip />} />
|
<Tooltip content={<CustomTooltip />} />
|
||||||
<Area
|
<Area
|
||||||
@@ -1057,6 +1058,7 @@ export function LatencyDetailModal({ open, onOpenChange, currentLatency }: Laten
|
|||||||
stroke="#3b82f6"
|
stroke="#3b82f6"
|
||||||
strokeWidth={2}
|
strokeWidth={2}
|
||||||
fill="url(#latencyGradient)"
|
fill="url(#latencyGradient)"
|
||||||
|
baseValue="dataMin"
|
||||||
/>
|
/>
|
||||||
</AreaChart>
|
</AreaChart>
|
||||||
</ResponsiveContainer>
|
</ResponsiveContainer>
|
||||||
|
|||||||
@@ -408,14 +408,13 @@ export function NetworkMetrics() {
|
|||||||
{latencyData?.data && latencyData.data.length > 0 && (
|
{latencyData?.data && latencyData.data.length > 0 && (
|
||||||
<div className="h-[40px] w-full">
|
<div className="h-[40px] w-full">
|
||||||
<ResponsiveContainer width="100%" height="100%">
|
<ResponsiveContainer width="100%" height="100%">
|
||||||
<AreaChart data={latencyData.data.slice(-30)} margin={{ top: 0, right: 0, left: 0, bottom: 0 }}>
|
<AreaChart data={latencyData.data.slice(-30)} margin={{ top: 2, right: 0, left: 0, bottom: 0 }}>
|
||||||
<defs>
|
<defs>
|
||||||
<linearGradient id="latencySparkGradient" x1="0" y1="0" x2="0" y2="1">
|
<linearGradient id="latencySparkGradient" x1="0" y1="0" x2="0" y2="1">
|
||||||
<stop offset="0%" stopColor="#3b82f6" stopOpacity={0.3} />
|
<stop offset="0%" stopColor="#3b82f6" stopOpacity={0.4} />
|
||||||
<stop offset="100%" stopColor="#3b82f6" stopOpacity={0} />
|
<stop offset="100%" stopColor="#3b82f6" stopOpacity={0.05} />
|
||||||
</linearGradient>
|
</linearGradient>
|
||||||
</defs>
|
</defs>
|
||||||
<YAxis hide domain={['dataMin - 5', 'dataMax + 5']} />
|
|
||||||
<Area
|
<Area
|
||||||
type="monotone"
|
type="monotone"
|
||||||
dataKey="value"
|
dataKey="value"
|
||||||
@@ -423,6 +422,8 @@ export function NetworkMetrics() {
|
|||||||
strokeWidth={1.5}
|
strokeWidth={1.5}
|
||||||
fill="url(#latencySparkGradient)"
|
fill="url(#latencySparkGradient)"
|
||||||
dot={false}
|
dot={false}
|
||||||
|
isAnimationActive={false}
|
||||||
|
baseValue="dataMin"
|
||||||
/>
|
/>
|
||||||
</AreaChart>
|
</AreaChart>
|
||||||
</ResponsiveContainer>
|
</ResponsiveContainer>
|
||||||
|
|||||||
Reference in New Issue
Block a user