');
$breadcrumb[] = l('Administration', 'admin');
$breadcrumb[] = l('Tripal', 'admin/tripal');
$breadcrumb[] = l('Chado Data Loaders', 'admin/tripal/loaders');
$breadcrumb[] = l('Bulk Loader', 'admin/tripal/loaders/bulk');
drupal_set_breadcrumb($breadcrumb);
// Add the view
$jobs_view = views_embed_view('tripal_bulk_loading_jobs','default');
$template_view = views_embed_view('tripal_bulk_loader_templates','default');
if (isset($jobs_view) && isset($template_view)) {
$output .= $jobs_view;
}
else {
$output .= '
The Tripal Bulk Loader uses primarily views to provide an '
. 'administrative interface. Currently one or more views needed for this '
. 'administrative interface are disabled. Click each of the following links to '
. 'enable the pertinent views:
';
$output .= ''),
'row' => t('Only Rollback the last line of the input file.'
.'
This option may allow you to restart the job after
fixing the error (manual intervention needed).
'),
'none' => t('Do not use transactions
This is not recommended.
')
),
'#default_value' => variable_get('tripal_bulk_loader_transactions', 'row')
);
$form['speed']['lock'] = array(
'#type' => 'radios',
'#title' => t('Lock Type'),
'#description' => t('The type of lock used by the bulk loading jobs. The lock is '
.'acquired at the beginning of the job and kept till the end. A lock of the type '
.'selected will be acquired for every table being inserted into.'),
'#options' => array(
'ROW EXCLUSIVE' => t('ROW EXCLUSIVE: The default lock type for insert queries.'),
'EXCLUSIVE' => t('EXCLUSIVE: Only Select Queries can access the table.'),
'ACCESS EXCLUSIVE' => t('ACCESS EXCLUSIVE: No other queries can access the table.'),
),
'#default_value' => variable_get('tripal_bulk_loader_lock', 'ROW EXCLUSIVE'),
);
$form['submit1'] = array(
'#type' => 'submit',
'#value' => t('Save')
);
return $form;
}
/**
* A Configuration form for this module (Submit)
*
* @ingroup tripal_bulk_loader
*/
function tripal_bulk_loader_configuration_form_submit($form, $form_state) {
variable_set('tripal_bulk_loader_prepare', $form_state['values']['prepare']);
variable_set('tripal_bulk_loader_disable_triggers', $form_state['values']['disable_triggers']);
variable_set('tripal_bulk_loader_skip_validation', $form_state['values']['no_validate']);
variable_set('tripal_bulk_loader_transactions', $form_state['values']['transactions']);
variable_set('tripal_bulk_loader_lock', $form_state['values']['lock']);
variable_set('tripal_bulk_loader_keep_track_inserted', $form_state['values']['keep_track_inserted']);
}