Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced Issue Type in html assessment report with Issue Name field #2268

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading