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

Fixes #8217, #8214 - Rearranging override section in smart class parameter page and host page #1898

Closed
wants to merge 1 commit into from

Conversation

orrabin
Copy link
Member

@orrabin orrabin commented Nov 3, 2014

No description provided.

@domcleal
Copy link
Contributor

domcleal commented Nov 3, 2014

Missing "#" before the ticket number, so Redmine won't link it.

@orrabin orrabin changed the title Fixes 8217 - Rearranging override section in smart class parameter page Fixes #8217 - Rearranging override section in smart class parameter page Nov 3, 2014
@orrabin
Copy link
Member Author

orrabin commented Nov 3, 2014

@domcleal sorry, added "#".

@orrabin orrabin changed the title Fixes #8217 - Rearranging override section in smart class parameter page Fixes #8217, #8214 - Rearranging override section in smart class parameter page and host page Nov 3, 2014
@ohadlevy
Copy link
Member

@orrabin cna you rebase please

@orrabin
Copy link
Member Author

orrabin commented Dec 28, 2014

@ohadlevy rebased

<%= f.fields_for :lookup_values do |builder| %>
<%= render "common_parameters/puppetclass_parameter", :f => builder %>
<%= render "common_parameters/puppetclass_parameter", :f => builder %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: indent

@orrabin
Copy link
Member Author

orrabin commented Dec 29, 2014

@tbrisker thanks for your comments, can you please review again?

:onchange=>'toggleUsePuppetDefaultValue(this, "value")') if is_param %>
<%= checkbox_f(f, :use_puppet_default, :label => _('Use Puppet default'), :size => "col-md-8",
:help_inline => popover(_("Explain use Puppet default"), _('Do not send this parameter via the ENC.<br>Puppet will use the value defined in the Puppet manifest for this parameter.')),
:onchange=>'toggleUsePuppetDefaultValue(this, "value")') if is_param %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: indentation

<%= f.check_box :use_puppet_default, :'data-property' => 'use_puppet_default',
:disabled => (not authorized_via_my_scope("host_editing", "edit_params")),
:onchange=>'toggleUsePuppetDefaultValue(this, "value")' %>
<%= popover('', _('Do not send this parameter via the ENC. Puppet will use the value defined in the puppet manifest for this parameter')) %>
<%= popover('', _("Do not send this parameter via the ENC.<br> Puppet will use the value defined in the puppet manifest for this parameter")) %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also appears in app/views/lookup_keys/_value.html.erb:7 and app/views/lookup_keys/_fields.html.erb:18. However only sometimes is it a popover - consider extracting to helper or otherwise changing to ensure consistency.

@tbrisker
Copy link
Member

tbrisker commented Mar 5, 2015

In general, the part in the puppetclass form looks good.
However, the host[group] forms need more work. The table headers don't match the table when adding host[group] parameters, or when overriding the hostgroup parameters in the host. The "Scope" header is unclear and the content for that column is always Global.

@orrabin
Copy link
Member Author

orrabin commented Mar 10, 2015

@tbrisker thanks for the review.
I fixed most of your comments. The host form needs some UI changes for parameters but I think it should be in a different PR.

@@ -17,4 +17,8 @@ def parameter_value_field(value)
content_tag(:span, :class => "help-block") { popover(_("Additional info"), _("<b>Source:</b> %{type} %{name}") % {:type => _(value[:source].to_s), :name => source_name})}
end
end

def use_puppet_default_help link_title = _("Explain use Puppet default"), title = _("Use Puppet Default")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you make the "Default" lower case please?

@domcleal
Copy link
Contributor

The host form still seems to have an issue with headers, I see a second "Puppet class" header which is followed by global parameters:

screenshot from 2015-03-18 12 06 15

@orrabin
Copy link
Member Author

orrabin commented Mar 25, 2015

@domcleal these are two problems - the second puppet classes is actually overrides and the global parameters need their own header

@orrabin
Copy link
Member Author

orrabin commented Mar 25, 2015

@domcleal thanks for testing, I fixed you comments and rebased.

… in smart class parameter page and host page
@orrabin
Copy link
Member Author

orrabin commented Mar 26, 2015

[test]

@tbrisker
Copy link
Member

Looks fine to me, there is still more work to be done to improve the layout and UX but it can be incremental after merging this PR.

@dLobatog
Copy link
Member

Merged as 2b6605c, thanks @orrabin and especially @tbrisker and @domcleal for the review.

@dLobatog dLobatog closed this Apr 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants