diff --git a/src/frontend/.starlight-icons/safelist.json b/src/frontend/.starlight-icons/safelist.json index 8b9037434c..20f8fa07f8 100644 --- a/src/frontend/.starlight-icons/safelist.json +++ b/src/frontend/.starlight-icons/safelist.json @@ -40,8 +40,11 @@ "i-material-icon-theme:folder-src-open", "i-material-icon-theme:folder-template", "i-material-icon-theme:folder-template-open", + "i-material-icon-theme:folder-vscode", + "i-material-icon-theme:folder-vscode-open", "i-material-icon-theme:git", "i-material-icon-theme:go", + "i-material-icon-theme:go-mod", "i-material-icon-theme:gradle", "i-material-icon-theme:html", "i-material-icon-theme:http", diff --git a/src/frontend/src/content/docs/dashboard/explore.mdx b/src/frontend/src/content/docs/dashboard/explore.mdx index 1a657af67b..3d4f6d5a21 100644 --- a/src/frontend/src/content/docs/dashboard/explore.mdx +++ b/src/frontend/src/content/docs/dashboard/explore.mdx @@ -4,7 +4,7 @@ description: Explore Aspire dashboard features — resource graph, console logs, --- import ThemeImage from '@components/ThemeImage.astro'; -import { Aside, Steps } from '@astrojs/starlight/components'; +import { Aside, Steps, Tabs, TabItem } from '@astrojs/starlight/components'; import OsAwareTabs from '@components/OsAwareTabs.astro'; import { Kbd } from 'starlight-kbd/components'; @@ -280,6 +280,45 @@ Select **Group resources** to group the list by tags, resource type, or state, o +### Resource display order + +By default, the resource list is ordered by resource type and then by name. To change where a resource appears, call `WithDisplayOrder` in the AppHost. It's a relative sort key: resources with a higher value appear first, resources without a value count as `0`, and a negative value moves a resource after them. Resources with the same value are sorted by name. If you reorder resources in the dashboard, your saved order takes precedence. + + + + +```csharp title="AppHost.cs" +#pragma warning disable ASPIRERESOURCETRAITS001 +var builder = DistributedApplication.CreateBuilder(args); + +builder.AddProject("api") + .WithDisplayOrder(10); + +builder.AddProject("worker") + .WithDisplayOrder(5); + +builder.Build().Run(); +``` + + + + +```typescript title="apphost.mts" +import { createBuilder } from './.aspire/modules/aspire.mjs'; + +const builder = await createBuilder(); + +await builder.addExecutable('api', 'node', '.', ['api.js']).withDisplayOrder(10); +await builder.addExecutable('worker', 'node', '.', ['worker.js']).withDisplayOrder(5); + +await builder.build().run(); +``` + + + + +In the preceding example, `api` appears before `worker`, and both appear before resources that don't set a display order. `WithDisplayOrder` is experimental; in C#, suppress the `ASPIRERESOURCETRAITS001` diagnostic to use it. + ### Resource list sidebar The Graph view and the telemetry pages (Console logs, Structured logs, Traces, and Metrics) show a resource list sidebar. Drag the splitter between the sidebar and the content to resize it. Select **Collapse resource list** to hide it and give the content more room. @@ -314,6 +353,8 @@ Select **Export as Mermaid** to open the currently visible resource graph as [Me Each resource has a set of available actions based on its current state, capabilities, and telemetry. For example, if a resource is running, the **Stop** action is enabled. If the resource is stopped, the **Start** action is enabled. Actions that don't apply to a resource may be omitted from its menu. +In the resource list, you can also open a resource's actions by right-clicking its row, or by focusing the row and pressing the Context Menu key or . + #### Stop or Start a resource The Aspire dashboard allows you to stop or start a resource by selecting the **Stop** or **Start** button in the **Actions** column. Consider the following screenshot of the resources page with the **Stop** button selected: @@ -881,13 +922,13 @@ The Graph view on the **Overview** page of the new dashboard includes a small ga -Choose **Normal** or **Hard** mode: +Choose **Normal** or **Hard core** mode. In **Hard core** mode, destroying an enemy really stops its resource. Clearing the wave starts the stopped resources again, but they stay stopped if you lose or exit the game; start them again from the Resources page. - + -Press to exit the game. +You can also press while the graph has focus to start the game. Press to exit it. ## Interaction prompts diff --git a/src/frontend/src/content/docs/reference/cli/commands/aspire-destroy.mdx b/src/frontend/src/content/docs/reference/cli/commands/aspire-destroy.mdx index 9b11c6b323..0b50b6a6e7 100644 --- a/src/frontend/src/content/docs/reference/cli/commands/aspire-destroy.mdx +++ b/src/frontend/src/content/docs/reference/cli/commands/aspire-destroy.mdx @@ -53,11 +53,7 @@ The destroy command requires --yes when the --non-interactive option is specifie ### Unknown arguments -`aspire destroy` rejects unrecognized options and positional arguments before it discovers or starts the AppHost, so a mistyped option can't silently run the destroy pipeline. The command exits with code `1`: - -```bash title="Aspire CLI" -aspire destroy --force -``` +`aspire destroy` rejects unrecognized options and positional arguments before it discovers or starts the AppHost, so a mistyped option can't silently run the destroy pipeline. For example, passing `--force`, which isn't an `aspire destroy` option, exits with code `1` and reports: ```text title="Output" Unrecognized command or argument '--force'.