mirror of https://github.com/status-im/consul.git
ui: Add `Service.Partition` as available variable for dashboard urls (#11654)
This commit is contained in:
parent
bda64f98b3
commit
b5c8af4580
|
@ -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
|
Service=(hash
|
||||||
Name=item.Service.Service
|
Name=item.Service.Service
|
||||||
Namespace=(or item.Service.Namespace '')
|
Namespace=(or item.Service.Namespace '')
|
||||||
|
Partition=(or item.Service.Partition '')
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -109,6 +109,7 @@ as |nspace dc items topology|}}
|
||||||
Service=(hash
|
Service=(hash
|
||||||
Name=items.firstObject.Name
|
Name=items.firstObject.Name
|
||||||
Namespace=(or items.firstObject.Namespace '')
|
Namespace=(or items.firstObject.Namespace '')
|
||||||
|
Partition=(or items.firstObject.Partition '')
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -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.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.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.
|
- `{{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.**
|
- `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 {
|
dashboard_url_templates {
|
||||||
service = "https://grafana.example.com/d/lDlaj-NGz/
|
service = "https://grafana.example.com/d/lDlaj-NGz/
|
||||||
service-overview?orgId=1&var-service={{Service.Name}}&
|
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