Skip to content

Commit

Permalink
some UI changes as per feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
sanyamsinghal committed Jan 9, 2025
1 parent 988fae3 commit 4ac3167
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions yb-voyager/cmd/migration_complexity.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ func getComplexityForLevel(level string, count int) string {
// ======================================= Migration Complexity Explanation ==========================================

const explainTemplateHTML = `
<p>Below is a detailed breakdown of issues by category, showing the count for each impact level.</p>
<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse;">
<thead>
<tr>
Expand All @@ -238,20 +239,24 @@ const explainTemplateHTML = `
</table>
<p>
Level-1 Impact: Resolutions are available with minimal effort.<br/>
Level-2 Impact: Resolutions are available requiring moderate effort.<br/>
Level-3 Impact: Resolutions may not be available or are complex.
<strong>Complexity:</strong> {{ .Complexity }}</br>
<strong>Reasoning:</strong> {{ .ComplexityRationale }}
</p>
<p>
<strong>Reasoning:</strong> {{ .ComplexityRationale }}
<strong>Impact Levels:</strong></br>
Level-1: Resolutions are available with minimal effort.<br/>
Level-2
: Resolutions are available requiring moderate effort.<br/>
Level-3: Resolutions may not be available or are complex.
</p>
`

const explainTemplateText = `Reasoning: {{ .ComplexityRationale }}`

type MigrationComplexityExplanationData struct {
Summaries []MigrationComplexityCategorySummary
Complexity string
ComplexityRationale string // short reasoning or explanation text
}

Expand All @@ -267,6 +272,7 @@ func buildMigrationComplexityExplanation(sourceDBType string, assessmentReport A
}

var explanation MigrationComplexityExplanationData
explanation.Complexity = assessmentReport.MigrationComplexity
explanation.ComplexityRationale = migrationComplexityRationale

explanation.Summaries = buildCategorySummary(assessmentReport.Issues)
Expand Down

0 comments on commit 4ac3167

Please sign in to comment.