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