55 references to Enabled
Aspire.Dashboard (6)
Components\Controls\TerminalDisconnectedBanner.razor.cs (2)
95
return commands.OrderBy(c => c.State != CommandViewModelState.
Enabled
)
100
private bool RestartDisabled => _executing || RestartCommand is not { State: CommandViewModelState.
Enabled
} command ||
Model\DashboardCommandExecutor.cs (1)
62
if (command is not { State: CommandViewModelState.
Enabled
} ||
Model\ResourceMenuBuilder.cs (1)
341
!resource.IsParameter && !_dashboardClient.IsReadOnly && command.State == CommandViewModelState.
Enabled
&& !isCommandExecuting(resource, command);
Model\TelemetryExportService.cs (1)
773
.Where(c => c.State == CommandViewModelState.
Enabled
)
ServiceClient\Partials.cs (1)
142
ResourceCommandState.Enabled => CommandViewModelState.
Enabled
,
Aspire.Dashboard.Components.Tests (32)
Controls\MissingParametersPanelTests.cs (1)
141
new(CommandViewModel.SetParameterCommand, CommandViewModelState.
Enabled
, "Set", string.Empty, string.Empty, [input], isHighlighted: false, iconName: string.Empty, iconVariant: Microsoft.FluentUI.AspNetCore.Components.IconVariant.Regular);
Controls\ResourceDetailsTests.cs (3)
799
CommandViewModelState.
Enabled
,
845
CommandViewModelState.
Enabled
,
891
CommandViewModelState.
Enabled
,
Controls\TerminalDisconnectedBannerTests.cs (1)
205
private static CommandViewModel CreateCommand(string name, CommandViewModelState state = CommandViewModelState.
Enabled
) =>
Controls\TerminalViewTests.cs (1)
624
commands: [new CommandViewModel(CommandViewModel.StartCommand, CommandViewModelState.
Enabled
,
Layout\ResourcesLayoutTests.cs (21)
644
Command("enabled", CommandViewModelState.
Enabled
),
1544
var command = new CommandViewModel("resource-stop", CommandViewModelState.
Enabled
, "Stop", "Stop resource", confirmationMessage: "", argumentInputs: [], isHighlighted: true, iconName: iconName, iconVariant: IconVariant.Filled);
1586
var stop = new CommandViewModel("resource-stop", CommandViewModelState.
Enabled
, "Stop", "Stop resource", confirmationMessage: "", argumentInputs: [], isHighlighted: true, iconName: "Stop", iconVariant: IconVariant.Filled);
1587
var other = new CommandViewModel("custom", CommandViewModelState.
Enabled
, "Custom command", "", confirmationMessage: "", argumentInputs: [], isHighlighted: false, iconName: string.Empty, iconVariant: IconVariant.Regular);
1618
var enabled = Stop(CommandViewModelState.
Enabled
);
1626
new CommandViewModel(CommandViewModel.SetParameterCommand, CommandViewModelState.
Enabled
, "Set parameter", "",
1673
var command = new CommandViewModel("refresh", CommandViewModelState.
Enabled
, "Refresh", "",
1712
var stop = new CommandViewModel("resource-stop", CommandViewModelState.
Enabled
, "Stop", "Stop resource", confirmationMessage: "", argumentInputs: [], isHighlighted: true, iconName: "Stop", iconVariant: IconVariant.Filled);
1752
Command(CommandViewModel.StopCommand, CommandViewModelState.
Enabled
, true),
1753
Command(CommandViewModel.RestartCommand, CommandViewModelState.
Enabled
, false)
1790
Command(CommandViewModel.StopCommand, CommandViewModelState.
Enabled
, false),
1792
Command("deploy", CommandViewModelState.
Enabled
, true),
1794
Command("extra", CommandViewModelState.
Enabled
, true)
1824
[InlineData(CommandViewModelState.
Enabled
, false, false, ResourceListDensity.Comfortable)]
1825
[InlineData(CommandViewModelState.
Enabled
, true, false, ResourceListDensity.Compact)]
1827
[InlineData(CommandViewModelState.
Enabled
, true, true, ResourceListDensity.Compact)]
1838
Command("custom", "Custom", CommandViewModelState.
Enabled
, true),
1839
Command(CommandViewModel.DeleteParameterCommand, "Delete parameter", CommandViewModelState.
Enabled
, true)
1895
Command(CommandViewModel.StopCommand, CommandViewModelState.
Enabled
),
1897
Command("deploy", CommandViewModelState.
Enabled
),
2012
var stop = new CommandViewModel("resource-stop", CommandViewModelState.
Enabled
, "Stop", "Stop resource", confirmationMessage: "", argumentInputs: [], isHighlighted: true, iconName: "Stop", iconVariant: IconVariant.Filled);
Model\DashboardCommandExecutorTests.cs (1)
81
state: CommandViewModelState.
Enabled
,
Pages\ConsoleLogsTests.cs (3)
839
commands: [new CommandViewModel("test-name", CommandViewModelState.
Enabled
, "test-displayname", "test-displaydescription", confirmationMessage: "", argumentInputs: [], isHighlighted: true, iconName: string.Empty, iconVariant: IconVariant.Regular)]);
906
CommandViewModelState.
Enabled
,
948
commands: [new CommandViewModel("test-name", CommandViewModelState.
Enabled
, "test-displayname", "test-displaydescription", confirmationMessage: "", argumentInputs: [], isHighlighted: true, iconName: string.Empty, iconVariant: IconVariant.Regular)]);
Pages\ResourcesTests.cs (1)
277
CommandViewModelState.
Enabled
,
Aspire.Dashboard.Playwright.Tests (2)
Integration\Playwright\ResourcePaneResponsiveTests.cs (2)
264
commands: [new("inspect", CommandViewModelState.
Enabled
, "Inspect", "", "", [],
2847
new(name, CommandViewModelState.
Enabled
, name, "", confirmationMessage: "", argumentInputs: [],
Aspire.Dashboard.Tests (15)
Model\DashboardClientTests.cs (1)
1511
CommandViewModelState.
Enabled
,
Model\DashboardCommandExecutorTests.cs (2)
92
[InlineData(CommandViewModelState.
Enabled
, "Are you sure?")]
429
private static CommandViewModel CreateCommand(string name = "test-command", CommandViewModelState state = CommandViewModelState.
Enabled
, string confirmationMessage = "")
Model\ResourceMenuBuilderTests.cs (12)
93
var first = ModelTestHelpers.CreateResource(resourceName: "first", commands: [CreateCommand("Refresh", CommandViewModelState.
Enabled
)]);
94
var second = ModelTestHelpers.CreateResource(resourceName: "second", commands: [CreateCommand("Refresh", CommandViewModelState.
Enabled
)]);
99
var busy = ModelTestHelpers.CreateResource(resourceName: "busy", commands: [CreateCommand("Refresh", CommandViewModelState.
Enabled
)]);
100
var removed = ModelTestHelpers.CreateResource(resourceName: "removed", commands: [CreateCommand("Refresh", CommandViewModelState.
Enabled
)]);
128
var newlyAdded = ModelTestHelpers.CreateResource(resourceName: "new", commands: [CreateCommand("Refresh", CommandViewModelState.
Enabled
)]);
144
[InlineData(true, CommandViewModelState.
Enabled
)]
150
var member = ModelTestHelpers.CreateResource(resourceName: "first", commands: [CreateCommand("Refresh", CommandViewModelState.
Enabled
)]);
411
CommandViewModelState.
Enabled
,
421
CommandViewModelState.
Enabled
,
459
CommandViewModelState.
Enabled
,
504
CommandViewModelState.
Enabled
,
547
CommandViewModelState.
Enabled
,