Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using macro sub-properties not working in Service Apply Rules #2083

Open
semmasu opened this issue Feb 14, 2020 · 0 comments · May be fixed by #2085 or #2387
Open

Using macro sub-properties not working in Service Apply Rules #2083

semmasu opened this issue Feb 14, 2020 · 0 comments · May be fixed by #2085 or #2387

Comments

@semmasu
Copy link

semmasu commented Feb 14, 2020

Expected Behavior

A macro like $config.myproperty$ should be evaluated as macro
image

Current Behavior

A macro like $config.myproperty$ is evaluated as a string, currently only $config$ is treated as a macro
image

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)

  1. Create a Host with a custom variable containing an array of objects
    image
  2. Create a Service-Apply-Rule for this array
  3. Try to use a macro for the property of the array-element (e.g: $config.host$)
  4. 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
semmasu added a commit to semmasu/icingaweb2-module-director that referenced this issue Feb 14, 2020
@Yoda-BZH Yoda-BZH linked a pull request Sep 8, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant