mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-01-09 14:42:53 -05:00
Make sure to expect ITL compatible custom var names
This commit is contained in:
parent
104e2ab488
commit
d34da32f28
3 changed files with 15 additions and 15 deletions
|
|
@ -39,11 +39,11 @@ configuration:
|
|||
checkcommand_name=businessprocess-check
|
||||
```
|
||||
|
||||
A service can define specific custom variables for this. Some are mandatory.
|
||||
If they are not defined, the detail view integration won't be active.
|
||||
A service can define specific custom variables for this. Mandatory ones
|
||||
that are not defined, cause the detail view integration to not be active.
|
||||
|
||||
| Variable Name | Mandatory | Description |
|
||||
|---------------------------|-----------|----------------------------------------------|
|
||||
| businessprocess\_process | Yes | The `<process>` being checked |
|
||||
| businessprocess\_config | Yes | Name of the config that contains `<process>` |
|
||||
| businessprocess\_as\_tree | No | Whether to show `<process>` as tree or tiles |
|
||||
| Variable Name | Mandatory | Description |
|
||||
|--------------------------------------|-----------|----------------------------------------------|
|
||||
| icingacli\_businessprocess\_process | Yes | The `<process>` being checked |
|
||||
| icingacli\_businessprocess\_config | No | Name of the config that contains `<process>` |
|
||||
| icingaweb\_businessprocess\_as\_tree | No | Whether to show `<process>` as tree or tiles |
|
||||
|
|
|
|||
|
|
@ -46,12 +46,12 @@ class ServiceDetailExtension extends ServiceDetailExtensionHook
|
|||
return HtmlString::create('');
|
||||
}
|
||||
|
||||
$bpName = $service->customvars['businessprocess_config'] ?? null;
|
||||
$bpName = $service->customvars['icingacli_businessprocess_config'] ?? null;
|
||||
if (! $bpName) {
|
||||
return HtmlString::create('');
|
||||
$bpName = key($this->storage->listProcessNames());
|
||||
}
|
||||
|
||||
$nodeName = $service->customvars['businessprocess_process'] ?? null;
|
||||
$nodeName = $service->customvars['icingacli_businessprocess_process'] ?? null;
|
||||
if (! $nodeName) {
|
||||
return HtmlString::create('');
|
||||
}
|
||||
|
|
@ -61,7 +61,7 @@ class ServiceDetailExtension extends ServiceDetailExtensionHook
|
|||
|
||||
IcingaDbState::apply($bp);
|
||||
|
||||
if ($service->customvars['businessprocess_as_tree'] ?? false) {
|
||||
if ($service->customvars['icingaweb_businessprocess_as_tree'] ?? false) {
|
||||
$renderer = new TreeRenderer($bp, $node);
|
||||
$tag = 'ul';
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -52,12 +52,12 @@ class DetailviewExtension extends DetailviewExtensionHook
|
|||
return '';
|
||||
}
|
||||
|
||||
$bpName = $object->_service_businessprocess_config;
|
||||
$bpName = $object->_service_icingacli_businessprocess_config;
|
||||
if (! $bpName) {
|
||||
return '';
|
||||
$bpName = key($this->storage->listProcessNames());
|
||||
}
|
||||
|
||||
$nodeName = $object->_service_businessprocess_process;
|
||||
$nodeName = $object->_service_icingacli_businessprocess_process;
|
||||
if (! $nodeName) {
|
||||
return '';
|
||||
}
|
||||
|
|
@ -67,7 +67,7 @@ class DetailviewExtension extends DetailviewExtensionHook
|
|||
|
||||
MonitoringState::apply($bp);
|
||||
|
||||
if (filter_var($object->_service_businessprocess_as_tree, FILTER_VALIDATE_BOOLEAN)) {
|
||||
if (filter_var($object->_service_icingaweb_businessprocess_as_tree, FILTER_VALIDATE_BOOLEAN)) {
|
||||
$renderer = new TreeRenderer($bp, $node);
|
||||
$tag = 'ul';
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue