Saved Views
views holds a Project’s Saved Views: structural ones, picked by selectors and drawn at a level (deployment for a Deployment View), and dynamic ones, a scenario as Steps. Each View’s id is unique among the Project’s Views, and others name it as project:id.
Example
Section titled “Example”The Kitchen sink’s: a structural View that opens a System, one that selects everything upstream of a datastore, leaves out a Person and opens with the Impact Lens, and a Dynamic View with a call, a derived edge, an event and a reply:
views: structural: everything: title: Everything description: Every Element, with Shop and API open. level: c3 include: - element: shop with: descendants - customer - search - payment-gateway - payments-provider orders-db-outage: title: What an Orders DB outage affects description: The Services that depend on Orders DB, with the Impact Lens on. level: c2 include: - element: orders-db upstream: all exclude: - customer lens: impact: orders-db direction: upstream dynamic: place-order: title: Customer places an order description: A call, a derived edge, an event through the broker and the replies. steps: - from: customer to: web description: Checks out - from: web to: api description: POST /orders - from: api to: orders-db description: Stores the order - from: api to: mailer description: orders.placed - from: api to: web return: true description: Order placedSee Save a View and Write a Dynamic View.
Fields
Section titled “Fields”The views key of a Project file declares its Saved Views.
Generated from schemas/model.schema.json, which editors use for completion, validation and these descriptions on hover. In the Field column, <id> stands for a key you choose and [] for each item of a list. A key that isn’t listed here is an error: unknown-field.
In the Type column:
- id: a lowercase slug of
a-z,0-9and-that starts with a letter or a digit (^[a-z0-9][a-z0-9-]*$). - reference: an id in the same Project, or a Qualified id,
project:id, for something in another Project (^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$).
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
views |
object | The Project’s Saved Views: structural ones, which include Deployment Views, and dynamic ones. |
||
views.structural |
map of id → object | Structural Views and Deployment Views, keyed by id. Other Projects name a View as project:id. |
||
views.structural.<id> |
object | A structural Saved View: the Elements its selectors pick, drawn at one level. With level: deployment it is a Deployment View. Its key is the View’s id, unique among the Project’s Saved Views. |
||
views.structural.<id>.title |
string | yes | The View’s display title. | |
views.structural.<id>.description |
string | What the View shows, or the question it answers. | ||
views.structural.<id>.tags |
list of string | Free-form labels for the View. | ||
views.structural.<id>.level |
c1, c2, c3 or deployment |
yes | The level every selected Element is collapsed to. c1: Persons and Systems. c2: Services, grouped in their Systems. c3: Components, inside their Services. deployment: a Deployment View, which places Deployments on their Deployment Targets in one Environment and needs environment. |
|
views.structural.<id>.expand |
list of reference | Elements to open one level deeper than level, showing their children. Each is an id in this Project, or project:id, and must be a node of the View that has children. A Deployment View ignores it. |
||
views.structural.<id>.collapse |
list of reference | Elements to close, hiding everything inside them. Each is an id in this Project, or project:id, and must be a node of the View that has children. A Deployment View ignores it. |
||
views.structural.<id>.direction |
TB, BT, LR or RL |
LR, or TB for a Deployment View |
The way the diagram runs. TB: top to bottom. BT: bottom to top. LR: left to right. RL: right to left. |
|
views.structural.<id>.environment |
id | For a Deployment View (level: deployment), which must have it, and for no other View: the Environment shown, as the id of an Environment in workspace.yaml. |
||
views.structural.<id>.targets |
list of reference | every Deployment Target | For a Deployment View (level: deployment) only: shows only the Deployments on these Deployment Targets and on the Targets inside them. Each is an id in this Project, or project:id. |
|
views.structural.<id>.include |
list of Selector | every Element in the Workspace | Selectors for the Elements to show. | |
views.structural.<id>.exclude |
list of Selector | Selectors for the Elements to leave out of what include picked. An excluded Element takes everything inside it with it. |
||
views.structural.<id>.lens |
Lens | The Lens the View opens with. A Lens highlights nodes and never changes which nodes the View shows. | ||
views.dynamic |
map of id → object | Dynamic Views, keyed by id. Other Projects name a View as project:id. |
||
views.dynamic.<id> |
object | A Dynamic View: one scenario as an ordered list of Steps, shown as a sequence chart. Its key is the View’s id, unique among the Project’s Saved Views. | ||
views.dynamic.<id>.title |
string | yes | The View’s display title. | |
views.dynamic.<id>.description |
string | What the scenario is. | ||
views.dynamic.<id>.tags |
list of string | Free-form labels for the View. | ||
views.dynamic.<id>.participants |
list of reference | the order the Steps first use them | Elements that take part, in the order to draw them, each as an id in this Project or project:id. Participants not listed follow, in the order the Steps first use them. An Element and its own ancestor can’t both take part. |
|
views.dynamic.<id>.steps |
list of object | yes | The Steps of the scenario, in order. | |
views.dynamic.<id>.steps[] |
object | A Step: one interaction of the scenario, which must follow a Relationship in the Model. It is a call from a consumer to its provider, an event from a Publisher to a Subscriber, or with return: true a reply. |
||
views.dynamic.<id>.steps[].from |
reference | yes | The Element the Step starts at: the consumer of a call, the Publisher of an event, or the sender of a reply. An id in this Project, or project:id. |
|
views.dynamic.<id>.steps[].to |
reference | yes | The Element the Step reaches: the provider of a call, the Subscriber of an event, or the receiver of a reply. An id in this Project, or project:id. |
|
views.dynamic.<id>.steps[].relationship |
reference | The id of the Relationship the Step takes, as an id in this Project or project:id. Needed only when several Relationships match the two Elements. |
||
views.dynamic.<id>.steps[].description |
string | the Relationship’s description, or its channel for an event |
The text on the Step’s arrow. | |
views.dynamic.<id>.steps[].note |
string | A note shown under the Step. | ||
views.dynamic.<id>.steps[].return |
boolean | false |
true makes the Step the reply to a sync Relationship declared from to to from. An async Relationship has no reply. |
Selector
Section titled “Selector”One entry of a Saved View’s include or exclude: an id, or a map that picks several Elements at once.
reference: One Element, by its id: an id in this Project, or project:id.
{element}: One Element, and optionally what is inside it and what is upstream or downstream of it.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
element |
reference | yes | The Element to start from: an id in this Project, or project:id. |
|
with |
children or descendants |
Also selects what is inside the Element. children: the Elements directly inside it. descendants: everything inside it, at any depth. |
||
upstream |
integer ≥ 0 or all |
Also selects the Elements upstream of it, those that depend on it: a number of hops, or all for every one of them. |
||
downstream |
integer ≥ 0 or all |
Also selects the Elements downstream of it, those it depends on: a number of hops, or all for every one of them. |
{team}: Every Element a Team owns.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
team |
id | yes | The Team: the id of a Team in workspace.yaml. |
{tag}: Every Element that carries a tag.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
tag |
string | yes | The tag, as written in the Elements’ tags. |
{from, to}: The paths between two Elements, followed in both directions. As a selector it picks every Element on them; as a Lens it highlights them. Its fields are under Path selector.
Path selector
Section titled “Path selector”The paths between two Elements, followed in both directions. As a selector it picks every Element on them; as a Lens it highlights them.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
from |
reference | yes | One end of the paths: an id in this Project, or project:id. |
|
to |
reference | yes | The other end of the paths: an id in this Project, or project:id. |
|
paths |
shortest or integer ≥ 1 |
shortest |
Which paths to take. shortest: the shortest paths, however long. A number n: every path of at most n hops. |
The Lens the View opens with. A Lens highlights nodes and never changes which nodes the View shows.
{impact}: The Impact Lens: what is upstream or downstream of one Element, each node marked with how many hops away it is.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
impact |
reference | yes | The Element whose impact is highlighted: an id in this Project, or project:id. |
|
direction |
upstream, downstream or both |
both |
Which side to highlight. upstream: what depends on the Element. downstream: what it depends on. both: both sides. |
{team}: The Team Lens: what one Team owns.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
team |
id | yes | The Team: the id of a Team in workspace.yaml. |
{path}: The Path Lens: the paths between two Elements.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
path |
Path selector | yes | The paths between two Elements, followed in both directions. As a selector it picks every Element on them; as a Lens it highlights them. |
Documents the beta branch at cd98671, ahead of the latest release, v1.4.0.