72 references to DashboardUIHelpers
Aspire.Dashboard (44)
Components\Controls\PropertyGrid.razor.cs (1)
154(_resizeLabels, _sortLabels) = DashboardUIHelpers.CreateGridLabels(Loc);
Components\Controls\ResourceDetails.razor.cs (1)
223(_resizeLabels, _sortLabels) = DashboardUIHelpers.CreateGridLabels(ControlStringsLoc);
Components\Controls\SpanDetails.razor.cs (1)
101(_resizeLabels, _sortLabels) = DashboardUIHelpers.CreateGridLabels(Loc);
Components\Controls\TextVisualizer.razor.cs (1)
67if (ViewModel.FormatKind is not DashboardUIHelpers.PlaintextFormat)
Components\Dialogs\TextVisualizerDialog.razor.cs (9)
58EnabledOptions.Add(DashboardUIHelpers.PlaintextFormat); 61new SelectViewModel<string> { Id = DashboardUIHelpers.PlaintextFormat, Name = Loc[nameof(Resources.Dialogs.TextVisualizerDialogPlaintextFormat)] }, 62new SelectViewModel<string> { Id = DashboardUIHelpers.JsonFormat, Name = Loc[nameof(Resources.Dialogs.TextVisualizerDialogJsonFormat)] }, 63new SelectViewModel<string> { Id = DashboardUIHelpers.XmlFormat, Name = Loc[nameof(Resources.Dialogs.TextVisualizerDialogXmlFormat)] } 75if (TextVisualizerViewModel.FormatKind == DashboardUIHelpers.JsonFormat) 77EnabledOptions.Add(DashboardUIHelpers.JsonFormat); 79else if (TextVisualizerViewModel.FormatKind == DashboardUIHelpers.XmlFormat) 81EnabledOptions.Add(DashboardUIHelpers.XmlFormat); 104TextVisualizerViewModel.UpdateFormat(newFormat ?? DashboardUIHelpers.PlaintextFormat);
Components\Interactions\InteractionsProvider.cs (1)
392options.Section = DashboardUIHelpers.MessageBarSection;
Components\Layout\MainLayout.razor.cs (1)
159options.Section = DashboardUIHelpers.MessageBarSection;
Components\Pages\ConsoleLogs.razor.cs (1)
502_highlightedCommands.AddRange(selectedResource.Commands.Where(c => c.IsHighlighted && c.State != CommandViewModelState.Hidden).Take(DashboardUIHelpers.MaxHighlightedCommands));
Components\Pages\Resources.razor.cs (3)
226(_resizeLabels, _sortLabels) = DashboardUIHelpers.CreateGridLabels(ControlsStringsLoc); 483.Take(request.Count ?? DashboardUIHelpers.DefaultDataGridResultCount) 578_maxHighlightedCount = Math.Min(maxHighlightedCount, DashboardUIHelpers.MaxHighlightedCommands);
Components\Pages\StructuredLogs.razor.cs (3)
135ViewModel.Count = request.Count ?? DashboardUIHelpers.DefaultDataGridResultCount; 141TelemetryRepository.MaxLogLimitMessage = await DashboardUIHelpers.DisplayMaxLimitMessageAsync( 173(_resizeLabels, _sortLabels) = DashboardUIHelpers.CreateGridLabels(ControlsStringsLoc);
Components\Pages\TraceDetail.razor.cs (1)
177page = page.Take(request.Count ?? DashboardUIHelpers.DefaultDataGridResultCount);
Components\Pages\Traces.razor.cs (3)
137TracesViewModel.Count = request.Count ?? DashboardUIHelpers.DefaultDataGridResultCount; 142TelemetryRepository.MaxTraceLimitMessage = await DashboardUIHelpers.DisplayMaxLimitMessageAsync( 172(_resizeLabels, _sortLabels) = DashboardUIHelpers.CreateGridLabels(ControlsStringsLoc);
Model\DashboardCommandExecutor.cs (2)
136closeToastCts.CancelAfter(DashboardUIHelpers.ToastTimeout); 174closeToastCts.CancelAfter(DashboardUIHelpers.ToastTimeout);
Model\GenAI\GenAIItemPartViewModel.cs (3)
62return new TextVisualizerViewModel(textPart.Content ?? string.Empty, indentText: true, fallbackFormat: DashboardUIHelpers.MarkdownFormat); 74return new TextVisualizerViewModel($"{toolCallRequestPart.Name}({argumentsText})", indentText: true, knownFormat: DashboardUIHelpers.JavascriptFormat); 85return new TextVisualizerViewModel(toolResponseContent, indentText: true, fallbackFormat: DashboardUIHelpers.MarkdownFormat);
Model\ResourceMenuBuilder.cs (2)
122FixedFormat = DashboardUIHelpers.JsonFormat 143FixedFormat = DashboardUIHelpers.PropertiesFormat
Model\ResourceSourceViewModel.cs (1)
68: DashboardUIHelpers.GetMaskingText(6).Text)));
Model\SpanMenuBuilder.cs (1)
122FixedFormat = DashboardUIHelpers.JsonFormat
Model\StructuredLogMenuBuilder.cs (1)
106FixedFormat = DashboardUIHelpers.JsonFormat
Model\TextVisualizerViewModel.cs (7)
26Lines = GetLines(Text, DashboardUIHelpers.PlaintextFormat); 34ChangeFormattedText(DashboardUIHelpers.JsonFormat, indentText ? formattedJson : Text); 38ChangeFormattedText(DashboardUIHelpers.XmlFormat, indentText ? formattedXml : Text); 42ChangeFormattedText(fallbackFormat ?? DashboardUIHelpers.PlaintextFormat, Text); 259if (newFormat == DashboardUIHelpers.XmlFormat) 266else if (newFormat == DashboardUIHelpers.JsonFormat) 275ChangeFormattedText(DashboardUIHelpers.PlaintextFormat, Text);
Model\TraceMenuBuilder.cs (1)
110FixedFormat = DashboardUIHelpers.JsonFormat
Aspire.Dashboard.Components.Tests (17)
Controls\TextVisualizerDialogTests.cs (17)
50Assert.Equal(DashboardUIHelpers.JsonFormat, instance.TextVisualizerViewModel.FormatKind); 51Assert.Equal([DashboardUIHelpers.JsonFormat, DashboardUIHelpers.PlaintextFormat], instance.EnabledOptions.ToImmutableSortedSet()); 71Assert.Equal(DashboardUIHelpers.XmlFormat, instance.TextVisualizerViewModel.FormatKind); 73Assert.Equal([DashboardUIHelpers.PlaintextFormat, DashboardUIHelpers.XmlFormat], instance.EnabledOptions.ToImmutableSortedSet()); 76instance.ChangeFormat(DashboardUIHelpers.PlaintextFormat, rawXml); 78Assert.Equal(DashboardUIHelpers.PlaintextFormat, instance.TextVisualizerViewModel.FormatKind); 98Assert.Equal(DashboardUIHelpers.XmlFormat, instance.TextVisualizerViewModel.FormatKind); 100Assert.Equal([DashboardUIHelpers.PlaintextFormat, DashboardUIHelpers.XmlFormat], instance.EnabledOptions.ToImmutableSortedSet()); 114Assert.Equal(DashboardUIHelpers.PlaintextFormat, instance.TextVisualizerViewModel.FormatKind); 116Assert.Equal([DashboardUIHelpers.PlaintextFormat], instance.EnabledOptions.ToImmutableSortedSet()); 202await dialogService.ShowDialogAsync<TextVisualizerDialog>(new TextVisualizerDialogViewModel(rawText, string.Empty, ContainsSecret: false, FixedFormat: DashboardUIHelpers.PropertiesFormat), []); 208Assert.Equal(DashboardUIHelpers.PropertiesFormat, instance.TextVisualizerViewModel.FormatKind); 221await dialogService.ShowDialogAsync<TextVisualizerDialog>(new TextVisualizerDialogViewModel(rawText, string.Empty, ContainsSecret: false, FixedFormat: DashboardUIHelpers.JsonFormat), []); 227Assert.Equal(DashboardUIHelpers.JsonFormat, instance.TextVisualizerViewModel.FormatKind);
Aspire.Dashboard.Tests (11)
DashboardUIHelpersTests.cs (6)
24var result = DashboardUIHelpers.SafeConvertToMilliseconds(duration); 37var result = DashboardUIHelpers.SafeConvertToMilliseconds(duration); 50var result = DashboardUIHelpers.SafeConvertToMilliseconds(duration); 63var result = DashboardUIHelpers.SafeConvertToMilliseconds(duration); 77var result = DashboardUIHelpers.SafeConvertToMilliseconds(duration); 90var result = DashboardUIHelpers.SafeConvertToMilliseconds(duration);
Model\GenAIItemPartViewModelTests.cs (4)
27Assert.Equal(DashboardUIHelpers.MarkdownFormat, itemPart.TextVisualizerViewModel.FormatKind); 46Assert.Equal(DashboardUIHelpers.JsonFormat, itemPart.TextVisualizerViewModel.FormatKind); 71Assert.Equal(DashboardUIHelpers.JsonFormat, itemPart.TextVisualizerViewModel.FormatKind); 96Assert.Equal(DashboardUIHelpers.JsonFormat, itemPart.TextVisualizerViewModel.FormatKind);
Model\ResourceSourceViewModelTests.cs (1)
97var maskingText = DashboardUIHelpers.GetMaskingText(6).Text;