mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
* Hacky but shows links and desc * markdown * Small pre-test cleanup * Test for UI description and link rendering * JSON jobspec docs and variable example job get UI block * Jobspec documentation for UI block * Description and links moved into the Title component and made into Helios components * Marked version upgrade * Allow links without a description and max description to 1000 chars * Node 18 for setup-js * markdown sanitization * Ui to UI and docs change * Canonicalize, copy and diff for job.ui * UI block added to testJob for structs testing * diff test * Remove redundant reset * For readability, changing the receiving pointer of copied job variables * TestUI endpiont conversion tests * -require +must * Nil check on Links * JobUIConfig.Links as pointer --------- Co-authored-by: Tim Gross <tgross@hashicorp.com>
49 lines
1.2 KiB
Plaintext
49 lines
1.2 KiB
Plaintext
---
|
|
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. We
|
|
support [GitHub Flavored Markdown](https://github.github.com/gfm/).
|
|
- `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"
|
|
}
|
|
}
|
|
# ...
|
|
}
|
|
```
|