Skip to content

Commit

Permalink
fix: show context for templating parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe committed Oct 2, 2024
1 parent 368dbac commit aaa0332
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 12 deletions.
2 changes: 1 addition & 1 deletion mission-control/docs/playbooks/self-service.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Self Service
sidebar_position: 4
---

import Parameters from '../reference/playbooks/parameters.md'
import Parameters from '../reference/playbooks/parameters.mdx'

Playbooks can be manually triggered on a component, config item or check.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,53 @@ title: Parameters

Playbook parameter defines a parameter that a playbook needs to run.

| Field | Description | Scheme | Required |
| ------------- | --------------------------------------------------- | ---------------------------------------------- | -------- |
| `name` | Name of parameter. | `string` | `true` |
| `default` | Default value of the parameter. | [Go Template](/reference/scripting/gotemplate) | |
| `label` | Label of the parameter. | `string` | |
| `required` | Specify if the parameter is required. | `bool` | |
| `icon` | Icon for the playbook. | [`Icon`](/reference/types#icon) | |
| `description` | Description of the parameter. | `string` | |
| `type` | Type of parameter. _(Defaults to "text")_ | `string` | |
| `properties` | Properties of parameter. _Varies based on the type_ | `map[string]string` | |

<Fields withTemplates rows={[

Check failure on line 11 in mission-control/docs/reference/playbooks/parameters.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/reference/playbooks/parameters.mdx#L11

[Flanksource.Spelling] Is 'withTemplates' spelled correctly? Is it missing code formatting?
Raw output
{"message": "[Flanksource.Spelling] Is 'withTemplates' spelled correctly? Is it missing code formatting?", "location": {"path": "mission-control/docs/reference/playbooks/parameters.mdx", "range": {"start": {"line": 11, "column": 9}}}, "severity": "ERROR"}
{
field: "name",
description: "Name of parameter.",
scheme: "string",
required: true
},
{
field: "default",
description: "Default value of the parameter.",
scheme: "gotemplate",

Check failure on line 21 in mission-control/docs/reference/playbooks/parameters.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/reference/playbooks/parameters.mdx#L21

[Flanksource.Spelling] Is 'gotemplate' spelled correctly? Is it missing code formatting?
Raw output
{"message": "[Flanksource.Spelling] Is 'gotemplate' spelled correctly? Is it missing code formatting?", "location": {"path": "mission-control/docs/reference/playbooks/parameters.mdx", "range": {"start": {"line": 21, "column": 14}}}, "severity": "ERROR"}
templateEnv: [

Check failure on line 22 in mission-control/docs/reference/playbooks/parameters.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/reference/playbooks/parameters.mdx#L22

[Flanksource.Spelling] Is 'templateEnv' spelled correctly? Is it missing code formatting?
Raw output
{"message": "[Flanksource.Spelling] Is 'templateEnv' spelled correctly? Is it missing code formatting?", "location": {"path": "mission-control/docs/reference/playbooks/parameters.mdx", "range": {"start": {"line": 22, "column": 5}}}, "severity": "ERROR"}
{"name": "Context", "url": "/reference/playbooks/context"},
]
},
{
field: "label",
description: "Label of the parameter.",
scheme: "string",
},
{
field: "required",
description: "Specify if the parameter is required.",
scheme: "bool",
},
{
field: "icon",
description: "Icon for the playbook.",
scheme: "Icon",
},
{
field: "description",
description: "A short sentence to describe the parameter. This shows up in the input form when running the playbook.",
scheme: "string",
},
{
field: "type",
description: "Type of parameter. (Defaults to \"text\")",
scheme: "[`Type`](#types)",
},
{
field: "properties",
description: "Properties of parameter. _Varies based on the type_",
scheme: "`map[string]string`",
}
]} />

## Defaulting

Parameter values can be defaulted from the selected resource
Expand Down

0 comments on commit aaa0332

Please sign in to comment.