33 instantiations of SelectViewModel
Aspire.Dashboard (30)
Components\Dialogs\FilterDialog.razor.cs (5)
18
new
SelectViewModel
<FilterCondition> { Id = condition, Name = TelemetryFilter.ConditionToString(condition, FilterLoc) };
54
var knownFields = Content.KnownKeys.Select(p => new
SelectViewModel
<string> { Id = p, Name = TelemetryFilter.ResolveFieldName(p) }).ToList();
55
var customFields = Content.PropertyKeys.Select(p => new
SelectViewModel
<string> { Id = p, Name = TelemetryFilter.ResolveFieldName(p) }).ToList();
62
new
SelectViewModel
<string> { Id = null, Name = "-" },
97
.Select(v => new
SelectViewModel
<FieldValue> { Id = v, Name = v.Value })
Components\Dialogs\TextVisualizerDialog.razor.cs (3)
86
new
SelectViewModel
<string> { Id = PlaintextFormat, Name = Loc[nameof(Resources.Dialogs.TextVisualizerDialogPlaintextFormat)] },
87
new
SelectViewModel
<string> { Id = JsonFormat, Name = Loc[nameof(Resources.Dialogs.TextVisualizerDialogJsonFormat)] },
88
new
SelectViewModel
<string> { Id = XmlFormat, Name = Loc[nameof(Resources.Dialogs.TextVisualizerDialogXmlFormat)] }
Components\Pages\ConsoleLogs.razor.cs (2)
250
builder.Add(new
SelectViewModel
<ResourceTypeDetails>
276
return new
SelectViewModel
<ResourceTypeDetails>
Components\Pages\Metrics.razor.cs (9)
72
new
() { Name = Loc[nameof(Dashboard.Resources.Metrics.MetricsLastOneMinute)], Id = TimeSpan.FromMinutes(1) },
73
new
() { Name = Loc[nameof(Dashboard.Resources.Metrics.MetricsLastFiveMinutes)], Id = TimeSpan.FromMinutes(5) },
74
new
() { Name = Loc[nameof(Dashboard.Resources.Metrics.MetricsLastFifteenMinutes)], Id = TimeSpan.FromMinutes(15) },
75
new
() { Name = Loc[nameof(Dashboard.Resources.Metrics.MetricsLastThirtyMinutes)], Id = TimeSpan.FromMinutes(30) },
76
new
() { Name = Loc[nameof(Dashboard.Resources.Metrics.MetricsLastHour)], Id = TimeSpan.FromHours(1) },
77
new
() { Name = Loc[nameof(Dashboard.Resources.Metrics.MetricsLastThreeHours)], Id = TimeSpan.FromHours(3) },
78
new
() { Name = Loc[nameof(Dashboard.Resources.Metrics.MetricsLastSixHours)], Id = TimeSpan.FromHours(6) },
79
new
() { Name = Loc[nameof(Dashboard.Resources.Metrics.MetricsLastTwelveHours)], Id = TimeSpan.FromHours(12) },
82
_selectApplication = new
SelectViewModel
<ResourceTypeDetails>
Components\Pages\StructuredLogs.razor.cs (7)
170
new
SelectViewModel
<LogLevel?> { Id = null, Name = ControlsStringsLoc[nameof(Dashboard.Resources.ControlsStrings.LabelAll)] },
171
new
SelectViewModel
<LogLevel?> { Id = LogLevel.Trace, Name = "Trace" },
172
new
SelectViewModel
<LogLevel?> { Id = LogLevel.Debug, Name = "Debug" },
173
new
SelectViewModel
<LogLevel?> { Id = LogLevel.Information, Name = "Information" },
174
new
SelectViewModel
<LogLevel?> { Id = LogLevel.Warning, Name = "Warning" },
175
new
SelectViewModel
<LogLevel?> { Id = LogLevel.Error, Name = "Error" },
176
new
SelectViewModel
<LogLevel?> { Id = LogLevel.Critical, Name = "Critical" },
Components\Pages\Traces.razor.cs (1)
148
_allApplication = new
SelectViewModel
<ResourceTypeDetails> { Id = null, Name = ControlsStringsLoc[name: nameof(ControlsStrings.LabelAll)] };
Model\Otlp\ApplicationsSelectHelpers.cs (3)
55
selectViewModels.Add(new
SelectViewModel
<ResourceTypeDetails>
65
selectViewModels.Add(new
SelectViewModel
<ResourceTypeDetails>
73
new
SelectViewModel
<ResourceTypeDetails>
Aspire.Dashboard.Tests (3)
ConsoleLogsTests\CreateResourceSelectModelsTests.cs (1)
39
var noSelectionViewModel = new
SelectViewModel
<ResourceTypeDetails> { Id = null, Name = selectAResourceText };
Model\ApplicationsSelectHelpersTests.cs (2)
114
new
SelectViewModel
<ResourceTypeDetails>() { Name = "test", Id = ResourceTypeDetails.CreateSingleton("test-abc", "test") },
115
new
SelectViewModel
<ResourceTypeDetails>() { Name = "test", Id = ResourceTypeDetails.CreateSingleton("test-def", "test") }
44 references to SelectViewModel
Aspire.Dashboard (37)
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\Dialogs\FilterDialog.razor.cs (6)
15
private List<
SelectViewModel
<FilterCondition>> _filterConditions = null!;
17
private
SelectViewModel
<FilterCondition> CreateFilterSelectViewModel(FilterCondition condition) =>
30
private List<
SelectViewModel
<string>> _parameters = default!;
31
private List<
SelectViewModel
<FieldValue>> _filteredValues = default!;
32
private List<
SelectViewModel
<FieldValue>>? _allValues;
126
IEnumerable<
SelectViewModel
<FieldValue>> newValues = _allValues;
Components\Dialogs\TextVisualizerDialog.razor.cs (1)
28
private List<
SelectViewModel
<string>> _options = null!;
Components\Pages\ConsoleLogs.razor.cs (6)
69
private ImmutableList<
SelectViewModel
<ResourceTypeDetails>>? _resources;
76
private
SelectViewModel
<ResourceTypeDetails> _noSelection = null!;
232
internal static ImmutableList<
SelectViewModel
<ResourceTypeDetails>> GetConsoleLogResourceSelectViewModels(
234
SelectViewModel
<ResourceTypeDetails> noSelectionViewModel,
237
var builder = ImmutableList.CreateBuilder<
SelectViewModel
<ResourceTypeDetails>>();
270
SelectViewModel
<ResourceTypeDetails> ToOption(ResourceViewModel resource, bool isReplica, string applicationName)
Components\Pages\Metrics.razor.cs (5)
19
private
SelectViewModel
<ResourceTypeDetails> _selectApplication = null!;
20
private List<
SelectViewModel
<TimeSpan>> _durations = null!;
26
private List<
SelectViewModel
<ResourceTypeDetails>> _applicationViewModels = default!;
70
_durations = new List<
SelectViewModel
<TimeSpan>>
201
public
SelectViewModel
<TimeSpan> SelectedDuration { get; set; } = null!;
Components\Pages\StructuredLogs.razor.cs (5)
31
private
SelectViewModel
<ResourceTypeDetails> _allApplication = default!;
36
private List<
SelectViewModel
<ResourceTypeDetails>> _applicationViewModels = default!;
37
private List<
SelectViewModel
<LogLevel?>> _logLevels = default!;
168
_logLevels = new List<
SelectViewModel
<LogLevel?>>
431
public
SelectViewModel
<LogLevel?> SelectedLogLevel { get; set; } = default!;
Components\Pages\Traces.razor.cs (2)
30
private
SelectViewModel
<ResourceTypeDetails> _allApplication = null!;
35
private List<
SelectViewModel
<ResourceTypeDetails>> _applicationViewModels = default!;
Model\Otlp\ApplicationsSelectHelpers.cs (5)
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>>();
Model\Otlp\FilterDialogFormModel.cs (2)
11
public
SelectViewModel
<string>? Parameter { get; set; }
14
public
SelectViewModel
<FilterCondition>? Condition { get; set; }
Model\Otlp\SelectViewModel.cs (2)
9
public class SelectViewModel<T> : IEquatable<
SelectViewModel
<T>>
14
public bool Equals(
SelectViewModel
<T>? other)
Aspire.Dashboard.Tests (7)
ConsoleLogsTests\CreateResourceSelectModelsTests.cs (1)
39
var
noSelectionViewModel = new SelectViewModel<ResourceTypeDetails> { Id = null, Name = selectAResourceText };
Model\ApplicationsSelectHelpersTests.cs (6)
57
var
app = appVMs.GetApplication(NullLogger.Instance, "app-app-abc", canSelectGrouping: false, null!);
98
var
app = appVMs.GetApplication(factory.CreateLogger("Test"), "app-app", canSelectGrouping: false, null!);
112
var appVMs = new List<
SelectViewModel
<ResourceTypeDetails>>
122
var
app = appVMs.GetApplication(factory.CreateLogger("Test"), "test", canSelectGrouping: false, null!);
161
var
app = appVMs.GetApplication(NullLogger.Instance, "app", canSelectGrouping: false, null!);
198
var
app = appVMs.GetApplication(NullLogger.Instance, "app", canSelectGrouping: true, null!);