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
Fixes #11458 - Override inline for class parameters #2858
Conversation
fa8994b
to
5820ee6
Compare
5820ee6
to
4b55112
Compare
diagnostic_helper = popover('', _("Optional parameter without value.<br/><i>Won\'t be given to Puppet.</i> <br><br><b>Description:</b> %s") % key.description, :icon => "warning-sign") | ||
end | ||
else | ||
diagnostic_helper = popover('', _("<b>Description:</b> %{desc}<br><b>Type:</b> %{type}<br> <b>Matcher:</b> %{matcher}") % { :desc => key.description, :type => key.key_type, :matcher => matcher}, :data => { :placement => 'top' }) | ||
diagnostic_helper = popover('', _("<b>Description:</b> %{desc}<br/><b>Type:</b> %{type}<br/> <b>Matcher:</b> %{matcher} <br/><b>Value:</b> %{original_value}") % { :desc => key.description, :type => key.key_type, :matcher => matcher, :original_value => original_value }, :data => { :placement => 'top' }, :title => _("Original value info")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth calling this the inherited or original value, rather than value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the popover title states this is all info related to the original value, do you think this needs more clarificaion?
Perhaps from the Use Puppet default column or even going back to icons instead of override/remove buttons?
Else probably something for a future PR, some links/buttons at the top to filter/only view overridden parameters.
Looks really good, I'm impressed! |
@domcleal I have updated to original commit to address your first comment, and added the corrections for the rest of the comments to a separate commit which can be squashed later if accepted, just to allow simple reversion if we decide to leave it as is and address those issues in the future. |
@tbrisker I've taken a look - not properly reviewed it at all, but from the UI/UX point of view.
What @domcleal suggested seems to look better, I would also suggest to display a small popover 'Overridden' when you hover the mouse on that table row:
Let me know what you think 👌 |
@dLobatog I addressed most of your comments. |
@tbrisker Thanks! A few more:
This doesn't have a lot to do with the PR, but what do you think about softening the borders of the input-group-addon and the textarea? I might do it on a PR after this unless you want to include it here, it's fairly easy. |
1fdd5a2
to
69a993c
Compare
I tried to fix a bit issues with |
f796329
to
e878ab4
Compare
value_for_key = value.try(:[], lookup_key.key) | ||
if value_for_key.present? | ||
[value_for_key[:value], | ||
"#{value_for_key[:element]} (#{value_for_key[:element_name]})"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation's off 1 space here, rubocop's unhappy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@tbrisker @orrabin Aside from the class checking on Sorry for holding this one up, but I think it's important we keep this part of the code as clear as possible since 'it needs refactoring' but it may take a long time before someone actually goes ahead and does it. Right now aside from the 2 issues above I say 👍 to the rest of the PR, thanks ! |
This implements override inline for smart class parameters and smart variables in host and hostgroup edit forms. Global variable override inline will be done in a seperate PR. Authors: Ori Rabin <orrabin@redhat.com> Tomer Brisker <tbrisker@redhat.com>
@dLobatog I addressed all your comments and fixed the js bug that cleared the field. |
This implements override inline for smart class parameters and smart
variables in host and hostgroup edit forms.
Global variable override inline will be done in a seperate PR.
Authors:
Ori Rabin orrabin@redhat.com
Tomer Brisker tbrisker@redhat.com