You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A macro like $config.myproperty$ should be evaluated as macro
Current Behavior
A macro like $config.myproperty$ is evaluated as a string, currently only $config$ is treated as a macro
Possible Solution
The macro-whitelist could be implemented as a regex-pattern instead of plain string. This way instead of whitelisting array(['config']) it could be whitelisted as something like array(['^config[.$]']) to also capure all string starting with config.
Steps to Reproduce (for bugs)
Create a Host with a custom variable containing an array of objects
Create a Service-Apply-Rule for this array
Try to use a macro for the property of the array-element (e.g: $config.host$)
Check the preview, config.host is surrounden by "
Your Environment
Director version (System - About): 1.7.2 (master Feb 12, 2020)
Icinga Web 2 version and modules (System - About): 2.7.3
Icinga 2 version (icinga2 --version): r2.11.2-1
Operating System and version: Ubuntu 18.04.4 LTS (Bionic Beaver)
Webserver, PHP versions: apache/2.4.41
The text was updated successfully, but these errors were encountered:
semmasu
added a commit
to semmasu/icingaweb2-module-director
that referenced
this issue
Feb 14, 2020
Expected Behavior
A macro like
$config.myproperty$
should be evaluated as macroCurrent Behavior
A macro like
$config.myproperty$
is evaluated as a string, currently only$config$
is treated as a macroPossible Solution
The macro-whitelist could be implemented as a regex-pattern instead of plain string. This way instead of whitelisting
array(['config'])
it could be whitelisted as something likearray(['^config[.$]'])
to also capure all string starting withconfig.
Steps to Reproduce (for bugs)
$config.host$
)config.host
is surrounden by"
Your Environment
icinga2 --version
): r2.11.2-1The text was updated successfully, but these errors were encountered: