ui: Add `Service.Partition` as available variable for dashboard urls (#11654)
This commit is contained in:
parent
8750d74a51
commit
6fa1a058a6
|
@ -0,0 +1,3 @@
|
|||
```release-note:feature
|
||||
ui: Include `Service.Partition` into available variables for `dashboard_url_templates`
|
||||
```
|
|
@ -193,6 +193,7 @@ as |items item dc|}}
|
|||
Service=(hash
|
||||
Name=item.Service.Service
|
||||
Namespace=(or item.Service.Namespace '')
|
||||
Partition=(or item.Service.Partition '')
|
||||
)
|
||||
)
|
||||
}}
|
||||
|
|
|
@ -109,6 +109,7 @@ as |nspace dc items topology|}}
|
|||
Service=(hash
|
||||
Name=items.firstObject.Name
|
||||
Namespace=(or items.firstObject.Namespace '')
|
||||
Partition=(or items.firstObject.Partition '')
|
||||
)
|
||||
)
|
||||
}}
|
||||
|
|
|
@ -231,7 +231,7 @@ The options below are all specified on the command-line.
|
|||
Like [`enable_script_checks`](#_enable_script_checks), but only enable them when
|
||||
they are defined in the local configuration files. Script checks defined in HTTP
|
||||
API registrations will still not be allowed.
|
||||
|
||||
|
||||
|
||||
- `-encrypt` ((#\_encrypt)) - Specifies the secret key to use for encryption
|
||||
of Consul network traffic. This key must be 32-bytes that are Base64-encoded. The
|
||||
|
@ -2191,6 +2191,8 @@ bind_addr = "{{ GetPrivateInterfaces | include \"network\" \"10.0.0.0/8\" | attr
|
|||
|
||||
- `{{Service.Name}}` - Replaced with the current service's name.
|
||||
- `{{Service.Namespace}}` - Replaced with the current service's namespace or empty if namespaces are not enabled.
|
||||
- `{{Service.Partition}}` - Replaced with the current service's admin
|
||||
partition or empty if admin partitions are not enabled.
|
||||
- `{{Datacenter}}` - Replaced with the current service's datacenter.
|
||||
|
||||
- `ui_dir` - **This field is deprecated in Consul 1.9.0. See the [`ui_config.dir`](#ui_config_dir) field instead.**
|
||||
|
|
|
@ -104,7 +104,8 @@ ui_config {
|
|||
dashboard_url_templates {
|
||||
service = "https://grafana.example.com/d/lDlaj-NGz/
|
||||
service-overview?orgId=1&var-service={{Service.Name}}&
|
||||
var-namespace={{Service.Namespace}}&var-dc={{Datacenter}}"
|
||||
var-namespace={{Service.Namespace}}&
|
||||
var-partition={{Service.Partition}}&var-dc={{Datacenter}}"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue