Skip to content

Commit

Permalink
IcingaArguments: accept DSL
Browse files Browse the repository at this point in the history
fixes #2811
  • Loading branch information
Thomas-Gelf committed Oct 10, 2023
1 parent 70e1aef commit dcf03dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/82-Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ This version hasn't been released yet
# Configuration Baskets
* FEATURE: it's now possible to upload snapshots for existing baskets (#1952)
* FIX: basket now shows where to expect changes for lists from snapshots (#2791)
* FIX: Icinga DSL parts for Commands are now restored from Baskets (#2811)

### REST API
* FIX: Commands give 304 w/o ghost changes for same properties (#2660)
Expand Down
4 changes: 3 additions & 1 deletion library/Director/Objects/IcingaArguments.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ protected function mungeCommandArgument($key, $value)
if (property_exists($value, 'type')) {
// argument is directly set as function, no further properties
if ($value->type === 'Function') {
$attrs['argument_value'] = self::COMMENT_DSL_UNSUPPORTED;
$attrs['argument_value'] = property_exists($value, 'body')
? $value->body
: self::COMMENT_DSL_UNSUPPORTED;
$attrs['argument_format'] = 'expression';
}
} elseif (property_exists($value, 'value')) {
Expand Down

0 comments on commit dcf03dc

Please sign in to comment.