Skip to content

Commit

Permalink
Replaced Issue Type in html assessment report with Issue Name field
Browse files Browse the repository at this point in the history
- in analyze issues wherever issue name is not present assuming issue type
- using the term Issue in html report instead of Name or Type
  • Loading branch information
sanyamsinghal committed Jan 31, 2025
1 parent 29b40a2 commit 8317729
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions yb-voyager/cmd/analyzeSchema.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ func reportCase(filePath string, issueType string, reason string, ghIssue string
DocsLink: docsLink,
}

// Note: Here for each regexp report analyze issue(eventually converted to assessment issue) consider issue name same as issue type
// Ideally we should declare constant vars for each issue name, but future plan is to move to parser based issue detection hence quick workaround for now
issue.Name = utils.SnakeCaseToTitleCase(issue.Type)

schemaAnalysisReport.Issues = append(schemaAnalysisReport.Issues, issue)
}

Expand Down
12 changes: 6 additions & 6 deletions yb-voyager/cmd/templates/migration_assessment_report.template
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
// Keep track of the current sort direction per field, so we can toggle it
let sortState = {
category: 'asc',
type: 'asc',
name: 'asc',
impact: 'asc'
};
function sortTableBy(field) {
Expand Down Expand Up @@ -331,7 +331,7 @@
<!-- Summary Row Header for the issue -->
<colgroup>
<col style="width: 20%;"> <!-- Category + arrow -->
<col style="width: 20%;"> <!-- Type --> <!-- TODO: replace Type with Name field -->
<col style="width: 20%;"> <!-- Issue Name -->
<col style="width: 50%;"> <!-- Object/SQL Preview -->
<col style="width: 10%;"> <!-- Impact -->
</colgroup>
Expand All @@ -341,8 +341,8 @@
<th style="cursor: pointer;" onclick="sortTableBy('category')">
Category <span class="sort-indicator">&#8597</span>
</th>
<th style="cursor: pointer;" onclick="sortTableBy('type')">
Type <span class="sort-indicator">&#8597</span>
<th style="cursor: pointer;" onclick="sortTableBy('name')">
Issue <span class="sort-indicator">&#8597</span>
</th>
<th>Object/SQL Preview</th>
<th style="cursor: pointer; text-align: center;" onclick="sortTableBy('impact')">
Expand All @@ -355,7 +355,7 @@
{{ range $idx, $issue := .Issues }}
<tbody class="issue-summary-detail-pair"
data-category="{{ $issue.Category }}"
data-type="{{ $issue.Type }}"
data-name="{{ $issue.Name }}"
data-impact="{{ $issue.Impact }}">
<!-- Summary Row -->
<tr class="summary-row" onclick="toggleDetails('details-{{ $idx }}', 'arrow-{{ $idx }}')">
Expand All @@ -364,7 +364,7 @@
&nbsp;&nbsp;
{{ snakeCaseToTitleCase $issue.Category }}
</td>
<td>{{ snakeCaseToTitleCase $issue.Type }}</td>
<td>{{ $issue.Name }}</td>
<td>
{{ if $issue.ObjectName }}
{{ $issue.ObjectName }}
Expand Down

0 comments on commit 8317729

Please sign in to comment.