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)
68
private FluentDataGrid<
ResourceGridViewModel
> _dataGrid = null!;
145
private readonly GridSort<
ResourceGridViewModel
> _nameSort = GridSort<
ResourceGridViewModel
>.ByAscending(p => p.Resource, ResourceViewModelNameComparer.Instance);
146
private readonly GridSort<
ResourceGridViewModel
> _stateSort = GridSort<
ResourceGridViewModel
>.ByAscending(p => p.Resource.State).ThenAscending(p => p.Resource, ResourceViewModelNameComparer.Instance);
147
private readonly GridSort<
ResourceGridViewModel
> _startTimeSort = GridSort<
ResourceGridViewModel
>.ByDescending(p => p.Resource.StartTimeStamp).ThenAscending(p => p.Resource, ResourceViewModelNameComparer.Instance);
148
private readonly GridSort<
ResourceGridViewModel
> _typeSort = GridSort<
ResourceGridViewModel
>.ByAscending(p => p.Resource.ResourceType).ThenAscending(p => p.Resource, ResourceViewModelNameComparer.Instance);
242
private ValueTask<GridItemsProviderResult<
ResourceGridViewModel
>> GetData(GridItemsProviderRequest<
ResourceGridViewModel
> request)
254
var orderedResources =
ResourceGridViewModel
.OrderNestedResources(filteredResources.ToList(), r => !_expandedResourceNames.Contains(r.Name))
423
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)