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

[dev.icinga.com #10329] Pretty-print arrays and dictionaries when converting them to strings #3469

Closed
icinga-migration opened this issue Oct 7, 2015 · 5 comments
Labels
area/configuration DSL, parser, compiler, error handling enhancement New feature or request
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/10329

Created by fir3wall on 2015-10-07 12:53:02 00:00

Assignee: gbeutner
Status: Resolved (closed on 2015-10-26 10:10:03 00:00)
Target Version: 2.4.0
Last Update: 2015-11-12 15:34:39 00:00 (in Redmine)

Backport?: No
Include in Changelog: 1

Hello,

Would be beneficial if str() function will format dict and arrays into string objects.

Ex.
vars.mylist = [ "hello", "world" ]
vars.mystring = str(vars.mylist)
// vars.mystring = helloworld

Current behaviour:
( string([ "hello", "world" ]) ) = "Object of type 'icinga::Array'"

IRC suggested temporary hack:
[ "hello", "world" ].join(" ") ) = "hello world"

Thanks
Dariusz

Changesets

2015-10-26 10:05:24 00:00 by (unknown) dd77863

Implement Array::ToString and Dictionary::ToString

fixes #10329
@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-10-07 12:55:00 00:00

  • Category changed from CLI to Configuration

@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-10-26 10:05:52 00:00

  • Assigned to set to gbeutner
  • Target Version set to 2.4.0

@icinga-migration
Copy link
Author

Updated by Anonymous on 2015-10-26 10:10:03 00:00

  • Status changed from New to Resolved
  • Done % changed from 0 to 100

Applied in changeset dd77863.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-11-06 16:58:12 00:00

  • Subject changed from _str function to format list / dict _ to Pretty-print arrays and dictionaries when converting them to strings

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-11-12 15:34:39 00:00

  • Backport? changed from TBD to No

@icinga-migration icinga-migration added enhancement New feature or request area/configuration DSL, parser, compiler, error handling labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.4.0 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/configuration DSL, parser, compiler, error handling enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant