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

Worked on the Usage column & Lineage Drawer #6290

Conversation

Ankit-Keshari-Vituity
Copy link
Contributor

  • Added Sorted methods to the usage column
  • Worked on the Entity type name issue on Lineage Side Drawer

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the product PR or Issue related to the DataHub UI/UX label Oct 26, 2022
@github-actions
Copy link

github-actions bot commented Oct 26, 2022

Unit Test Results (build & test)

599 tests   595 ✔️  11m 42s ⏱️
149 suites      4 💤
149 files        0

Results for commit c145bca.

♻️ This comment has been updated with latest results.

@@ -161,6 +161,7 @@ export default function SchemaTable({
dataIndex: 'fieldPath',
key: 'usage',
render: usageStatsRenderer,
sorter: (sourceA, sourceB) => sourceA.name.localeCompare(sourceB.name),
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe we would want to sort this by the count of the usage column and not the name. I'm actually not even sure what name would be in this situation here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

yeah when I try to use this code to sort, I get a runtime error and react breaks. were you able to find any data locally with usage to test this on?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe you're going to have to write a function that takes into account usageStats above and finds the fields you're sorting and then sorts by count that you find by field in usageStats above.

Copy link
Collaborator

@chriscollins3456 chriscollins3456 left a comment

Choose a reason for hiding this comment

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

it looks like your sorting functions aren't actually sorting based on what we would expect for the columns.. at least one of them also breaks the frontend when trying to sort

@@ -192,6 +192,7 @@ export const AccessTokens = () => {
<span>{`${formattedExpireAt.toLocaleDateString()} at ${formattedExpireAt.toLocaleTimeString()} (${localeTimezone})`}</span>
);
},
sorter: (sourceA, sourceB) => sourceA.name.localeCompare(sourceB.name),
Copy link
Collaborator

Choose a reason for hiding this comment

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

same questions here... why are you sorting by name for the "Expires At" column? shouldn't we be sorting based on that date for this column?

Copy link
Collaborator

@chriscollins3456 chriscollins3456 left a comment

Choose a reason for hiding this comment

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

nice stuff!

@chriscollins3456 chriscollins3456 merged commit 96848d5 into datahub-project:master Nov 1, 2022
anthonyhungnguyen pushed a commit to anthonyhungnguyen/zlp-datahub that referenced this pull request Nov 8, 2022
cccs-tom pushed a commit to CybercentreCanada/datahub that referenced this pull request Nov 18, 2022
cccs-tom pushed a commit to CybercentreCanada/datahub that referenced this pull request Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product PR or Issue related to the DataHub UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants