# orca.ui.contained

> A module of morca's API.

Ops > Control's Runs card: each local and control-placed run going on this host, with its cgroup's memory against its limit (`orca.cgroup`), which the scheduler records every 5 seconds, and its grant (`orca.resources`).

## Structs

### `HostRun`

```mojo
struct HostRun
```

Implements: `Copyable`, `Movable`

Fields:

- `id: Int`
- `pipeline: String`
- `placement: String`
- `grant_mb: Int`
- `limit_mb: Int`: `memory.high`; 0 for a run without a cgroup.
- `max_mb: Int`
- `memory_bytes: Int`: Its cgroup's memory when last recorded; -1 before that.

## Functions

### `host_runs`

```mojo
def host_runs(mut db: State) -> List[HostRun]
```

The running runs placed on the scheduler's host.

### `host_runs_html`

```mojo
def host_runs_html(mut h: Html, runs: List[HostRun])
```

The Runs card; nothing when none is going.

### `host_runs_json`

```mojo
def host_runs_json(runs: List[HostRun]) -> String
```

`[{"run": .., "memory_limit_mb": ..|null, ...}]`.
