Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/frontend/.starlight-icons/safelist.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
49 changes: 45 additions & 4 deletions src/frontend/src/content/docs/dashboard/explore.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -280,6 +280,45 @@ Select **Group resources** to group the list by tags, resource type, or state, o

<ThemeImage dark={resourcesGrouped} light={resourcesGroupedLight} alt="A screenshot of the Aspire dashboard Resources page with resources grouped by resource type." />

### 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.

<Tabs syncKey='aspire-lang'>
<TabItem id='csharp' label='C#'>

```csharp title="AppHost.cs"
#pragma warning disable ASPIRERESOURCETRAITS001
var builder = DistributedApplication.CreateBuilder(args);

builder.AddProject<Projects.Api>("api")
.WithDisplayOrder(10);

builder.AddProject<Projects.Worker>("worker")
.WithDisplayOrder(5);

builder.Build().Run();
```

</TabItem>
<TabItem id='typescript' label='TypeScript'>

```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();
```

</TabItem>
</Tabs>

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.
Expand Down Expand Up @@ -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 <kbd>Context Menu</kbd> key or <Kbd windows="Shift+F10" mac="Shift+F10" linux="Shift+F10" />.

#### 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:
Expand Down Expand Up @@ -881,13 +922,13 @@ The Graph view on the **Overview** page of the new dashboard includes a small ga

<ThemeImage dark={aspireOutageStart} light={aspireOutageStartLight} alt="The Aspire dashboard Graph view with the Play Aspire Outage button highlighted." />

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.

<ThemeImage dark={aspireOutageModes} light={aspireOutageModesLight} alt="The Aspire Outage start screen showing the Normal and Hard modes." />
<ThemeImage dark={aspireOutageModes} light={aspireOutageModesLight} alt="The Aspire Outage start screen showing the Normal and Hard core modes." />

<ThemeImage dark={aspireOutageGameplay} light={aspireOutageGameplayLight} alt="Aspire Outage gameplay." />

Press <Kbd windows="Esc" mac="Esc" linux="Esc" /> to exit the game.
You can also press <Kbd windows="O" mac="O" linux="O" /> while the graph has focus to start the game. Press <Kbd windows="Esc" mac="Esc" linux="Esc" /> to exit it.

## Interaction prompts

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'.
Expand Down
Loading