Issue #2950499: CSV export of sensor data
This commit is contained in:
parent
d21eb49a61
commit
2ca0485624
|
@ -7,6 +7,7 @@ dependencies[] = farm_sensor
|
|||
dependencies[] = features
|
||||
dependencies[] = fraction
|
||||
dependencies[] = views
|
||||
dependencies[] = views_data_export
|
||||
features[ctools][] = views:views_default:3.0
|
||||
features[features_api][] = api:2
|
||||
features[views_view][] = farm_sensor_data
|
||||
|
|
|
@ -154,7 +154,31 @@ function farm_sensor_listener_views_default_views() {
|
|||
t('Sensor value'),
|
||||
t('Value'),
|
||||
t('All'),
|
||||
|
||||
/* Display: Page */
|
||||
$handler = $view->new_display('page', 'Page', 'page');
|
||||
$handler->display->display_options['path'] = 'farm/assets/sensors/%/data';
|
||||
|
||||
/* Display: Data export */
|
||||
$handler = $view->new_display('views_data_export', 'Data export', 'views_data_export');
|
||||
$handler->display->display_options['pager']['type'] = 'some';
|
||||
$handler->display->display_options['style_plugin'] = 'views_data_export_csv';
|
||||
$handler->display->display_options['style_options']['provide_file'] = 1;
|
||||
$handler->display->display_options['style_options']['filename'] = '%view-%exposed-%timestamp-full.csv';
|
||||
$handler->display->display_options['style_options']['parent_sort'] = 1;
|
||||
$handler->display->display_options['style_options']['quote'] = 1;
|
||||
$handler->display->display_options['style_options']['trim'] = 1;
|
||||
$handler->display->display_options['style_options']['replace_newlines'] = 0;
|
||||
$handler->display->display_options['style_options']['newline_token'] = '1';
|
||||
$handler->display->display_options['style_options']['header'] = 1;
|
||||
$handler->display->display_options['style_options']['keep_html'] = 0;
|
||||
$handler->display->display_options['path'] = 'farm/assets/sensors/%/data/csv';
|
||||
$handler->display->display_options['displays'] = array(
|
||||
'default' => 'default',
|
||||
'page' => 'page',
|
||||
);
|
||||
$handler->display->display_options['use_batch'] = 'batch';
|
||||
$handler->display->display_options['segment_size'] = '500';
|
||||
$export['farm_sensor_data'] = $view;
|
||||
|
||||
return $export;
|
||||
|
|
Loading…
Reference in New Issue