Show enrichment provenance in proboctl catalog views
The common tracker pattern "show" only printed attempt counters, so the enrichment payload — run status, model, agent attribution, and per-field outcomes — was invisible, and a partial run was indistinguishable from a complete one. Render that payload the same way the common third party "show" already does. Surface the last enrichment attempt timestamp in both catalog list views so an operator can spot stale or never-attempted rows at a glance. Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
@@ -229,7 +229,7 @@ func renderPatternTable(cmd *cobra.Command, f *cmdutil.Factory, patterns coredat
|
||||
return err
|
||||
}
|
||||
|
||||
table := clicmdutil.NewTable("ID", "TYPE", "MATCH", "PATTERN", "CONF", "STATE", "THIRD PARTY", "CREATED", "UPDATED")
|
||||
table := clicmdutil.NewTable("ID", "TYPE", "MATCH", "PATTERN", "CONF", "STATE", "THIRD PARTY", "LAST ATTEMPT", "CREATED", "UPDATED")
|
||||
|
||||
for _, p := range patterns {
|
||||
thirdParty := ""
|
||||
@@ -237,6 +237,11 @@ func renderPatternTable(cmd *cobra.Command, f *cmdutil.Factory, patterns coredat
|
||||
thirdParty = names[*p.CommonThirdPartyID]
|
||||
}
|
||||
|
||||
lastAttempt := ""
|
||||
if p.LastEnrichmentAttemptAt != nil {
|
||||
lastAttempt = p.LastEnrichmentAttemptAt.Format("2006-01-02 15:04:05")
|
||||
}
|
||||
|
||||
table.Row(
|
||||
p.ID.String(),
|
||||
string(p.TrackerType),
|
||||
@@ -245,6 +250,7 @@ func renderPatternTable(cmd *cobra.Command, f *cmdutil.Factory, patterns coredat
|
||||
fmt.Sprintf("%.2f", p.Confidence),
|
||||
enrichmentState(p),
|
||||
thirdParty,
|
||||
lastAttempt,
|
||||
p.CreatedAt.Format("2006-01-02 15:04:05"),
|
||||
p.UpdatedAt.Format("2006-01-02 15:04:05"),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user