-
Notifications
You must be signed in to change notification settings - Fork 543
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
Update table every second, reuse existing metric values if possible #3370
Update table every second, reuse existing metric values if possible #3370
Conversation
src/Aspire.Dashboard/Components/Controls/Chart/MetricTable.razor.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not very familiar with the metrics code, but this change seems reasonable for the purpose.
My only question, for future proofing, would be: Are we sure that re-using the same object will always work? That just feels a little "implementation detail". I know there's ItemKey available on the data grid. Does that achieve a similar result, and if so, might that be more reliable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like some comments about why code is needed.
src/Aspire.Dashboard/Components/Controls/Chart/MetricTable.razor.cs
Outdated
Show resolved
Hide resolved
src/Aspire.Dashboard/Components/Controls/Chart/MetricTable.razor.cs
Outdated
Show resolved
Hide resolved
Yes, that achieves the same result! I like that approach a lot more... did not realize ItemKey existed. I've updated the code to use that isntead |
@adamint please backport for 8.0 - might be late for preview 6 - confirm. |
/backport to release/8.0 |
Started backporting to release/8.0: https://github.com/dotnet/aspire/actions/runs/8725980474 |
We can associate rows with the underlying data's time range so that focus is not lost when the data is updated, if keyboard focus is active inside the table.
Fixes #3363