1 instantiation of ResourceGridViewModel
Aspire.Dashboard (1)
Components\Pages\Resources.razor.cs (1)
245.Select(r => new ResourceGridViewModel { Resource = r })
20 references to ResourceGridViewModel
Aspire.Dashboard (20)
Components\Pages\Resources.razor.cs (13)
66private FluentDataGrid<ResourceGridViewModel> _dataGrid = null!; 143private readonly GridSort<ResourceGridViewModel> _nameSort = GridSort<ResourceGridViewModel>.ByAscending(p => p.Resource, ResourceViewModelNameComparer.Instance); 144private readonly GridSort<ResourceGridViewModel> _stateSort = GridSort<ResourceGridViewModel>.ByAscending(p => p.Resource.State).ThenAscending(p => p.Resource, ResourceViewModelNameComparer.Instance); 145private readonly GridSort<ResourceGridViewModel> _startTimeSort = GridSort<ResourceGridViewModel>.ByDescending(p => p.Resource.StartTimeStamp).ThenAscending(p => p.Resource, ResourceViewModelNameComparer.Instance); 146private readonly GridSort<ResourceGridViewModel> _typeSort = GridSort<ResourceGridViewModel>.ByAscending(p => p.Resource.ResourceType).ThenAscending(p => p.Resource, ResourceViewModelNameComparer.Instance); 240private ValueTask<GridItemsProviderResult<ResourceGridViewModel>> GetData(GridItemsProviderRequest<ResourceGridViewModel> request) 252var orderedResources = ResourceGridViewModel.OrderNestedResources(filteredResources.ToList(), r => !_expandedResourceNames.Contains(r.Name)) 480private async Task OnToggleCollapse(ResourceGridViewModel viewModel)
Model\ResourceGridViewModel.cs (7)
13public List<ResourceGridViewModel> Children { get; } = []; 37public static List<ResourceGridViewModel> OrderNestedResources(List<ResourceGridViewModel> initialGridVMs, Func<ResourceViewModel, bool> isCollapsed) 43var gridViewModels = new List<ResourceGridViewModel>(); 46foreach (var gridVM in initialGridVMs.Where(r => !HasParent(r))) 59void AddChildViewModel(ResourceViewModel resource, ResourceGridViewModel parent, int depth, bool hidden) 74bool HasParent(ResourceGridViewModel gridViewModel)