-
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
Add metric highlights #5750
base: main
Are you sure you want to change the base?
Add metric highlights #5750
Conversation
This will make it easier to add a block for rendering a dashpage.
* Populate dashpages from configuration Fixes #5289 This change causes the dashboard to look for a file named `dashpages.json` in the current directory. If found, it's parsed to provide the set of dashpages shown on the metrics page. * Test fixes bunit doesn't support when `OnInitializedAsync` actually yields the thread, so provide bunit tests with a stub implementation of `IDashpagePersistence.GetDashpagesAsync` that returns an empty set synchronously. In future we may extend this type to allow test setup with dashpage definitions.
The list of available dashpages in the Metrics UI is dynamic, depending on the selected resource. A dashpage will only be shown if: - metrics are available for at least one chart, and - all required metrics are available - all required resources are available
…into feature/dashpages
# Conflicts: # src/Aspire.Dashboard/Components/Controls/Chart/ChartContainer.cs # src/Aspire.Dashboard/Components/Controls/Chart/PlotlyChart.razor # src/Aspire.Dashboard/Components/Controls/Chart/SingleMetricChartContainer.razor # src/Aspire.Dashboard/Components/Pages/Metrics.razor # src/Aspire.Dashboard/Components/Pages/Metrics.razor.cs # src/Aspire.Dashboard/Components/Pages/Metrics.razor.css # src/Aspire.Dashboard/Resources/Metrics.Designer.cs # src/Aspire.Dashboard/Resources/Metrics.resx # src/Aspire.Dashboard/wwwroot/js/app-metrics.js # src/Shared/StringComparers.cs
* fix merge, clean up * save current dashpage * beautify dashpages * beautify chart filters in dashpages * beautification * fix bugs from merge * improve table, chart appearance on mobile * fix metric table height in dashpage, add dashpage header on mobile * add fixedplacement to filter popover * fix test * continue to work on styling * use unique ids for metric tables * cleanup * Fix broken tests * Code formatting * Avoid horizontal scrollbar in dashpage view * Use integer for div id This is consistent with other code that ensures unique IDs. * Use correct string comparer * Rename and doc property --------- Co-authored-by: Drew Noakes <[email protected]>
… necessary for popovers within a card to display correctly. Sets fixedplacement in chart filter popup to allow breaking out of parent popup
I think this due to how cards work, and thus can't be changed without adding a document click listener. Is this a correct assumption @vnbaaij? |
I was unable to reproduce this issue. Do you have repro steps? |
…ince this component will be initialized on each popup open
- apply correct classes - only use aspect-ratio and max-width on single metric view - change the resize observer to watch the chart container itself. It was resizing to 100% because its *parent* takes up 100% of the width
Please add one. Even if titles are unique now, this is going in the URL so there is the chance that people will bookmark it. Changing it to not use the title will break URLs. It doesn't seem like a difficult change and it helps avoid the URL changing in the future. |
What are you using cards for that is special? If cards are a problem, why not use a regular div and apply the same styling? |
No. It looks like a thread safety problem: collection being modified at the same time as it is being enumerated |
I generally don't use cards for a popup. For DataGrid resize popup we indeed just use a div with some script to detect clicking outside. |
This no longer seems like it's occurring |
Added |
I changed the collection to a |
# Conflicts: # src/Aspire.Dashboard/Components/Controls/Chart/ChartContainer.cs # src/Aspire.Dashboard/Components/Controls/Chart/ChartFilters.razor # src/Aspire.Dashboard/Components/Pages/Metrics.razor.cs
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
* Separate dashpage id and display name * sort dashpages consistently * Change dashpages -> highlights * Update dashpage query parameter to highlight, /dashpages -> /highlights * update page directive * change InstrumentViewModel.DataUpdateSubscriptions to prevent enumeration during collection modification, which can happen asynchronously * Remove extra parameters after merge * fix test * update test expectation, remove comparer * change dashpage -> highlight * add warning comment * put highlight id in path --------- Co-authored-by: Adam Ratzman <[email protected]>
Description
For the last month, @adamint and I have been working on
feature/dashpages
. We're now preparing it for review for merge intomain
.A dashpage is a composite metric view, displayed in the metrics page when data for the relevant instruments are available.
Here's an example dashpage, showing multiple instruments in separate tiled charts:
Currently dashpages are defined in a JSON file that ships with the dashboard. We include a default configuration.
Fixes #5289
Fixes #5295
Fixes #5303
Fixes #5298
Fixes #5287
Fixes #5347
Checklist
<remarks />
and<code />
elements on your triple slash comments?Microsoft Reviewers: Open in CodeFlow