Skip to content

Commit

Permalink
Jobspec documentation for UI block
Browse files Browse the repository at this point in the history
  • Loading branch information
philrenaud committed May 10, 2024
1 parent ebbf836 commit 57b935d
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
47 changes: 47 additions & 0 deletions website/content/docs/job-specification/ui.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
layout: docs
page_title: ui Block - Job Specification
description: |-
The "ui" block allows lets users add description and helpful links to their
job page in the Nomad Web UI.
---

# `ui` Block

<Placement
groups={[
['job', 'ui'],
]}
/>

The `ui` block provides options to modify the presentation of the Job index page
in the Web UI. When specified, a description and any number of links will be
added to the top of the job page in question.

The following will provide the Web UI with a job description and a pair of links:

## `ui` Parameters

- `description` `(string: "")` - The markdown-enabled description of the job
- `link` `(map<string|string>: nil)` - A link that should show up in the header
of the job index page in the Web UI. A job can have any number of links, and
they must contain both a string `label` and `url`.

## `ui` Example

```hcl
job "docs" {
ui {
description = "A job that uses **Nomad Variables**"
link {
label = "Learn more about Nomad"
url = "https://developer.hashicorp.com/nomad"
}
link {
label = "Nomad on Github"
url = "https://github.com/hashicorp/nomad"
}
}
# ...
}
```
4 changes: 4 additions & 0 deletions website/data/docs-nav-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -1807,6 +1807,10 @@
"title": "transparent_proxy",
"path": "job-specification/transparent_proxy"
},
{
"title": "ui",
"path": "job-specification/ui"
},
{
"title": "update",
"path": "job-specification/update"
Expand Down

0 comments on commit 57b935d

Please sign in to comment.