1 instantiation of ResourceGridViewModel
Aspire.Dashboard (1)
Components\Pages\Resources.razor.cs (1)
247.Select(r => new ResourceGridViewModel { Resource = r })
20 references to ResourceGridViewModel
Aspire.Dashboard (20)
Components\Pages\Resources.razor.cs (13)
68private FluentDataGrid<ResourceGridViewModel> _dataGrid = null!; 145private readonly GridSort<ResourceGridViewModel> _nameSort = GridSort<ResourceGridViewModel>.ByAscending(p => p.Resource, ResourceViewModelNameComparer.Instance); 146private readonly GridSort<ResourceGridViewModel> _stateSort = GridSort<ResourceGridViewModel>.ByAscending(p => p.Resource.State).ThenAscending(p => p.Resource, ResourceViewModelNameComparer.Instance); 147private readonly GridSort<ResourceGridViewModel> _startTimeSort = GridSort<ResourceGridViewModel>.ByDescending(p => p.Resource.StartTimeStamp).ThenAscending(p => p.Resource, ResourceViewModelNameComparer.Instance); 148private readonly GridSort<ResourceGridViewModel> _typeSort = GridSort<ResourceGridViewModel>.ByAscending(p => p.Resource.ResourceType).ThenAscending(p => p.Resource, ResourceViewModelNameComparer.Instance); 242private ValueTask<GridItemsProviderResult<ResourceGridViewModel>> GetData(GridItemsProviderRequest<ResourceGridViewModel> request) 254var orderedResources = ResourceGridViewModel.OrderNestedResources(filteredResources.ToList(), r => !_expandedResourceNames.Contains(r.Name)) 423private 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)