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