Conversation
…, live refresh - CacheTypeInfo: added PersistType field, populated by CacheMonitor.Set/Track from CacheOptions.Get<T>().PersistType - ListView: slimmed columns to Key, Expires, Size, Load Time, Stale; added Persist column on the type-level grid (e.g. Memory, Redis, MongoDB, File); added chevron button per row to open detail dialog - DetailView: new Radzen dialog component showing all metadata plus cached data as pretty-printed JSON via IEternalCache.PeekAsync<T> reflection; uses Tharga.Blazor CopyButton for copy-to-clipboard - SummaryView + ListView: subscribe to ICacheMonitor DataSetEvent/DataDropEvent for live refresh when cache changes (fixes "Clear Cache" not refreshing list)
- Sample App.razor: set render mode on HeadOutlet/RadzenTheme/Routes to InteractiveServerRenderMode(prerender: false), matching Florida pattern. Without this the Radzen theme CSS (including Material Icons font) and the dialog host did not activate in the interactive circuit. - Sample MainLayout.razor: added <RadzenComponents /> host so DialogService.OpenAsync has a portal to render into. - Sample App.razor: added tharga.blazor.js script for CopyButton clipboard. - ListView: icon button uses 'article' instead of 'chevron_right'.
- Extracted JSON loading into CacheContent.razor so it mounts (and OnInitializedAsync fires) only when the ExpandableCard is expanded. - DetailView wraps CacheContent in <ExpandableCard Text="Content" Icon="data_object" AllowSaveState="false">; all other metadata stays visible. - Copy button is a small icon-only RadzenButton anchored top-right of the content area, invokes the same clipboard.copyText JS that Tharga.Blazor CopyButton uses. - Sample: added AddBlazoredLocalStorage() (required by ExpandableCard's ILocalStorageService injection even when AllowSaveState is false).
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Overhaul of the Blazor monitoring UI for
Tharga.Cache.Blazor.Core
CacheTypeInfo— newPersistTypefield, populated byCacheMonitor.Set/TrackfromCacheOptions.Get<T>().PersistType. Exposes which persistence backend (Memory/Redis/MongoDB/File) each cache type uses.ListView
ICacheMonitor.DataSetEvent/DataDropEventfor live refresh.DetailView (new)
ExpandableCard— JSON is not fetched until the card is expanded.IEternalCache.PeekAsync<T>(key)reflection in aCacheContentchild component.clipboard.copyTextJS asTharga.Blazor.CopyButton.SummaryView
ICacheMonitor.DataSetEvent/DataDropEventso the count, size, and queue figures stay in sync (fixes "Clear Cache" not refreshing the list).Sample
App.razor:HeadOutlet,RadzenTheme,Routesall set toInteractiveServerRenderMode(prerender: false)so the Radzen theme (incl. Material Icons font) and dialog host activate in the interactive circuit.MainLayout.razor: added<RadzenComponents />host forDialogService.App.razor: addedtharga.blazor.jsscript for the copy-to-clipboard JS.Program.cs: addedAddBlazoredLocalStorage()(required byExpandableCard'sILocalStorageServiceinjection, even whenAllowSaveState="false").Consumer integration notes
Apps using
Tharga.Cache.Blazormust also:<RadzenComponents />to their main layout._content/Tharga.Blazor/tharga.blazor.js.builder.Services.AddBlazoredLocalStorage().Test plan
Tharga.Cache.BlazorServer.