function fix_num_cores(event) {
  const num_cores_input = $('#batch_connect_session_context_num_cores');
  const data = $('#batch_connect_session_context_node_type').find(':selected').data();
  const cluster = current_cluster_capitalized();

  // do nothing if num_cores is blank or there's no data for node_type_input
  if(num_cores_input.val() === '' || !data) {
    return;
  }

  if(event.target && event.target.id == 'batch_connect_session_context_cluster'){
    const prev_cluster = event.target.textContent.split("\n")[0];
    shift_num_cores_value(num_cores_input, prev_cluster);
  }

  const min = data["minPpn" + cluster];
  const max = data["maxPpn" + cluster];

  num_cores_input.attr('max', max);
  num_cores_input.attr('min', min);

  // Clamp value between min and max
  num_cores_input.val(
    clamp(min, max, num_cores_input.val())
  );
}
/**
 * Fix num cores, allowing blanks to remain
 *
 * @param      {event}  event     A change event (node_type or cluster changes)
 */
Fix num cores, allowing blanks to remain
@param      {event}  event     A change event (node_type or cluster changes)
Fix num cores allowing blanks to remain @param { event } event A change event ( node_type or cluster changes )
function fix_num_cores(event) {
  const num_cores_input = $('#batch_connect_session_context_num_cores');
  const data = $('#batch_connect_session_context_node_type').find(':selected').data();
  const cluster = current_cluster_capitalized();
  if(num_cores_input.val() === '' || !data) {
    return;
  }
  if(event.target && event.target.id == 'batch_connect_session_context_cluster'){
    const prev_cluster = event.target.textContent.split("\n")[0];
    shift_num_cores_value(num_cores_input, prev_cluster);
  }
  const min = data["minPpn" + cluster];
  const max = data["maxPpn" + cluster];
  num_cores_input.attr('max', max);
  num_cores_input.attr('min', min);
  num_cores_input.val(
    clamp(min, max, num_cores_input.val())
  );
}
function fix_num_cores ( event ) { const num_cores_input = $ ( '#batch_connect_session_context_num_cores' ) ; const data = $ ( '#batch_connect_session_context_node_type' ) . find ( ':selected' ) . data ( ) ; const cluster = current_cluster_capitalized ( ) ; if ( num_cores_input . val ( ) === '' || ! data ) { return ; } if ( event . target && event . target . id == 'batch_connect_session_context_cluster' ) { const prev_cluster = event . target . textContent . split ( "\n" ) [ 0 ] ; shift_num_cores_value ( num_cores_input , prev_cluster ) ; } const min = data [ "minPpn" + cluster ] ; const max = data [ "maxPpn" + cluster ] ; num_cores_input . attr ( 'max' , max ) ; num_cores_input . attr ( 'min' , min ) ; num_cores_input . val ( clamp ( min , max , num_cores_input . val ( ) ) ) ; }
Fix num cores, allowing blanks to remain
 @param      {event}  event     A change event (node_type or cluster changes)
Fix num cores allowing blanks to remain @param { event } event A change event ( node_type or cluster changes )
// do nothing if num_cores is blank or there's no data for node_type_input // Clamp value between min and max