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

Service Sets: assign where condition renders true as string #1769

Closed
dnsmichi opened this issue Jan 31, 2019 · 2 comments
Closed

Service Sets: assign where condition renders true as string #1769

dnsmichi opened this issue Jan 31, 2019 · 2 comments

Comments

@dnsmichi
Copy link
Contributor

Expected Behavior

Same as with apply rules defined, true and false are rendered as raw values and not as strings.

Current Behavior

Service sets render "true" as given in the web form.

screen shot 2019-01-31 at 13 22 36
screen shot 2019-01-31 at 13 22 57
screen shot 2019-01-31 at 13 23 27

Possible Solution

Probably the rendering/replacement takes place in two code locations. Or a call is missing to extract special values.

Steps to Reproduce (for bugs)

  • Define a data field of type boolean
  • Create a service set, add one service to it
  • Add assign where condition to the set
  • Render the configuration

Your Environment

  • Director version (System - About): 1.6.0, release
  • Icinga Web 2 version and modules (System - About): snapshot packages, 2019-01-30
  • Icinga 2 version (icinga2 --version): snapshot packages, 2019-01-30
  • Operating System and version: CentOS 7
  • Webserver, PHP versions: Apache, PHP 7 SCL
@Thomas-Gelf
Copy link
Contributor

Hi @dnsmichi,

unfortunately we cannot just cast the string "true" to a boolean. Someone might have host.vars.something = "true", there should be no hidden magic. Because of this there are some special operators in the drop-down field when defining an Apply Rule. is true (or set) is probably what you're looking for.

Cheers,
Thomas

NB: If you have a better idea of how to deal with this please let me know!

@dnsmichi
Copy link
Contributor Author

Hi @Thomas-Gelf,

I thought there was sort of an automated rendering for these values? But reading on, I see that there's more operators added to the condition. Makes sense now, I had not remembered that, now I do.

Thanks for the fast response :) No idea for the renderer unfortunately, unless you define this once (but this breaks existing installations).

Cheers,
Michael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants