-
Notifications
You must be signed in to change notification settings - Fork 983
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 #9591 - Added support for "inherit" state. #2230
Conversation
I think some tests will be beneficial here. |
end | ||
|
||
def puppet_ca(f) | ||
OVERRIDE_TEXT = "inherit" |
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.
missing N_()
?
EDIT: I see we extract this value later in view but still
@@ -400,3 +400,27 @@ function setPowerState(item, status){ | |||
power_actions.hide(); | |||
$('[rel="twipsy"]').tooltip(); | |||
} | |||
|
|||
function disableButtonToggle(item) { |
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.
I'd do item = $(item)
at the beginning of the function and work with the benefits of jQuery later.
@ShimShtein please rebase |
Rebased |
@ShimShtein would you mind adding tests for |
Fixed the explicitly-selected bug |
Various unit tests appear to be failing, could you just have a look at those please? http://ci.theforeman.org/job/test_develop_pr_core/5673/ |
After rebase getting |
Found the error, |
Tests are still red, this time with a Javascript parse error. |
Finally! Found the problem. Now the tests are running (at least locally). |
Merged as 04cb74c for Foreman 1.10, thanks @ShimShtein. |
Cherry-picked from theforeman#2230 Conflicts: app/assets/javascripts/application.js app/controllers/api/v2/hosts_controller.rb app/controllers/hosts_controller.rb app/helpers/hosts_and_hostgroups_helper.rb app/models/host/managed.rb app/views/hosts/_form.html.erb test/unit/host_test.rb
Changed the UI so it will possible to create a dropdown with empty value and "inherit" option in the same time.
On the server side, I check for existence of the field in the update to check if I need to inherit the value (if the field does not exists - its value will be inherited).
I did not change the notion of "inherit" in hosts, it is more of a "copy" notion - it copies the value from the hostgroup, but does not change it, if the value is changed. The change will be performed on the first update to the host object.