Skip to content

Commit

Permalink
Revert "Embed proto messages specific to EvaluationHistory."
Browse files Browse the repository at this point in the history
This reverts commit 572ab4e.
  • Loading branch information
blkt committed Jul 9, 2024
1 parent 572ab4e commit baf75c1
Show file tree
Hide file tree
Showing 5 changed files with 1,893 additions and 1,888 deletions.
20 changes: 10 additions & 10 deletions docs/docs/ref/proto.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions internal/controlplane/handlers_evalstatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,33 +144,33 @@ func fromEvaluationHistoryRow(
return nil, errors.New("internal error")
}

var alert *minderv1.EvaluationHistory_Alert
var alert *minderv1.EvaluationHistoryAlert
if row.AlertStatus.Valid {
alert = &minderv1.EvaluationHistory_Alert{
alert = &minderv1.EvaluationHistoryAlert{
Status: string(row.AlertStatus.AlertStatusTypes),
Details: row.AlertDetails.String,
}
}
var remediation *minderv1.EvaluationHistory_Remediation
var remediation *minderv1.EvaluationHistoryRemediation
if row.RemediationStatus.Valid {
remediation = &minderv1.EvaluationHistory_Remediation{
remediation = &minderv1.EvaluationHistoryRemediation{
Status: string(row.RemediationStatus.RemediationStatusTypes),
Details: row.RemediationDetails.String,
}
}

res = append(res, &minderv1.EvaluationHistory{
Entity: &minderv1.EvaluationHistory_Entity{
Entity: &minderv1.EvaluationHistoryEntity{
Id: row.EvaluationID.String(),
Type: entityType,
Name: entityName,
},
Rule: &minderv1.EvaluationHistory_Rule{
Rule: &minderv1.EvaluationHistoryRule{
Name: row.RuleName,
Type: row.RuleType,
Profile: row.ProfileName,
},
Status: &minderv1.EvaluationHistory_Status{
Status: &minderv1.EvaluationHistoryStatus{
Status: string(row.EvaluationStatus),
Details: row.EvaluationDetails,
EvaluatedAt: timestamppb.New(row.EvaluatedAt),
Expand Down
132 changes: 66 additions & 66 deletions pkg/api/openapi/minder/v1/minder.swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit baf75c1

Please sign in to comment.