Issue #3185229: CSV exporters for generic Asset and Log Views

This commit is contained in:
Michael Stenta 2020-11-27 11:00:34 -05:00
parent f874227444
commit c837e626b1
4 changed files with 163 additions and 0 deletions

View File

@ -19,6 +19,7 @@
"cweagans/composer-patches": "^1.6",
"drupal/core": "^9.0.0",
"drupal/config_rewrite": "^1.3",
"drupal/csv_serialization": "^2.0@beta",
"drupal/date_popup": "^1.1",
"drupal/entity_reference_validators": "^1.0@alpha",
"drupal/geofield": "^1.15",

View File

@ -8,8 +8,11 @@ dependencies:
- farm_ui_views
module:
- asset
- csv_serialization
- image
- options
- rest
- serialization
- user
id: farm_asset
label: 'Farm Assets'
@ -691,6 +694,17 @@ display:
empty: false
content: 'Displaying @start - @end of @total'
plugin_id: result
display_link:
id: display_link
table: views
field: display_link
relationship: none
group_type: group
admin_label: ''
empty: false
display_id: csv
label: 'Export CSV'
plugin_id: display_link
empty:
area_text_custom:
id: area_text_custom
@ -720,6 +734,61 @@ display:
- url.query_args
- user.permissions
tags: { }
csv:
display_plugin: rest_export
id: csv
display_title: 'CSV export (rest)'
position: 2
display_options:
display_extenders: { }
style:
type: serializer
options:
uses_fields: false
formats:
csv: csv
path: assets.csv
auth:
- cookie
pager:
type: none
options:
offset: 0
display_description: ''
row:
type: data_field
options:
field_options:
asset_bulk_form:
alias: ''
raw_output: false
image_target_id:
alias: ''
raw_output: false
id:
alias: ''
raw_output: false
name:
alias: ''
raw_output: false
type:
alias: ''
raw_output: false
flag_value:
alias: ''
raw_output: false
status:
alias: ''
raw_output: false
cache_metadata:
max-age: 0
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- request_format
- url
- user.permissions
tags: { }
page:
display_plugin: page
id: page

View File

@ -5,8 +5,11 @@ dependencies:
module:
- farm_ui_views
module:
- csv_serialization
- log
- options
- rest
- serialization
- user
id: farm_log
label: 'Farm Logs'
@ -1875,6 +1878,70 @@ display:
- url.query_args
- user.permissions
tags: { }
csv:
display_plugin: rest_export
id: csv
display_title: 'CSV export (rest)'
position: 7
display_options:
display_extenders: { }
path: logs.csv
style:
type: serializer
options:
uses_fields: false
formats:
csv: csv
auth:
- cookie
row:
type: data_field
options:
field_options:
log_bulk_form:
alias: ''
raw_output: false
status:
alias: ''
raw_output: false
id:
alias: ''
raw_output: false
timestamp:
alias: ''
raw_output: false
name:
alias: ''
raw_output: false
type:
alias: ''
raw_output: false
asset_target_id:
alias: ''
raw_output: false
flag_value:
alias: ''
raw_output: false
category_target_id:
alias: ''
raw_output: false
owner_target_id:
alias: ''
raw_output: false
pager:
type: none
options:
offset: 0
display_description: ''
cache_metadata:
max-age: 0
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- request_format
- url
- user.permissions
tags: { }
page_1:
display_plugin: page
id: page_1
@ -1884,6 +1951,30 @@ display:
display_extenders: { }
path: logs
display_description: ''
footer:
result:
id: result
table: views
field: result
relationship: none
group_type: group
admin_label: ''
empty: false
content: 'Displaying @start - @end of @total'
plugin_id: result
display_link:
id: display_link
table: views
field: display_link
relationship: none
group_type: group
admin_label: ''
empty: false
display_id: csv
label: 'Export CSV'
plugin_id: display_link
defaults:
footer: false
cache_metadata:
max-age: 0
contexts:

View File

@ -4,6 +4,8 @@ type: module
package: farmOS UI
core_version_requirement: ^9
dependencies:
- csv_serialization:csv_serialization
- date_popup:date_popup
- drupal:rest
- farm:asset
- log:log