feat: add return classification for archive chart, CARD API integration, compliance charts, systemd services
This commit is contained in:
@@ -76,6 +76,7 @@ function ArchiveTooltip({ active, payload, label }) {
|
||||
// Parse classification if present
|
||||
const dataPoint = payload[0]?.payload;
|
||||
const classification = dataPoint?.classification;
|
||||
const returnClassification = dataPoint?.return_classification;
|
||||
|
||||
return (
|
||||
<div style={{
|
||||
@@ -133,6 +134,37 @@ function ArchiveTooltip({ active, payload, label }) {
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
{returnClassification && returned > 0 && (returnClassification.bu_reassignment > 0 || returnClassification.severity_drift > 0 || returnClassification.closed_on_platform > 0 || returnClassification.decommissioned > 0) && (
|
||||
<div style={{ borderTop: '1px solid rgba(255,255,255,0.06)', marginTop: '0.35rem', paddingTop: '0.3rem' }}>
|
||||
<div style={{ color: '#475569', fontSize: '0.58rem', textTransform: 'uppercase', letterSpacing: '0.06em', marginBottom: '0.2rem' }}>
|
||||
Returned because
|
||||
</div>
|
||||
{returnClassification.bu_reassignment > 0 && (
|
||||
<div style={{ color: '#FB923C', fontSize: '0.62rem', display: 'flex', justifyContent: 'space-between', gap: '1rem' }}>
|
||||
<span style={{ opacity: 0.8 }}>BU reassigned back</span>
|
||||
<span>{returnClassification.bu_reassignment}</span>
|
||||
</div>
|
||||
)}
|
||||
{returnClassification.severity_drift > 0 && (
|
||||
<div style={{ color: '#A78BFA', fontSize: '0.62rem', display: 'flex', justifyContent: 'space-between', gap: '1rem' }}>
|
||||
<span style={{ opacity: 0.8 }}>Severity re-escalated</span>
|
||||
<span>{returnClassification.severity_drift}</span>
|
||||
</div>
|
||||
)}
|
||||
{returnClassification.closed_on_platform > 0 && (
|
||||
<div style={{ color: SKY, fontSize: '0.62rem', display: 'flex', justifyContent: 'space-between', gap: '1rem' }}>
|
||||
<span style={{ opacity: 0.8 }}>Reopened on platform</span>
|
||||
<span>{returnClassification.closed_on_platform}</span>
|
||||
</div>
|
||||
)}
|
||||
{returnClassification.decommissioned > 0 && (
|
||||
<div style={{ color: '#94A3B8', fontSize: '0.62rem', display: 'flex', justifyContent: 'space-between', gap: '1rem' }}>
|
||||
<span style={{ opacity: 0.8 }}>Re-provisioned</span>
|
||||
<span>{returnClassification.decommissioned}</span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -219,10 +251,11 @@ export default function IvantiCountsChart() {
|
||||
archived: anomaly.newly_archived_count || 0,
|
||||
returned: anomaly.returned_count || 0,
|
||||
classification: anomaly.classification || {},
|
||||
return_classification: anomaly.return_classification || {},
|
||||
is_significant: anomaly.is_significant,
|
||||
};
|
||||
}
|
||||
return { date: point.date, archived: 0, returned: 0, classification: {}, is_significant: false };
|
||||
return { date: point.date, archived: 0, returned: 0, classification: {}, return_classification: {}, is_significant: false };
|
||||
});
|
||||
}, [anomalies, chartData]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user