Project

General

Profile

Bug #11749

new host puppet environment jquery selector too liberal

Added by Justin Sherrill about 5 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
High
Category:
Host creation
Target version:
Difficulty:
medium
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

When creating a host or hostgroup and selecting just the puppet environment, no puppet classes get loaded on the 'puppet classes' tab. The user has to select a lifecycle env and content view and only then will they be loaded.

Once those are selected the user can change the puppet env at will, but this should not be required


Related issues

Related to Katello - Bug #13988: Hostgroups Puppet Class management issueRejected2016-03-01

Associated revisions

Revision 4eeea973 (diff)
Added by Justin Sherrill over 4 years ago

Fixes #11749 - puppet env jquery selector more restrictive

This current jquery selector for puppet environment
selection would match any select box where name
included environment_id. This caused issues with
katello as we put a field containing lifecycle_environment_id
in the form

Revision 70aad752 (diff)
Added by Justin Sherrill over 4 years ago

Fixes #11749 - puppet env jquery selector more restrictive

This current jquery selector for puppet environment
selection would match any select box where name
included environment_id. This caused issues with
katello as we put a field containing lifecycle_environment_id
in the form

(cherry picked from commit 4eeea97393e19327f39002e86f0fb4f97415cc1a)

History

#1 Updated by Eric Helms about 5 years ago

  • Legacy Backlogs Release (now unused) changed from 70 to 86

#2 Updated by Eric Helms over 4 years ago

  • Legacy Backlogs Release (now unused) changed from 86 to 144

#3 Updated by Eric Helms over 4 years ago

  • Legacy Backlogs Release (now unused) changed from 144 to 168

#4 Updated by Eric Helms over 4 years ago

  • Legacy Backlogs Release (now unused) deleted (168)

#5 Updated by Justin Sherrill over 4 years ago

  • Assignee set to Justin Sherrill
  • Priority changed from Normal to High
  • Legacy Backlogs Release (now unused) set to 143
  • Difficulty changed from easy to medium

#6 Updated by Justin Sherrill over 4 years ago

  • Related to Bug #13988: Hostgroups Puppet Class management issue added

#7 Updated by Justin Sherrill over 4 years ago

  • Project changed from Katello to Foreman
  • Subject changed from puppet class population on new host/hostgroup page requires lifecycle env/content view selection to new host puppet environment jquery selector too liberal
  • Category changed from 83 to Host creation
  • Status changed from New to Assigned

This appears to be a result of https://github.com/theforeman/foreman/blob/develop/app/assets/javascripts/application.js#L387

this selector:

$('select[name*=environment_id]')

seems to be matching 'name=host[environment_id]' but its also matching 'name=host[content_facet_attributes][lifecycle_environment_id]'

We should make the selector more restrictive. Moving to foreman

#8 Updated by The Foreman Bot over 4 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3642 added

#9 Updated by Dominic Cleal over 4 years ago

  • Legacy Backlogs Release (now unused) deleted (143)

#10 Updated by Justin Sherrill over 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#11 Updated by Dominic Cleal over 4 years ago

  • Legacy Backlogs Release (now unused) set to 161

Also available in: Atom PDF