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

fix: show 'NULL' instead of nothing in status col #716

Merged
merged 1 commit into from
Dec 24, 2024
Merged

Conversation

murilx
Copy link
Contributor

@murilx murilx commented Dec 23, 2024

After further research, apparently the problem only existed in the boots table in hardware details. The can be seem in this page Tests table showing 'NULL' status correctly, this page Boots table showing 'NULL' status correctly in the build table code in src/components/BuildsTable/DefaultBuildsColumn.tsx (since I couldn't find a tree or hardware that had Build with null status)

    cell: ({ row }): string => {
      return row.getValue('status')
        ? row.getValue('status')!.toString().toUpperCase()
        : 'NULL';
    },

Here an example of the bug happening in the boots table for hardware details

This happens because in the TreeDetailsView there's already a process ensuring that record["test_status"] = "NULL" if status is null/None in the database, and HardwareDetailsView does not have the same processing being done.

Closes #714

Visual reference

Before
image

After
image

@murilx murilx force-pushed the fix/show-null-status branch from da6bb5d to 2bdccbc Compare December 23, 2024 19:56
@murilx murilx marked this pull request as ready for review December 23, 2024 19:56
@murilx murilx self-assigned this Dec 23, 2024
@@ -131,7 +131,7 @@ export function BootsTable({
id: e.id,
path: e.path,
startTime: e.startTime,
status: e.status,
status: e.status ?? 'NULL',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put it on a constant

@@ -103,7 +103,7 @@ export function TestsTable({
duration: e.duration?.toString() ?? '',
path: e.path,
start_time: e.startTime,
status: e.status,
status: e.status ?? 'NULL',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto about constant

Copy link
Collaborator

@WilsonNet WilsonNet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worked on my tests, just a minor comment

Copy link
Collaborator

@Francisco2002 Francisco2002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job!!

@murilx murilx force-pushed the fix/show-null-status branch 2 times, most recently from 0583a80 to 2da0433 Compare December 24, 2024 13:44
@murilx murilx force-pushed the fix/show-null-status branch from 2da0433 to 310421e Compare December 24, 2024 14:01
@murilx murilx merged commit 6e2f30d into main Dec 24, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix: show NULL in status column instead of showing nothing
3 participants