hyrax 3.2.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.circleci/config.yml +3 -6
- data/.dassie/.env +1 -2
- data/.dassie/Gemfile +7 -3
- data/.dassie/app/models/user.rb +0 -2
- data/.dassie/config/analytics.yml +12 -5
- data/.dassie/config/environments/development.rb +2 -0
- data/.dassie/config/initializers/hyrax.rb +2 -0
- data/.dassie/db/migrate/20210921150120_enable_uuid_extension.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20210921150121_create_orm_resources.valkyrie_engine.rb +19 -0
- data/.dassie/db/migrate/20210921150122_add_model_type_to_orm_resources.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20210921150123_change_model_type_to_internal_model.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20210921150124_create_path_gin_index.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20210921150125_create_internal_resource_index.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20210921150126_create_updated_at_index.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20210921150127_add_optimistic_locking_to_orm_resources.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20211130181150_create_default_administrative_set.rb +8 -0
- data/.dassie/db/schema.rb +20 -1
- data/.env +7 -4
- data/.github/workflows/main.yml +17 -0
- data/.github/workflows/release.yml +17 -0
- data/.gitignore +1 -0
- data/.regen +1 -1
- data/CONTAINERS.md +13 -10
- data/README.md +37 -0
- data/app/assets/javascripts/hyrax/admin/graphs.es6 +34 -37
- data/app/assets/javascripts/hyrax/analytics_events.js +69 -0
- data/app/assets/javascripts/hyrax/collapse.js +24 -0
- data/app/assets/javascripts/hyrax/collections.js +1 -2
- data/app/assets/javascripts/hyrax/ga_events.js +2 -8
- data/app/assets/javascripts/hyrax/reports-buttons.js +33 -0
- data/app/assets/javascripts/hyrax.js +2 -1
- data/app/assets/stylesheets/_bootstrap-default-overrides.scss +9 -0
- data/app/authorities/qa/authorities/collections.rb +4 -5
- data/app/authorities/qa/authorities/find_works.rb +1 -1
- data/app/controllers/concerns/hyrax/breadcrumbs_for_collection_analytics.rb +26 -0
- data/app/controllers/concerns/hyrax/breadcrumbs_for_works_analytics.rb +26 -0
- data/app/controllers/concerns/hyrax/controller.rb +22 -0
- data/app/controllers/hyrax/admin/analytics/analytics_controller.rb +40 -0
- data/app/controllers/hyrax/admin/analytics/collection_reports_controller.rb +61 -0
- data/app/controllers/hyrax/admin/analytics/work_reports_controller.rb +122 -0
- data/app/controllers/hyrax/collections_controller.rb +4 -1
- data/app/controllers/hyrax/dashboard/collections_controller.rb +15 -6
- data/app/controllers/hyrax/dashboard_controller.rb +8 -0
- data/app/controllers/hyrax/stats_controller.rb +3 -1
- data/app/forms/hyrax/forms/pcdm_collection_form.rb +3 -0
- data/app/indexers/hyrax/valkyrie_file_set_indexer.rb +1 -1
- data/app/jobs/characterize_job.rb +28 -1
- data/app/jobs/valkyrie_ingest_job.rb +56 -0
- data/app/models/concerns/hyrax/ability.rb +26 -5
- data/app/models/concerns/hyrax/solr_document/metadata.rb +1 -0
- data/app/models/file_download_stat.rb +4 -4
- data/app/models/hyrax/default_administrative_set.rb +42 -0
- data/app/models/hyrax/statistic.rb +31 -4
- data/app/presenters/hyrax/admin/dashboard_presenter.rb +8 -6
- data/app/presenters/hyrax/admin/repository_growth_presenter.rb +10 -5
- data/app/presenters/hyrax/admin/user_activity_presenter.rb +8 -12
- data/app/presenters/hyrax/file_set_presenter.rb +2 -0
- data/app/presenters/hyrax/menu_presenter.rb +4 -0
- data/app/presenters/hyrax/pcdm_member_presenter_factory.rb +1 -1
- data/app/presenters/hyrax/work_show_presenter.rb +5 -2
- data/app/presenters/hyrax/work_usage.rb +1 -0
- data/app/search_builders/hyrax/README.md +1 -1
- data/app/search_builders/hyrax/dashboard/collections_search_builder.rb +1 -1
- data/app/search_builders/hyrax/my/collections_search_builder.rb +1 -1
- data/app/services/hyrax/admin_set_create_service.rb +76 -14
- data/app/services/hyrax/analytics/google/events.rb +37 -0
- data/app/services/hyrax/analytics/google/events_daily.rb +72 -0
- data/app/services/hyrax/analytics/google/visits.rb +44 -0
- data/app/services/hyrax/analytics/google/visits_daily.rb +49 -0
- data/app/services/hyrax/analytics/google.rb +204 -0
- data/app/services/hyrax/analytics/matomo.rb +193 -0
- data/app/services/hyrax/analytics/results.rb +79 -0
- data/app/services/hyrax/analytics.rb +12 -82
- data/app/services/hyrax/characterization/valkyrie_characterization_service.rb +134 -0
- data/app/services/hyrax/collections/nested_collection_query_service.rb +8 -3
- data/app/services/hyrax/listeners/acl_index_listener.rb +3 -1
- data/app/services/hyrax/listeners/active_fedora_acl_index_listener.rb +3 -1
- data/app/services/hyrax/listeners/batch_notification_listener.rb +3 -1
- data/app/services/hyrax/listeners/file_metadata_listener.rb +19 -0
- data/app/services/hyrax/listeners/file_set_lifecycle_listener.rb +6 -2
- data/app/services/hyrax/listeners/file_set_lifecycle_notification_listener.rb +6 -2
- data/app/services/hyrax/listeners/member_cleanup_listener.rb +3 -0
- data/app/services/hyrax/listeners/metadata_index_listener.rb +9 -3
- data/app/services/hyrax/listeners/object_lifecycle_listener.rb +9 -3
- data/app/services/hyrax/listeners/proxy_deposit_listener.rb +3 -1
- data/app/services/hyrax/listeners/trophy_cleanup_listener.rb +3 -0
- data/app/services/hyrax/listeners/workflow_listener.rb +3 -1
- data/app/services/hyrax/listeners.rb +8 -0
- data/app/services/hyrax/restriction_service.rb +4 -0
- data/app/services/hyrax/statistics/users/over_time.rb +8 -5
- data/app/services/hyrax/statistics/works/over_time.rb +10 -0
- data/app/services/hyrax/work_uploads_handler.rb +4 -1
- data/app/views/hyrax/admin/analytics/_date_range_form.html.erb +11 -0
- data/app/views/hyrax/admin/analytics/collection_reports/_custom_range.html.erb +39 -0
- data/app/views/hyrax/admin/analytics/collection_reports/_monthly_summary.html.erb +48 -0
- data/app/views/hyrax/admin/analytics/collection_reports/_summary.html.erb +55 -0
- data/app/views/hyrax/admin/analytics/collection_reports/_top_collections.html.erb +55 -0
- data/app/views/hyrax/admin/analytics/collection_reports/index.html.erb +70 -0
- data/app/views/hyrax/admin/analytics/collection_reports/show.html.erb +94 -0
- data/app/views/hyrax/admin/analytics/work_reports/_custom_range.html.erb +43 -0
- data/app/views/hyrax/admin/analytics/work_reports/_monthly_summary.html.erb +35 -0
- data/app/views/hyrax/admin/analytics/work_reports/_summary.html.erb +60 -0
- data/app/views/hyrax/admin/analytics/work_reports/_top_file_set_downloads.html.erb +33 -0
- data/app/views/hyrax/admin/analytics/work_reports/_top_works.html.erb +40 -0
- data/app/views/hyrax/admin/analytics/work_reports/_work_counts.html.erb +18 -0
- data/app/views/hyrax/admin/analytics/work_reports/_work_files.html.erb +41 -0
- data/app/views/hyrax/admin/analytics/work_reports/index.html.erb +77 -0
- data/app/views/hyrax/admin/analytics/work_reports/show.html.erb +90 -0
- data/app/views/hyrax/admin/stats/show.html.erb +1 -1
- data/app/views/hyrax/base/_relationships_parent_row.html.erb +0 -1
- data/app/views/hyrax/base/show.html.erb +6 -0
- data/app/views/hyrax/collections/show.html.erb +4 -0
- data/app/views/hyrax/dashboard/_repository_growth.html.erb +5 -5
- data/app/views/hyrax/dashboard/_resource_type_graph.html.erb +41 -0
- data/app/views/hyrax/dashboard/_sidebar.html.erb +4 -1
- data/app/views/hyrax/dashboard/_tabs.html.erb +11 -0
- data/app/views/hyrax/dashboard/_user_activity.html.erb +17 -23
- data/app/views/hyrax/dashboard/_user_activity_graph.html.erb +55 -0
- data/app/views/hyrax/dashboard/_visibility_graph.html.erb +31 -0
- data/app/views/hyrax/dashboard/_work_type_graph.html.erb +41 -0
- data/app/views/hyrax/dashboard/collections/_form.html.erb +2 -1
- data/app/views/hyrax/dashboard/show_admin.html.erb +24 -45
- data/app/views/hyrax/dashboard/sidebar/_activity.html.erb +22 -0
- data/app/views/hyrax/file_sets/_actions.html.erb +4 -3
- data/app/views/hyrax/file_sets/show.html.erb +6 -0
- data/app/views/hyrax/my/collections/index.html.erb +1 -1
- data/app/views/hyrax/stats/_downloads.html.erb +18 -0
- data/app/views/hyrax/stats/_pageviews.html.erb +18 -0
- data/app/views/hyrax/stats/work.html.erb +17 -9
- data/app/views/layouts/_head_tag_content.html.erb +7 -2
- data/app/views/{_ga.html.erb → shared/_ga.html.erb} +3 -7
- data/app/views/shared/_matomo.html.erb +15 -0
- data/chart/hyrax/Chart.yaml +1 -1
- data/chart/hyrax/values.yaml +1 -1
- data/config/i18n-tasks.yml +2 -2
- data/config/initializers/listeners.rb +5 -5
- data/config/locales/hyrax.de.yml +194 -0
- data/config/locales/hyrax.en.yml +190 -12
- data/config/locales/hyrax.es.yml +194 -0
- data/config/locales/hyrax.fr.yml +194 -0
- data/config/locales/hyrax.it.yml +194 -0
- data/config/locales/hyrax.pt-BR.yml +194 -0
- data/config/locales/hyrax.zh.yml +194 -0
- data/config/routes.rb +4 -0
- data/docker-compose.yml +3 -1
- data/documentation/developing-your-hyrax-based-app.md +2 -2
- data/documentation/legacyREADME.md +1 -1
- data/hyrax.gemspec +3 -1
- data/lib/generators/hyrax/templates/config/analytics.yml +13 -7
- data/lib/generators/hyrax/templates/config/initializers/hyrax.rb +0 -13
- data/lib/generators/hyrax/templates/db/migrate/20211130181150_create_default_administrative_set.rb.erb +8 -0
- data/lib/generators/hyrax/work/templates/feature_spec.rb.erb +3 -1
- data/lib/hyrax/configuration.rb +67 -5
- data/lib/hyrax/engine.rb +7 -6
- data/lib/hyrax/publisher.rb +4 -0
- data/lib/hyrax/transactions/admin_set_create.rb +22 -0
- data/lib/hyrax/transactions/container.rb +11 -0
- data/lib/hyrax/version.rb +1 -1
- data/lib/tasks/regenerate_derivatives.rake +1 -1
- data/lib/wings/setup.rb +15 -0
- data/lib/wings/valkyrie/persister.rb +16 -0
- data/template.rb +1 -1
- data/vendor/assets/javascripts/morris/morris.min.js +1 -7
- data/vendor/assets/stylesheets/morris.js/0.5.1/morris.css +1 -1
- metadata +87 -11
- data/app/views/hyrax/dashboard/_repository_objects.html.erb +0 -28
data/config/locales/hyrax.zh.yml
CHANGED
|
@@ -31,6 +31,9 @@ zh:
|
|
|
31
31
|
filters:
|
|
32
32
|
title: '筛选:'
|
|
33
33
|
start_over: 清除筛选
|
|
34
|
+
download:
|
|
35
|
+
one: 和 1 个下载
|
|
36
|
+
other: 和 %{count} 下载
|
|
34
37
|
errors:
|
|
35
38
|
messages:
|
|
36
39
|
carrierwave_download_error: 图片不能下载。
|
|
@@ -178,6 +181,141 @@ zh:
|
|
|
178
181
|
item_list_header: 集内作品
|
|
179
182
|
show_actions:
|
|
180
183
|
confirm_delete: 您确定要删除此管理集?此操作无法撤消。
|
|
184
|
+
analytics:
|
|
185
|
+
collection_reports:
|
|
186
|
+
custom_range:
|
|
187
|
+
collection_home_page_views: 馆藏主页浏览量
|
|
188
|
+
date_range_heading: 自定义日期范围
|
|
189
|
+
summary_heading: 用户活动摘要
|
|
190
|
+
work_downloads: 作品下载
|
|
191
|
+
work_views: 作品观
|
|
192
|
+
index:
|
|
193
|
+
activity: 活动
|
|
194
|
+
and: 和
|
|
195
|
+
custom_range: 自定义范围
|
|
196
|
+
date_range_heading: 自定义报告
|
|
197
|
+
downloads: 下载
|
|
198
|
+
enable_analytics: 启用分析以查看报告
|
|
199
|
+
export: 出口
|
|
200
|
+
monthly: 每月
|
|
201
|
+
repo_summary: 存储库包含
|
|
202
|
+
repo_summary_2: 共同拥有
|
|
203
|
+
report_generated_on: 此报告生成于
|
|
204
|
+
report_header: 自定义集合报告
|
|
205
|
+
summary: 概括
|
|
206
|
+
title: 收藏报告
|
|
207
|
+
views: 页面浏览量
|
|
208
|
+
monthly_summary:
|
|
209
|
+
collection_views: 馆藏主页浏览量
|
|
210
|
+
monthly_subtitle: 过去 12 个月的逐月状态
|
|
211
|
+
work_downloads: 作品下载
|
|
212
|
+
work_views: 作品观
|
|
213
|
+
show:
|
|
214
|
+
collection_type: 收藏类型
|
|
215
|
+
created_by: 由...制作
|
|
216
|
+
custom_range: 自定义范围
|
|
217
|
+
last_updated: 最后更新于
|
|
218
|
+
monthly: 每月
|
|
219
|
+
return_to_btn: 返回收藏报告
|
|
220
|
+
summary: 概括
|
|
221
|
+
title: 收款报告
|
|
222
|
+
view_collection_btn: 查看收藏
|
|
223
|
+
visibility: 能见度
|
|
224
|
+
summary:
|
|
225
|
+
all_time: 整天
|
|
226
|
+
collection_home_page_views: 馆藏主页浏览量
|
|
227
|
+
date_range: 日期范围
|
|
228
|
+
subtitle: 用户活动摘要
|
|
229
|
+
this_month: 这个月
|
|
230
|
+
this_week: 本星期
|
|
231
|
+
this_year: 今年
|
|
232
|
+
today: 今天
|
|
233
|
+
work_downloads: 作品下载
|
|
234
|
+
work_views: 作品观
|
|
235
|
+
top_collections:
|
|
236
|
+
collection_page_views: 收藏页面浏览量
|
|
237
|
+
collection_title: 馆藏名称
|
|
238
|
+
deleted: 集合已删除
|
|
239
|
+
export: 出口
|
|
240
|
+
file_downloads_in_collection: 此集合中的文件集下载
|
|
241
|
+
top_collections: 热门收藏
|
|
242
|
+
works_in_collection_views: 在此集合视图中的作品
|
|
243
|
+
date_range_form:
|
|
244
|
+
date_range_heading: 自定义日期范围
|
|
245
|
+
end_date: 结束日期
|
|
246
|
+
reset_date_range: 重置日期范围
|
|
247
|
+
set_date_range: 设置报告日期范围
|
|
248
|
+
start_date: 开始日期
|
|
249
|
+
work_reports:
|
|
250
|
+
custom_range:
|
|
251
|
+
date_range_heading: 自定义日期范围
|
|
252
|
+
file_downloads: 文件下载
|
|
253
|
+
page_views: 页面浏览量
|
|
254
|
+
summary_heading: 用户活动摘要
|
|
255
|
+
unique_visitors: 独立访客
|
|
256
|
+
index:
|
|
257
|
+
access_to: 您可以访问
|
|
258
|
+
activity: 活动
|
|
259
|
+
and: 和
|
|
260
|
+
custom_range: 自定义范围
|
|
261
|
+
date_range_heading: 自定义报告
|
|
262
|
+
downloads: 下载
|
|
263
|
+
enable_analytics: 启用分析以查看报告
|
|
264
|
+
export: 出口
|
|
265
|
+
monthly: 每月
|
|
266
|
+
repo_summary: 在这个存储库中,它们共同拥有
|
|
267
|
+
report_generated_on: 此报告生成于
|
|
268
|
+
report_header: 定制作品报告
|
|
269
|
+
subtitle: 用户活动摘要
|
|
270
|
+
summary: 概括
|
|
271
|
+
title: 作品报告
|
|
272
|
+
views: 意见
|
|
273
|
+
works: 作品
|
|
274
|
+
monthly_summary:
|
|
275
|
+
file_downloads: 文件下载
|
|
276
|
+
monthly_subtitle: 过去 12 个月的逐月状态
|
|
277
|
+
page_views: 页面浏览量
|
|
278
|
+
show:
|
|
279
|
+
custom_range: 自定义范围
|
|
280
|
+
deposited_by: 存款人
|
|
281
|
+
monthly: 每月
|
|
282
|
+
resource_type: 资源类型
|
|
283
|
+
return_to_btn: 复工报告
|
|
284
|
+
status: 地位
|
|
285
|
+
summary: 概括
|
|
286
|
+
title: 工作报告
|
|
287
|
+
view_work_btn: 查看工作
|
|
288
|
+
visibility: 能见度
|
|
289
|
+
work_type: 工作类型
|
|
290
|
+
summary:
|
|
291
|
+
all_time: 整天
|
|
292
|
+
date_range: 日期范围
|
|
293
|
+
file_downloads: 文件下载
|
|
294
|
+
page_views: 页面浏览量
|
|
295
|
+
subtitle: 用户活动摘要
|
|
296
|
+
this_month: 这个月
|
|
297
|
+
this_week: 本星期
|
|
298
|
+
this_year: 今年
|
|
299
|
+
today: 今天
|
|
300
|
+
unique_visitors: 独立访客
|
|
301
|
+
top_file_set_downloads:
|
|
302
|
+
file: 文件
|
|
303
|
+
file_downloads: 文件下载
|
|
304
|
+
file_name: 文档名称
|
|
305
|
+
top_downloads: 热门文件下载
|
|
306
|
+
top_works:
|
|
307
|
+
export: 出口
|
|
308
|
+
file_downloads: 文件下载
|
|
309
|
+
top_works: 热门作品
|
|
310
|
+
work_title: 作品名称
|
|
311
|
+
work_views: 工作页面浏览量
|
|
312
|
+
work_counts:
|
|
313
|
+
child_works: 儿童作品
|
|
314
|
+
files: 档案
|
|
315
|
+
total_size: 总尺寸
|
|
316
|
+
work_files:
|
|
317
|
+
title: 文件
|
|
318
|
+
total_downloads: 总下载量
|
|
181
319
|
appearances:
|
|
182
320
|
show:
|
|
183
321
|
header: 表面
|
|
@@ -263,11 +401,14 @@ zh:
|
|
|
263
401
|
header: 特征
|
|
264
402
|
sidebar:
|
|
265
403
|
activity: 活动
|
|
404
|
+
analytics: 分析
|
|
266
405
|
appearance: 表面
|
|
267
406
|
collection_types: 集合类型
|
|
268
407
|
collections: 收藏
|
|
408
|
+
collections_report: 收藏报告
|
|
269
409
|
configuration: 配置
|
|
270
410
|
content_blocks: 内容块
|
|
411
|
+
dashboard: 仪表盘
|
|
271
412
|
delete_all: 删除所有
|
|
272
413
|
notifications: 通知
|
|
273
414
|
pages: 网页
|
|
@@ -284,6 +425,7 @@ zh:
|
|
|
284
425
|
workflow_roles: 工作流程角色
|
|
285
426
|
works: 作品
|
|
286
427
|
works_listing: 作品清单
|
|
428
|
+
works_report: 作品报告
|
|
287
429
|
stats:
|
|
288
430
|
deposited_form:
|
|
289
431
|
end_label: 结束 [默认到此刻]
|
|
@@ -296,6 +438,10 @@ zh:
|
|
|
296
438
|
unpublished: 非出版品
|
|
297
439
|
user_deposits:
|
|
298
440
|
end_label: 结束 [默认到此刻]
|
|
441
|
+
headers:
|
|
442
|
+
main: 工作统计
|
|
443
|
+
total: 总作品:
|
|
444
|
+
visibility: 可见性总计
|
|
299
445
|
heading: 展示用户存储的文件
|
|
300
446
|
start_label: 开始
|
|
301
447
|
works:
|
|
@@ -690,13 +836,17 @@ zh:
|
|
|
690
836
|
authorize_proxies: 授权代理
|
|
691
837
|
breadcrumbs:
|
|
692
838
|
admin: 管理
|
|
839
|
+
collections_report: 收藏报告
|
|
840
|
+
works_report: 作品报告
|
|
693
841
|
collection_type_actions:
|
|
694
842
|
close: 关
|
|
695
843
|
create_collection: 创建集合
|
|
696
844
|
select_type_of_collection: 选择收集类型
|
|
697
845
|
collections:
|
|
846
|
+
collection_title: 藏品名称
|
|
698
847
|
edit:
|
|
699
848
|
header: 编辑收藏集:%{title}
|
|
849
|
+
files: 文件
|
|
700
850
|
form:
|
|
701
851
|
permission_update_errors:
|
|
702
852
|
error: 无效的权限模板更新选项。
|
|
@@ -787,8 +937,10 @@ zh:
|
|
|
787
937
|
remove: 去掉
|
|
788
938
|
title: 观众
|
|
789
939
|
type: 类型
|
|
940
|
+
last_updated: 最近更新时间
|
|
790
941
|
new:
|
|
791
942
|
header: 创建新收藏集
|
|
943
|
+
recent_activity: 近期活动
|
|
792
944
|
show:
|
|
793
945
|
header: 采集
|
|
794
946
|
item_count: 作品
|
|
@@ -817,6 +969,7 @@ zh:
|
|
|
817
969
|
sort_and_per_page:
|
|
818
970
|
show_par_page_html: 显示%{select}每页
|
|
819
971
|
sort_by: 排序:
|
|
972
|
+
title: 收藏
|
|
820
973
|
work_action_menu:
|
|
821
974
|
delete_work: 删除工作
|
|
822
975
|
deleting_from_work: 从%{application_name}删除作品是永久性的。单击“确定”从%{application_name}中删除此工作,或单击“取消”取消此操作
|
|
@@ -825,6 +978,7 @@ zh:
|
|
|
825
978
|
remove_from_collection: 从收藏中删除
|
|
826
979
|
select_an_action: 选择一个动作
|
|
827
980
|
transfer_ownership_of_work: 转移工作所有权
|
|
981
|
+
works: 作品
|
|
828
982
|
create_work: 创建作品
|
|
829
983
|
current_proxies: 目前代理
|
|
830
984
|
delete_notification: 删除通知
|
|
@@ -884,6 +1038,7 @@ zh:
|
|
|
884
1038
|
view: 视图
|
|
885
1039
|
users: '用户:'
|
|
886
1040
|
collections: 你的收藏集
|
|
1041
|
+
collections_report: 收藏报告
|
|
887
1042
|
facet_label:
|
|
888
1043
|
collections: '筛选您的收藏集:'
|
|
889
1044
|
highlighted: '筛选您的收藏精品:'
|
|
@@ -919,6 +1074,7 @@ zh:
|
|
|
919
1074
|
show_label: 展示所有细节
|
|
920
1075
|
thumbnail: 缩图
|
|
921
1076
|
works: 您的作品
|
|
1077
|
+
works_report: 作品报告
|
|
922
1078
|
your_collections: 你的收藏
|
|
923
1079
|
your_works: 你的作品
|
|
924
1080
|
nest_collections_form:
|
|
@@ -952,12 +1108,18 @@ zh:
|
|
|
952
1108
|
objects: 对象
|
|
953
1109
|
subtitle: 过去90天
|
|
954
1110
|
title: 存储库增长
|
|
1111
|
+
works: 作品
|
|
955
1112
|
repository_objects:
|
|
956
1113
|
status: 当前状态
|
|
957
1114
|
subtitle: 当前状态
|
|
958
1115
|
title: 存储库对象
|
|
1116
|
+
resource_type_graph:
|
|
1117
|
+
count: 数数
|
|
1118
|
+
resource_type: 资源类型
|
|
1119
|
+
title: 资源类型
|
|
959
1120
|
show_admin:
|
|
960
1121
|
current_registered_users: 电流
|
|
1122
|
+
graph_reports: 自定义图表报告
|
|
961
1123
|
new_visitors: 新访问者
|
|
962
1124
|
past_30_days: 过去30天
|
|
963
1125
|
registered_users: 注册用户
|
|
@@ -971,6 +1133,8 @@ zh:
|
|
|
971
1133
|
heading: 您的【下载?】统计
|
|
972
1134
|
joined_on: 加入上
|
|
973
1135
|
works: 已建立的作品
|
|
1136
|
+
tabs:
|
|
1137
|
+
admin_sets: 管理集
|
|
974
1138
|
title: 我的控件板
|
|
975
1139
|
transfer_of_ownership: 转让所有权
|
|
976
1140
|
transfer_works_link: 选择作品转让
|
|
@@ -979,10 +1143,27 @@ zh:
|
|
|
979
1143
|
user_activity:
|
|
980
1144
|
date: 日期
|
|
981
1145
|
new_users: 新用户
|
|
1146
|
+
new_visitors: 新访客
|
|
1147
|
+
registered_users: 注册用户
|
|
1148
|
+
returning_visitors: 回访者
|
|
982
1149
|
subtitle: 新用户注册
|
|
983
1150
|
title: 用户活动
|
|
1151
|
+
total_visitors: 访客总数
|
|
1152
|
+
user_summary: 用户摘要
|
|
1153
|
+
user_activity_graph:
|
|
1154
|
+
date: 日期
|
|
1155
|
+
new_users: 新用户
|
|
1156
|
+
new_visits: 新访问
|
|
1157
|
+
return_visits: 回访
|
|
1158
|
+
total_visits: 总访问量
|
|
984
1159
|
user_notifications: 用户通知
|
|
985
1160
|
view_files: 阅览文件
|
|
1161
|
+
visibility_graph:
|
|
1162
|
+
visibility: 能见度
|
|
1163
|
+
work_type_graph:
|
|
1164
|
+
count: 数数
|
|
1165
|
+
title: 工作类型
|
|
1166
|
+
work_type: 工作类型
|
|
986
1167
|
document_language: zh
|
|
987
1168
|
edit_profile: 编辑个人资料
|
|
988
1169
|
embargoes:
|
|
@@ -1363,6 +1544,16 @@ zh:
|
|
|
1363
1544
|
contact_form: 联系表
|
|
1364
1545
|
export_to_zotero: 导出到Zotero
|
|
1365
1546
|
export_to_zotero_details: 通过嵌入式元数据支持导出到Zotero。如果Zotero没有自动获取存放文件的元数据,请通过以下方式报告问题
|
|
1547
|
+
stats:
|
|
1548
|
+
downloads:
|
|
1549
|
+
downloads: 下载
|
|
1550
|
+
pageviews:
|
|
1551
|
+
pageviews: 页面浏览量
|
|
1552
|
+
work:
|
|
1553
|
+
and: 和
|
|
1554
|
+
downloads: 下载
|
|
1555
|
+
header: 工作分析
|
|
1556
|
+
pageviews: 浏览量
|
|
1366
1557
|
toolbar:
|
|
1367
1558
|
dashboard:
|
|
1368
1559
|
menu: 控件板
|
|
@@ -1641,3 +1832,6 @@ zh:
|
|
|
1641
1832
|
member_of_collection_ids: 选择一个集合...
|
|
1642
1833
|
required:
|
|
1643
1834
|
html: <span class="label label-info required-tag">需要的</span>
|
|
1835
|
+
total_view:
|
|
1836
|
+
one: 该作品共有 1 次浏览
|
|
1837
|
+
other: 此作品总浏览量为 %{count}
|
data/config/routes.rb
CHANGED
|
@@ -224,6 +224,10 @@ Hyrax::Engine.routes.draw do
|
|
|
224
224
|
end
|
|
225
225
|
|
|
226
226
|
namespace :admin do
|
|
227
|
+
namespace :analytics do
|
|
228
|
+
resources :collection_reports, only: [:index, :show]
|
|
229
|
+
resources :work_reports, only: [:index, :show]
|
|
230
|
+
end
|
|
227
231
|
resources :admin_sets do
|
|
228
232
|
member do
|
|
229
233
|
get :files
|
data/docker-compose.yml
CHANGED
|
@@ -8,6 +8,7 @@ services:
|
|
|
8
8
|
args:
|
|
9
9
|
- EXTRA_APK_PACKAGES=git less
|
|
10
10
|
image: ghcr.io/samvera/dassie
|
|
11
|
+
command: sh -l -c 'bundle && bundle exec puma -v -b tcp://0.0.0.0:3000'
|
|
11
12
|
stdin_open: true
|
|
12
13
|
tty: true
|
|
13
14
|
user: root
|
|
@@ -109,6 +110,7 @@ services:
|
|
|
109
110
|
context: .
|
|
110
111
|
target: hyrax-engine-dev-worker
|
|
111
112
|
image: ghcr.io/samvera/dassie-worker
|
|
113
|
+
command: sh -l -c 'bundle && bundle exec sidekiq'
|
|
112
114
|
user: root
|
|
113
115
|
env_file:
|
|
114
116
|
- .env
|
|
@@ -131,7 +133,7 @@ services:
|
|
|
131
133
|
- hyrax
|
|
132
134
|
|
|
133
135
|
solr:
|
|
134
|
-
image: solr:8.
|
|
136
|
+
image: solr:8.11.1
|
|
135
137
|
ports:
|
|
136
138
|
- 8983:8983
|
|
137
139
|
command:
|
|
@@ -43,7 +43,7 @@ Prerequisites are required for both creating a Hyrax\-based app and contributing
|
|
|
43
43
|
|
|
44
44
|
Hyrax requires the following software to work:
|
|
45
45
|
|
|
46
|
-
1. [Solr](http://lucene.apache.org/solr/) version >= 5.x (tested up to 8.
|
|
46
|
+
1. [Solr](http://lucene.apache.org/solr/) version >= 5.x (tested up to 8.11.1, which includes the log4j library update)
|
|
47
47
|
1. [Fedora Commons](http://www.fedora-commons.org/) digital repository version >= 4.5.1 (tested up to 4.7.5)
|
|
48
48
|
1. A SQL RDBMS (MySQL, PostgreSQL), though **note** that SQLite will be used by default if you're looking to get up and running quickly
|
|
49
49
|
1. [Redis](http://redis.io/), a key-value store
|
|
@@ -125,7 +125,7 @@ NOTE: The steps need to be done in order to create a new Hyrax based app.
|
|
|
125
125
|
Generate a new Rails application using the template.
|
|
126
126
|
|
|
127
127
|
```
|
|
128
|
-
rails _5.2.6_ new my_app -m https://raw.githubusercontent.com/samvera/hyrax/v3.
|
|
128
|
+
rails _5.2.6_ new my_app -m https://raw.githubusercontent.com/samvera/hyrax/v3.3.0/template.rb
|
|
129
129
|
```
|
|
130
130
|
|
|
131
131
|
Generating a new Rails application using Hyrax's template above takes cares of a number of steps for you, including:
|
|
@@ -50,7 +50,7 @@ The Samvera community is here to help. Please see our [support guide](./.github/
|
|
|
50
50
|
# Getting started
|
|
51
51
|
|
|
52
52
|
This document contains instructions specific to setting up an app with __Hyrax
|
|
53
|
-
v3.
|
|
53
|
+
v3.3.0__. If you are looking for instructions on installing a different
|
|
54
54
|
version, be sure to select the appropriate branch or tag from the drop-down
|
|
55
55
|
menu above.
|
|
56
56
|
|
data/hyrax.gemspec
CHANGED
|
@@ -52,8 +52,9 @@ SUMMARY
|
|
|
52
52
|
spec.add_dependency 'font-awesome-rails', '~> 4.2'
|
|
53
53
|
spec.add_dependency 'hydra-derivatives', '~> 3.3'
|
|
54
54
|
spec.add_dependency 'hydra-editor', '~> 5.0', ">= 5.0.4"
|
|
55
|
+
spec.add_dependency 'hydra-file_characterization', '~> 1.1.2'
|
|
55
56
|
spec.add_dependency 'hydra-head', '~> 11.0', ">= 11.0.1"
|
|
56
|
-
spec.add_dependency 'hydra-works', '>= 0.16'
|
|
57
|
+
spec.add_dependency 'hydra-works', '>= 0.16'
|
|
57
58
|
spec.add_dependency 'iiif_manifest', '>= 0.3', '< 2.0'
|
|
58
59
|
spec.add_dependency 'jquery-datatables-rails', '~> 3.4'
|
|
59
60
|
spec.add_dependency 'jquery-ui-rails', '~> 6.0'
|
|
@@ -95,6 +96,7 @@ SUMMARY
|
|
|
95
96
|
spec.add_development_dependency "jasmine-core", '~> 2.3', '< 2.99'
|
|
96
97
|
spec.add_development_dependency 'mida', '~> 0.3'
|
|
97
98
|
spec.add_development_dependency 'okcomputer'
|
|
99
|
+
spec.add_development_dependency 'pg', '~> 1.2'
|
|
98
100
|
spec.add_development_dependency 'rspec-activemodel-mocks', '~> 1.0'
|
|
99
101
|
spec.add_development_dependency 'rspec-its', '~> 1.1'
|
|
100
102
|
spec.add_development_dependency 'rspec-rails', '~> 3.1'
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
#
|
|
2
|
-
#
|
|
2
|
+
# You can manually fill in these values or use the ENV variables.
|
|
3
3
|
#
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
analytics:
|
|
5
|
+
google:
|
|
6
|
+
analytics_id: <%= ENV['GOOGLE_ANALYTICS_ID'] %>
|
|
7
|
+
app_name: <%= ENV['GOOGLE_OAUTH_APP_NAME'] %>
|
|
8
|
+
app_version: <%= ENV['GOOGLE_OAUTH_APP_VERSION'] %>
|
|
9
|
+
privkey_path: <%= ENV['GOOGLE_OAUTH_PRIVATE_KEY_PATH'] %>
|
|
10
|
+
privkey_secret: <%= ENV['GOOGLE_OAUTH_PRIVATE_KEY_SECRET'] %>
|
|
11
|
+
client_email: <%= ENV['GOOGLE_OAUTH_CLIENT_EMAIL'] %>
|
|
12
|
+
matomo:
|
|
13
|
+
base_url: <%= ENV['MATOMO_BASE_URL'] %>
|
|
14
|
+
site_id: <%= ENV['MATOMO_SITE_ID'] %>
|
|
15
|
+
auth_token: <%= ENV['MATOMO_AUTH_TOKEN'] %>
|
|
@@ -41,19 +41,6 @@ Hyrax.config do |config|
|
|
|
41
41
|
# maxFileSize: 500.megabytes
|
|
42
42
|
# }
|
|
43
43
|
|
|
44
|
-
# Enable displaying usage statistics in the UI
|
|
45
|
-
# Defaults to false
|
|
46
|
-
# Requires a Google Analytics id and OAuth2 keyfile. See README for more info
|
|
47
|
-
# config.analytics = false
|
|
48
|
-
|
|
49
|
-
# Google Analytics tracking ID to gather usage statistics
|
|
50
|
-
# config.google_analytics_id = 'UA-99999999-1'
|
|
51
|
-
|
|
52
|
-
# Date you wish to start collecting Google Analytic statistics for
|
|
53
|
-
# Leaving it blank will set the start date to when ever the file was uploaded by
|
|
54
|
-
# NOTE: if you have always sent analytics to GA for downloads and page views leave this commented out
|
|
55
|
-
# config.analytic_start_date = DateTime.new(2014, 9, 10)
|
|
56
|
-
|
|
57
44
|
# Enables a link to the citations page for a work
|
|
58
45
|
# Default is false
|
|
59
46
|
# config.citations = false
|
|
@@ -31,11 +31,13 @@ RSpec.feature 'Create a <%= class_name %>', js: false do
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
scenario do
|
|
34
|
+
pending 'Changes may be required for this test to pass. See TODO in test.'
|
|
35
|
+
|
|
34
36
|
visit '/dashboard'
|
|
35
37
|
click_link "Works"
|
|
36
38
|
click_link "Add new work"
|
|
37
39
|
|
|
38
|
-
# If you generate more than one work uncomment these lines
|
|
40
|
+
# TODO: If you generate more than one work uncomment these lines
|
|
39
41
|
# choose "payload_concern", option: "<%= class_name %>"
|
|
40
42
|
# click_button "Create work"
|
|
41
43
|
|
data/lib/hyrax/configuration.rb
CHANGED
|
@@ -112,16 +112,46 @@ module Hyrax
|
|
|
112
112
|
ActiveModel::Type::Boolean.new.cast(ENV.fetch('HYRAX_ANALYTICS', false))
|
|
113
113
|
end
|
|
114
114
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
# Currently supports 'google' or 'matomo'
|
|
116
|
+
# google is default for backward compatability
|
|
117
|
+
attr_writer :analytics_provider
|
|
118
|
+
def analytics_provider
|
|
119
|
+
@analytics_provider ||=
|
|
120
|
+
ENV.fetch('HYRAX_ANALYTICS_PROVIDER', 'google')
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
##
|
|
124
|
+
# @!attribute [w] analytics_start_date
|
|
125
|
+
# @note this can be set using the +ANALITICS_START_DATE+ environment variable (format is YYYY-MM-DD)
|
|
126
|
+
# @return [String] date you wish to start collecting analytics for. used to compute the
|
|
127
|
+
# "all-time" metrics.
|
|
128
|
+
# This is used to compute the "all-time" metrics
|
|
129
|
+
# Set this in your .env file (format is YYYY-MM-DD)
|
|
130
|
+
attr_writer :analytics_start_date
|
|
131
|
+
def analytics_start_date
|
|
132
|
+
@analytics_start_date ||=
|
|
133
|
+
ENV.fetch('ANALYTICS_START_DATE', Time.zone.today - 1.year)
|
|
118
134
|
end
|
|
119
|
-
alias google_analytics_id? google_analytics_id
|
|
120
135
|
|
|
121
136
|
# Defaulting analytic start date to whenever the file was uploaded by leaving it blank
|
|
122
137
|
attr_writer :analytic_start_date
|
|
123
138
|
attr_reader :analytic_start_date
|
|
124
139
|
|
|
140
|
+
##
|
|
141
|
+
# @deprecated use analytics_id from config/analytics.yml instead
|
|
142
|
+
def google_analytics_id=(value)
|
|
143
|
+
Deprecation.warn("google_analytics_id is deprecated; use analytics_id from config/analytics.yml instead.")
|
|
144
|
+
Hyrax::Analytics.config.analytics_id = value
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
##
|
|
148
|
+
# @deprecated use analytics_id from config/analytics.yml instead
|
|
149
|
+
def google_analytics_id
|
|
150
|
+
Deprecation.warn("google_analytics_id is deprecated; use analytics_id from config/analytics.yml instead.")
|
|
151
|
+
Hyrax::Analytics.config.analytics_id
|
|
152
|
+
end
|
|
153
|
+
alias google_analytics_id? google_analytics_id
|
|
154
|
+
|
|
125
155
|
# @!endgroup
|
|
126
156
|
# @!group Groups
|
|
127
157
|
|
|
@@ -454,6 +484,17 @@ module Hyrax
|
|
|
454
484
|
# Override characterization runner
|
|
455
485
|
attr_accessor :characterization_runner
|
|
456
486
|
|
|
487
|
+
##
|
|
488
|
+
# @!attribute [rw] characterization_service
|
|
489
|
+
# @return [#run] the service to use for charactaerization for Valkyrie
|
|
490
|
+
# objects
|
|
491
|
+
# @ see Hyrax::Characterization::ValkyrieCharacterizationService
|
|
492
|
+
attr_writer :characterization_service
|
|
493
|
+
def characterization_service
|
|
494
|
+
@characterization_service ||=
|
|
495
|
+
Hyrax::Characterization::ValkyrieCharacterizationService
|
|
496
|
+
end
|
|
497
|
+
|
|
457
498
|
# Attributes for the lock manager which ensures a single process/thread is mutating a ore:Aggregation at once.
|
|
458
499
|
# @!attribute [w] lock_retry_count
|
|
459
500
|
# How many times to retry to acquire the lock before raising UnableToAcquireLockError
|
|
@@ -677,7 +718,7 @@ module Hyrax
|
|
|
677
718
|
##
|
|
678
719
|
# @return [Class] the configured collection model class
|
|
679
720
|
def collection_class
|
|
680
|
-
collection_model.
|
|
721
|
+
collection_model.safe_constantize
|
|
681
722
|
end
|
|
682
723
|
|
|
683
724
|
attr_writer :admin_set_model
|
|
@@ -694,6 +735,27 @@ module Hyrax
|
|
|
694
735
|
admin_set_model.constantize
|
|
695
736
|
end
|
|
696
737
|
|
|
738
|
+
##
|
|
739
|
+
# @return [String] the default admin set id
|
|
740
|
+
def default_admin_set_id
|
|
741
|
+
default_admin_set.id.to_s
|
|
742
|
+
end
|
|
743
|
+
|
|
744
|
+
##
|
|
745
|
+
# @return [Hyrax::AdministrativeSet] the default admin set
|
|
746
|
+
# @see Hyrax::AdminSetCreateService.find_or_create_default_admin_set
|
|
747
|
+
def default_admin_set
|
|
748
|
+
@default_admin_set ||= Hyrax::AdminSetCreateService.find_or_create_default_admin_set
|
|
749
|
+
end
|
|
750
|
+
|
|
751
|
+
##
|
|
752
|
+
# If the default admin set is changed, call reset. The next time one of the default
|
|
753
|
+
# admin set configs is checked, the default_admin_set variable will be updated.
|
|
754
|
+
# @see Hyrax::DefaultAdministrativeSet.update
|
|
755
|
+
def reset_default_admin_set
|
|
756
|
+
@default_admin_set = nil
|
|
757
|
+
end
|
|
758
|
+
|
|
697
759
|
attr_writer :id_field
|
|
698
760
|
def id_field
|
|
699
761
|
@id_field || index_field_mapper.id_field
|
data/lib/hyrax/engine.rb
CHANGED
|
@@ -3,22 +3,23 @@ module Hyrax
|
|
|
3
3
|
class Engine < ::Rails::Engine
|
|
4
4
|
isolate_namespace Hyrax
|
|
5
5
|
|
|
6
|
+
require 'almond-rails'
|
|
6
7
|
require 'awesome_nested_set'
|
|
7
8
|
require 'breadcrumbs_on_rails'
|
|
9
|
+
require 'clipboard/rails'
|
|
8
10
|
require 'draper'
|
|
9
|
-
require 'dry/struct'
|
|
10
11
|
require 'dry/equalizer'
|
|
11
12
|
require 'dry/events'
|
|
13
|
+
require 'dry/struct'
|
|
12
14
|
require 'dry/validation'
|
|
13
|
-
require '
|
|
15
|
+
require 'flipflop'
|
|
14
16
|
require 'flot-rails'
|
|
15
|
-
require '
|
|
17
|
+
require 'hydra-file_characterization'
|
|
16
18
|
require 'jquery-datatables-rails'
|
|
17
|
-
require '
|
|
19
|
+
require 'jquery-ui-rails'
|
|
20
|
+
require 'legato'
|
|
18
21
|
require 'qa'
|
|
19
|
-
require 'clipboard/rails'
|
|
20
22
|
require 'tinymce-rails'
|
|
21
|
-
require 'legato'
|
|
22
23
|
require 'valkyrie'
|
|
23
24
|
|
|
24
25
|
require 'hydra/derivatives'
|
data/lib/hyrax/publisher.rb
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
require 'hyrax/transactions/transaction'
|
|
3
|
+
|
|
4
|
+
module Hyrax
|
|
5
|
+
module Transactions
|
|
6
|
+
##
|
|
7
|
+
# Creates a Hyrax::AdministrativeSet from a ChangeSet
|
|
8
|
+
#
|
|
9
|
+
# @since 3.2.0
|
|
10
|
+
class AdminSetCreate < Transaction
|
|
11
|
+
DEFAULT_STEPS = ['change_set.apply',
|
|
12
|
+
'admin_set_resource.apply_collection_type_permissions',
|
|
13
|
+
'admin_set_resource.save_acl'].freeze
|
|
14
|
+
|
|
15
|
+
##
|
|
16
|
+
# @see Hyrax::Transactions::Transaction
|
|
17
|
+
def initialize(container: Container, steps: DEFAULT_STEPS)
|
|
18
|
+
super
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -18,6 +18,7 @@ module Hyrax
|
|
|
18
18
|
#
|
|
19
19
|
# @see https://dry-rb.org/gems/dry-container/
|
|
20
20
|
class Container # rubocop:disable Metrics/ClassLength
|
|
21
|
+
require 'hyrax/transactions/admin_set_create'
|
|
21
22
|
require 'hyrax/transactions/apply_change_set'
|
|
22
23
|
require 'hyrax/transactions/collection_create'
|
|
23
24
|
require 'hyrax/transactions/collection_update'
|
|
@@ -125,6 +126,16 @@ module Hyrax
|
|
|
125
126
|
end
|
|
126
127
|
end
|
|
127
128
|
|
|
129
|
+
namespace 'admin_set_resource' do |ops| # valkyrie administrative set
|
|
130
|
+
ops.register 'apply_collection_type_permissions' do
|
|
131
|
+
Steps::ApplyCollectionTypePermissions.new
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
ops.register 'save_acl' do
|
|
135
|
+
Steps::SaveAccessControl.new
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
|
|
128
139
|
namespace 'collection_resource' do |ops| # valkyrie collection
|
|
129
140
|
ops.register 'apply_collection_type_permissions' do
|
|
130
141
|
Steps::ApplyCollectionTypePermissions.new
|
data/lib/hyrax/version.rb
CHANGED