52 references to CommandViewModelState
Aspire.Dashboard (28)
Components\Controls\ApplicationSummary.razor.cs (1)
599resources.Select(r => r.Commands.Count(c => c.IsHighlighted && c.State != CommandViewModelState.Hidden)).DefaultIfEmpty(0).Max(),
Components\Controls\MissingParametersPanel.razor.cs (2)
106command.State != CommandViewModelState.Hidden); 161editor.Command.State == CommandViewModelState.Disabled ||
Components\Controls\ParameterOverview.razor.cs (4)
57SetCommand.State == CommandViewModelState.Disabled || 61DeleteCommand.State == CommandViewModelState.Disabled || 84command.State != CommandViewModelState.Hidden); 88command.State != CommandViewModelState.Hidden);
Components\Controls\ResourceActions.razor.cs (1)
63_highlightedCommands.AddRange(Resource.Commands.Where(c => c.IsHighlighted && c.State != CommandViewModelState.Hidden).Take(maxCount));
Components\Controls\TerminalDisconnectedBanner.razor.cs (3)
93var commands = resource.Commands.Where(c => c.State != CommandViewModelState.Hidden && 95return commands.OrderBy(c => c.State != CommandViewModelState.Enabled) 100private bool RestartDisabled => _executing || RestartCommand is not { State: CommandViewModelState.Enabled } command ||
Components\Layout\ResourcesLayout.razor.cs (2)
1337.Where(c => c.IsHighlighted && c.State != CommandViewModelState.Hidden) 1341DashboardClient.IsReadOnly || command.State == CommandViewModelState.Disabled || DashboardCommandExecutor.IsExecuting(resource.Name, command.Name);
Components\Legacy\Pages\ConsoleLogs.razor.cs (1)
573_highlightedCommands.AddRange(selectedResource.Commands.Where(c => c.IsHighlighted && c.State != CommandViewModelState.Hidden).Take(DashboardUIHelpers.MaxHighlightedCommands));
Components\Legacy\Pages\Resources.razor.cs (1)
623if (command.IsHighlighted && command.State != CommandViewModelState.Hidden)
Components\Legacy\Pages\Terminals.razor.cs (1)
259_highlightedCommands.AddRange(resource.Commands.Where(c => c.IsHighlighted && c.State != CommandViewModelState.Hidden)
Components\Pages\ConsoleLogs.razor.cs (1)
640_highlightedCommands.AddRange(selectedResource.Commands.Where(c => c.IsHighlighted && c.State != CommandViewModelState.Hidden).Take(DashboardUIHelpers.MaxHighlightedCommands));
Components\Pages\Resources.razor.cs (1)
624if (command.IsHighlighted && command.State != CommandViewModelState.Hidden)
Components\Pages\Terminals.razor.cs (1)
289_highlightedCommands.AddRange(resource.Commands.Where(c => c.IsHighlighted && c.State != CommandViewModelState.Hidden)
Model\ResourceMenuBuilder.cs (2)
288.Where(c => c.State != CommandViewModelState.Hidden) 342IsDisabled = _dashboardClient.IsReadOnly || command.State == CommandViewModelState.Disabled || isCommandExecuting(resource, command)
Model\ResourceViewModel.cs (2)
315public CommandViewModelState State { get; } 325public CommandViewModel(string name, CommandViewModelState state, string displayName, string displayDescription, string confirmationMessage, ImmutableArray<InteractionInput> argumentInputs, bool isHighlighted, string iconName, IconVariant iconVariant)
Model\TelemetryExportService.cs (1)
772.Where(c => c.State == CommandViewModelState.Enabled)
ServiceClient\Partials.cs (4)
137static CommandViewModelState MapState(ResourceCommandState state) 141ResourceCommandState.Enabled => CommandViewModelState.Enabled, 142ResourceCommandState.Disabled => CommandViewModelState.Disabled, 143ResourceCommandState.Hidden => CommandViewModelState.Hidden,
Aspire.Dashboard.Components.Tests (17)
Controls\ResourceDetailsTests.cs (3)
801CommandViewModelState.Enabled, 847CommandViewModelState.Enabled, 893CommandViewModelState.Enabled,
Controls\TerminalDisconnectedBannerTests.cs (5)
161[CreateCommand(CommandViewModel.RestartCommand, CommandViewModelState.Hidden)]); 169commands: [CreateCommand(CommandViewModel.RestartCommand, CommandViewModelState.Disabled)]))]); 173commands: [CreateCommand(CommandViewModel.RestartCommand, CommandViewModelState.Disabled), 205private static CommandViewModel CreateCommand(string name, CommandViewModelState state = CommandViewModelState.Enabled) =>
Controls\TerminalViewTests.cs (1)
624commands: [new CommandViewModel(CommandViewModel.StartCommand, CommandViewModelState.Enabled,
Layout\ResourcesLayoutTests.cs (3)
543var stop = new CommandViewModel("resource-stop", CommandViewModelState.Enabled, "Stop", "Stop resource", confirmationMessage: "", argumentInputs: [], isHighlighted: true, iconName: "Stop", iconVariant: IconVariant.Filled); 544var other = new CommandViewModel("custom", CommandViewModelState.Enabled, "Custom command", "", confirmationMessage: "", argumentInputs: [], isHighlighted: false, iconName: string.Empty, iconVariant: IconVariant.Regular); 576var stop = new CommandViewModel("resource-stop", CommandViewModelState.Enabled, "Stop", "Stop resource", confirmationMessage: "", argumentInputs: [], isHighlighted: true, iconName: "Stop", iconVariant: IconVariant.Filled);
Model\DashboardCommandExecutorTests.cs (1)
81state: CommandViewModelState.Enabled,
Pages\ConsoleLogsTests.cs (3)
793commands: [new CommandViewModel("test-name", CommandViewModelState.Enabled, "test-displayname", "test-displaydescription", confirmationMessage: "", argumentInputs: [], isHighlighted: true, iconName: string.Empty, iconVariant: IconVariant.Regular)]); 860CommandViewModelState.Enabled, 902commands: [new CommandViewModel("test-name", CommandViewModelState.Enabled, "test-displayname", "test-displaydescription", confirmationMessage: "", argumentInputs: [], isHighlighted: true, iconName: string.Empty, iconVariant: IconVariant.Regular)]);
Pages\ResourcesTests.cs (1)
239CommandViewModelState.Enabled,
Aspire.Dashboard.Tests (7)
Model\DashboardClientTests.cs (1)
1511CommandViewModelState.Enabled,
Model\DashboardCommandExecutorTests.cs (1)
338CommandViewModelState.Enabled,
Model\ResourceMenuBuilderTests.cs (5)
332CommandViewModelState.Enabled, 342CommandViewModelState.Enabled, 380CommandViewModelState.Enabled, 425CommandViewModelState.Enabled, 468CommandViewModelState.Enabled,