fix(web): show source mismatch reason in status chain
This commit is contained in:
@@ -3672,7 +3672,7 @@
|
|||||||
"mcpDetail": "top={topTool}; first-class={firstClass}; legacy={legacy}; policy={policy}",
|
"mcpDetail": "top={topTool}; first-class={firstClass}; legacy={legacy}; policy={policy}",
|
||||||
"source": "Sentry / SigNoz",
|
"source": "Sentry / SigNoz",
|
||||||
"sourceValue": "{status}; direct {direct}, candidate {candidate}, applied {applied}",
|
"sourceValue": "{status}; direct {direct}, candidate {candidate}, applied {applied}",
|
||||||
"sourceDetail": "{providers}",
|
"sourceDetail": "{providers}; reason={reason}",
|
||||||
"execution": "Executor",
|
"execution": "Executor",
|
||||||
"executionValue": "{executor} / {status}",
|
"executionValue": "{executor} / {status}",
|
||||||
"executionDetail": "operation={operation}; action={action}; ops={ops}",
|
"executionDetail": "operation={operation}; action={action}; ops={ops}",
|
||||||
@@ -3689,7 +3689,15 @@
|
|||||||
"directCandidate": "Direct / Candidate / Applied",
|
"directCandidate": "Direct / Candidate / Applied",
|
||||||
"directCandidateValue": "{direct} / {candidate} / {applied}",
|
"directCandidateValue": "{direct} / {candidate} / {applied}",
|
||||||
"latestApplied": "最新套用事件",
|
"latestApplied": "最新套用事件",
|
||||||
|
"reason": "未匹配原因",
|
||||||
"providers": "Provider",
|
"providers": "Provider",
|
||||||
|
"reasons": {
|
||||||
|
"providerHeartbeatNoMatch": "Provider 有心跳,但這個 Incident 尚未匹配",
|
||||||
|
"noMatchingProviderSourceEvent": "查無可匹配的 Sentry / SigNoz 事件",
|
||||||
|
"noIncidentIds": "缺 Incident ID,無法關聯",
|
||||||
|
"incidentNotFound": "Incident 記錄不存在",
|
||||||
|
"fetchFailed": "讀取來源關聯失敗"
|
||||||
|
},
|
||||||
"flow": {
|
"flow": {
|
||||||
"providerIngress": "Provider 接收",
|
"providerIngress": "Provider 接收",
|
||||||
"sourceEvidence": "來源證據",
|
"sourceEvidence": "來源證據",
|
||||||
|
|||||||
@@ -3672,7 +3672,7 @@
|
|||||||
"mcpDetail": "top={topTool}; first-class={firstClass}; legacy={legacy}; policy={policy}",
|
"mcpDetail": "top={topTool}; first-class={firstClass}; legacy={legacy}; policy={policy}",
|
||||||
"source": "Sentry / SigNoz",
|
"source": "Sentry / SigNoz",
|
||||||
"sourceValue": "{status}; direct {direct}, candidate {candidate}, applied {applied}",
|
"sourceValue": "{status}; direct {direct}, candidate {candidate}, applied {applied}",
|
||||||
"sourceDetail": "{providers}",
|
"sourceDetail": "{providers}; reason={reason}",
|
||||||
"execution": "Executor",
|
"execution": "Executor",
|
||||||
"executionValue": "{executor} / {status}",
|
"executionValue": "{executor} / {status}",
|
||||||
"executionDetail": "operation={operation}; action={action}; ops={ops}",
|
"executionDetail": "operation={operation}; action={action}; ops={ops}",
|
||||||
@@ -3689,7 +3689,15 @@
|
|||||||
"directCandidate": "Direct / Candidate / Applied",
|
"directCandidate": "Direct / Candidate / Applied",
|
||||||
"directCandidateValue": "{direct} / {candidate} / {applied}",
|
"directCandidateValue": "{direct} / {candidate} / {applied}",
|
||||||
"latestApplied": "最新套用事件",
|
"latestApplied": "最新套用事件",
|
||||||
|
"reason": "未匹配原因",
|
||||||
"providers": "Provider",
|
"providers": "Provider",
|
||||||
|
"reasons": {
|
||||||
|
"providerHeartbeatNoMatch": "Provider 有心跳,但這個 Incident 尚未匹配",
|
||||||
|
"noMatchingProviderSourceEvent": "查無可匹配的 Sentry / SigNoz 事件",
|
||||||
|
"noIncidentIds": "缺 Incident ID,無法關聯",
|
||||||
|
"incidentNotFound": "Incident 記錄不存在",
|
||||||
|
"fetchFailed": "讀取來源關聯失敗"
|
||||||
|
},
|
||||||
"flow": {
|
"flow": {
|
||||||
"providerIngress": "Provider 接收",
|
"providerIngress": "Provider 接收",
|
||||||
"sourceEvidence": "來源證據",
|
"sourceEvidence": "來源證據",
|
||||||
|
|||||||
@@ -276,8 +276,16 @@ export function AwoooPStatusChainPanel({
|
|||||||
no_incident_context: t("source.verificationStatuses.noIncidentContext"),
|
no_incident_context: t("source.verificationStatuses.noIncidentContext"),
|
||||||
fetch_failed: t("source.verificationStatuses.fetchFailed"),
|
fetch_failed: t("source.verificationStatuses.fetchFailed"),
|
||||||
};
|
};
|
||||||
|
const sourceReasonLabels: Record<string, string> = {
|
||||||
|
provider_heartbeat_present_but_no_incident_match: t("source.reasons.providerHeartbeatNoMatch"),
|
||||||
|
no_matching_provider_source_event: t("source.reasons.noMatchingProviderSourceEvent"),
|
||||||
|
no_incident_ids: t("source.reasons.noIncidentIds"),
|
||||||
|
incident_not_found: t("source.reasons.incidentNotFound"),
|
||||||
|
source_correlation_fetch_failed: t("source.reasons.fetchFailed"),
|
||||||
|
};
|
||||||
const sourceStatus = String(sourceCorrelation?.status ?? "missing");
|
const sourceStatus = String(sourceCorrelation?.status ?? "missing");
|
||||||
const sourceVerificationStatus = String(sourceCorrelation?.verification_status ?? sourceStatus);
|
const sourceVerificationStatus = String(sourceCorrelation?.verification_status ?? sourceStatus);
|
||||||
|
const sourceMissingReason = String(sourceCorrelation?.missing_reason ?? "");
|
||||||
const topAppliedLink = sourceCorrelation?.top_candidates?.find(
|
const topAppliedLink = sourceCorrelation?.top_candidates?.find(
|
||||||
(item) => item.link_state === "applied"
|
(item) => item.link_state === "applied"
|
||||||
);
|
);
|
||||||
@@ -398,6 +406,7 @@ export function AwoooPStatusChainPanel({
|
|||||||
}),
|
}),
|
||||||
detail: t("toolchain.sourceDetail", {
|
detail: t("toolchain.sourceDetail", {
|
||||||
providers: sourceProviderSummary || emptyLabel,
|
providers: sourceProviderSummary || emptyLabel,
|
||||||
|
reason: sourceReasonLabels[sourceMissingReason] ?? valueOrEmpty(sourceMissingReason, emptyLabel),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -603,7 +612,7 @@ export function AwoooPStatusChainPanel({
|
|||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
<div className="grid gap-px bg-[#e0ddd4] md:grid-cols-5">
|
<div className="grid gap-px bg-[#e0ddd4] md:grid-cols-6">
|
||||||
<div className="min-w-0 bg-white px-4 py-3">
|
<div className="min-w-0 bg-white px-4 py-3">
|
||||||
<p className="text-xs font-semibold text-[#77736a]">{t("source.status")}</p>
|
<p className="text-xs font-semibold text-[#77736a]">{t("source.status")}</p>
|
||||||
<p className="mt-2 truncate font-mono text-sm text-[#141413]" title={sourceStatusLabels[sourceStatus] ?? sourceStatus}>
|
<p className="mt-2 truncate font-mono text-sm text-[#141413]" title={sourceStatusLabels[sourceStatus] ?? sourceStatus}>
|
||||||
@@ -635,6 +644,15 @@ export function AwoooPStatusChainPanel({
|
|||||||
{latestAppliedLabel}
|
{latestAppliedLabel}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="min-w-0 bg-white px-4 py-3">
|
||||||
|
<p className="text-xs font-semibold text-[#77736a]">{t("source.reason")}</p>
|
||||||
|
<p
|
||||||
|
className="mt-2 truncate font-mono text-sm text-[#141413]"
|
||||||
|
title={sourceReasonLabels[sourceMissingReason] ?? sourceMissingReason}
|
||||||
|
>
|
||||||
|
{sourceReasonLabels[sourceMissingReason] ?? valueOrEmpty(sourceMissingReason, emptyLabel)}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
<div className="min-w-0 bg-white px-4 py-3">
|
<div className="min-w-0 bg-white px-4 py-3">
|
||||||
<p className="text-xs font-semibold text-[#77736a]">{t("source.providers")}</p>
|
<p className="text-xs font-semibold text-[#77736a]">{t("source.providers")}</p>
|
||||||
<p className="mt-2 truncate font-mono text-sm text-[#141413]" title={sourceProviderSummary}>
|
<p className="mt-2 truncate font-mono text-sm text-[#141413]" title={sourceProviderSummary}>
|
||||||
|
|||||||
Reference in New Issue
Block a user