3 instantiations of ResourceTypeDetails
Aspire.Dashboard (3)
Model\ResourceTypeDetails.cs (3)
36
return new
ResourceTypeDetails
(OtlpApplicationType.ResourceGrouping, instanceId: null, replicaSetName: isReplicaSet ? groupingName : null);
41
return new
ResourceTypeDetails
(OtlpApplicationType.Singleton, instanceId, replicaSetName: replicaSetName);
46
return new
ResourceTypeDetails
(OtlpApplicationType.Instance, instanceId, replicaSetName);
44 references to ResourceTypeDetails
Aspire.Dashboard (38)
Components\Controls\ResourceSelect.razor.cs (3)
19
public IEnumerable<SelectViewModel<
ResourceTypeDetails
>> Resources { get; set; } = default!;
22
public SelectViewModel<
ResourceTypeDetails
> SelectedResource { get; set; } = default!;
25
public EventCallback<SelectViewModel<
ResourceTypeDetails
>> SelectedResourceChanged { get; set; }
Components\Pages\ConsoleLogs.razor.cs (11)
82
private ImmutableList<SelectViewModel<
ResourceTypeDetails
>>? _resources;
89
private SelectViewModel<
ResourceTypeDetails
> _noSelection = null!;
324
internal static ImmutableList<SelectViewModel<
ResourceTypeDetails
>> GetConsoleLogResourceSelectViewModels(
326
SelectViewModel<
ResourceTypeDetails
> noSelectionViewModel,
329
var builder = ImmutableList.CreateBuilder<SelectViewModel<
ResourceTypeDetails
>>();
342
builder.Add(new SelectViewModel<
ResourceTypeDetails
>
344
Id =
ResourceTypeDetails
.CreateApplicationGrouping(applicationName, true),
362
SelectViewModel<
ResourceTypeDetails
> ToOption(ResourceViewModel resource, bool isReplica, string applicationName)
365
?
ResourceTypeDetails
.CreateReplicaInstance(resource.Name, applicationName)
366
:
ResourceTypeDetails
.CreateSingleton(resource.Name, applicationName);
368
return new SelectViewModel<
ResourceTypeDetails
>
Components\Pages\Metrics.razor.cs (3)
19
private SelectViewModel<
ResourceTypeDetails
> _selectApplication = null!;
26
private List<SelectViewModel<
ResourceTypeDetails
>> _applicationViewModels = default!;
82
_selectApplication = new SelectViewModel<
ResourceTypeDetails
>
Components\Pages\StructuredLogs.razor.cs (2)
31
private SelectViewModel<
ResourceTypeDetails
> _allApplication = default!;
36
private List<SelectViewModel<
ResourceTypeDetails
>> _applicationViewModels = default!;
Components\Pages\Traces.razor.cs (3)
30
private SelectViewModel<
ResourceTypeDetails
> _allApplication = null!;
35
private List<SelectViewModel<
ResourceTypeDetails
>> _applicationViewModels = default!;
148
_allApplication = new SelectViewModel<
ResourceTypeDetails
> { Id = null, Name = ControlsStringsLoc[name: nameof(ControlsStrings.LabelAll)] };
Model\Otlp\ApplicationsSelectHelpers.cs (11)
10
public static SelectViewModel<
ResourceTypeDetails
> GetApplication(this List<SelectViewModel<
ResourceTypeDetails
>> applications, ILogger logger, string? name, bool canSelectGrouping, SelectViewModel<
ResourceTypeDetails
> fallback)
43
public static List<SelectViewModel<
ResourceTypeDetails
>> CreateApplications(List<OtlpApplication> applications)
47
var selectViewModels = new List<SelectViewModel<
ResourceTypeDetails
>>();
55
selectViewModels.Add(new SelectViewModel<
ResourceTypeDetails
>
57
Id =
ResourceTypeDetails
.CreateSingleton(app.InstanceId, applicationName),
65
selectViewModels.Add(new SelectViewModel<
ResourceTypeDetails
>
67
Id =
ResourceTypeDetails
.CreateApplicationGrouping(applicationName, isReplicaSet: true),
73
new SelectViewModel<
ResourceTypeDetails
>
75
Id =
ResourceTypeDetails
.CreateReplicaInstance(replica.InstanceId, applicationName),
Model\ResourceTypeDetails.cs (5)
11
public class ResourceTypeDetails : IEquatable<
ResourceTypeDetails
>
34
public static
ResourceTypeDetails
CreateApplicationGrouping(string groupingName, bool isReplicaSet)
39
public static
ResourceTypeDetails
CreateSingleton(string instanceId, string replicaSetName)
44
public static
ResourceTypeDetails
CreateReplicaInstance(string instanceId, string replicaSetName)
54
public bool Equals(
ResourceTypeDetails
? other)
Aspire.Dashboard.Tests (6)
ConsoleLogsTests\CreateResourceSelectModelsTests.cs (1)
39
var noSelectionViewModel = new SelectViewModel<
ResourceTypeDetails
> { Id = null, Name = selectAResourceText };
Model\ApplicationsSelectHelpersTests.cs (5)
112
var appVMs = new List<SelectViewModel<
ResourceTypeDetails
>>
114
new SelectViewModel<
ResourceTypeDetails
>() { Name = "test", Id =
ResourceTypeDetails
.CreateSingleton("test-abc", "test") },
115
new SelectViewModel<
ResourceTypeDetails
>() { Name = "test", Id =
ResourceTypeDetails
.CreateSingleton("test-def", "test") }