mirror of
https://github.com/ParrotXray/Mantis.git
synced 2026-08-24 18:50:28 +09:00
Fix ae_score / confidence display: MSE is unbounded, not a percentage
confidence and ae_score are both raw MSE from the LSTM autoencoder. MSE has no upper bound (anomalous flows can produce values > 1.0). - Progress bar width: Math.min(value * 100, 100)% to prevent overflow - Text display: value.toFixed(4) raw decimal, not (value * 100)% - AlertItem badge: same raw decimal, monospace font https://claude.ai/code/session_01Wen51749mAnwBEfh7XmvUw
This commit is contained in:
parent
e3bb5f251e
commit
21c9408f24
@ -308,10 +308,10 @@ const AlertDetails: React.FC<AlertDetailsProps> = ({ log, onClose, showNotificat
|
||||
<span className={`text-sm ${isDark ? 'text-gray-400' : 'text-gray-600'}`}>{label}:</span>
|
||||
<div className="flex items-center space-x-2">
|
||||
<div className={`w-24 h-2 rounded-full ${isDark ? 'bg-gray-600' : 'bg-gray-200'}`}>
|
||||
<div className={`h-2 rounded-full ${color}`} style={{ width: `${value * 100}%` }} />
|
||||
<div className={`h-2 rounded-full ${color}`} style={{ width: `${Math.min(value * 100, 100)}%` }} />
|
||||
</div>
|
||||
<span className={`text-sm font-medium ${isDark ? 'text-gray-300' : 'text-gray-900'}`}>
|
||||
{(value * 100).toFixed(1)}%
|
||||
<span className={`text-sm font-medium font-mono ${isDark ? 'text-gray-300' : 'text-gray-900'}`}>
|
||||
{value.toFixed(4)}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -471,8 +471,8 @@ const AlertItem: React.FC<AlertItemProps> = ({ log, index, onClick }) => {
|
||||
{priorityInfo.label}
|
||||
</span>
|
||||
{(log.source === 'ml' || log.source === 'fusion') && (
|
||||
<span className={`text-xs ${isDark ? 'text-gray-400' : 'text-gray-500'}`}>
|
||||
{(log.confidence * 100).toFixed(0)}% confidence
|
||||
<span className={`text-xs font-mono ${isDark ? 'text-gray-400' : 'text-gray-500'}`}>
|
||||
{log.confidence.toFixed(4)}
|
||||
</span>
|
||||
)}
|
||||
{(log.source === 'rule' || log.source === 'fusion') && log.rule_sid !== null && (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user