hyrax 4.0.0 → 5.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +116 -231
- data/.dassie/.env +3 -1
- data/.dassie/config/environments/test.rb +1 -0
- data/.dassie/config/initializers/hyrax.rb +3 -1
- data/.dassie/config/initializers/riiif.rb +13 -3
- data/.dassie/db/schema.rb +2 -2
- data/.dockerignore +6 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +10 -7
- data/.github/release.yml +5 -2
- data/.koppie/.env +3 -0
- data/.koppie/app/forms/collection_resource_form.rb +1 -0
- data/.koppie/app/indexers/collection_resource_indexer.rb +1 -0
- data/.koppie/app/models/collection_resource.rb +1 -0
- data/.koppie/config/environments/test.rb +1 -0
- data/.koppie/config/initializers/hyrax.rb +8 -2
- data/.koppie/config/initializers/riiif.rb +13 -4
- data/.koppie/config/metadata/collection_resource.yaml +1 -128
- data/.koppie/yarn.lock +23 -23
- data/.regen +1 -1
- data/CONTAINERS.md +1 -1
- data/Dockerfile +6 -11
- data/app/actors/hyrax/actors/base_actor.rb +4 -3
- data/app/actors/hyrax/actors/embargo_actor.rb +5 -2
- data/app/actors/hyrax/actors/lease_actor.rb +5 -2
- data/app/assets/javascripts/hyrax/file_manager/sorting.es6 +3 -2
- data/app/controllers/concerns/hyrax/embargoes_controller_behavior.rb +1 -1
- data/app/controllers/concerns/hyrax/valkyrie_downloads_controller_behavior.rb +74 -0
- data/app/controllers/concerns/hyrax/works_controller_behavior.rb +14 -5
- data/app/controllers/hyrax/admin/workflows_controller.rb +48 -3
- data/app/controllers/hyrax/batch_edits_controller.rb +33 -4
- data/app/controllers/hyrax/downloads_controller.rb +8 -1
- data/app/controllers/hyrax/file_sets_controller.rb +1 -0
- data/app/forms/hyrax/forms/file_set_edit_form.rb +1 -1
- data/app/forms/hyrax/forms/permission_template_form.rb +2 -0
- data/app/forms/hyrax/forms/resource_batch_edit_form.rb +90 -0
- data/app/forms/hyrax/forms/work_embargo_form.rb +1 -0
- data/app/forms/hyrax/forms/work_form.rb +1 -1
- data/app/forms/hyrax/forms/work_lease_form.rb +1 -0
- data/app/helpers/hyrax/dashboard_helper_behavior.rb +17 -9
- data/app/helpers/hyrax/membership_helper.rb +13 -1
- data/app/helpers/hyrax/work_form_helper.rb +0 -107
- data/app/indexers/hyrax/file_set_indexer.rb +6 -0
- data/app/indexers/hyrax/pcdm_collection_indexer.rb +8 -0
- data/app/indexers/hyrax/valkyrie_file_set_indexer.rb +41 -5
- data/app/indexers/hyrax/valkyrie_work_indexer.rb +8 -2
- data/app/jobs/valkyrie_create_derivatives_job.rb +8 -7
- data/app/jobs/valkyrie_ingest_job.rb +0 -1
- data/app/models/admin_set.rb +1 -31
- data/app/models/concerns/hyrax/file_set/derivatives.rb +3 -2
- data/app/models/concerns/hyrax/solr_document_behavior.rb +1 -1
- data/app/models/hyrax/collection_type.rb +5 -14
- data/app/models/hyrax/file_metadata.rb +6 -7
- data/app/models/hyrax/file_set.rb +8 -0
- data/app/models/hyrax/resource.rb +30 -2
- data/app/presenters/hyrax/file_set_presenter.rb +6 -0
- data/app/presenters/hyrax/iiif_manifest_presenter.rb +3 -7
- data/app/presenters/hyrax/presenter_renderer.rb +0 -7
- data/app/presenters/hyrax/work_show_presenter.rb +6 -11
- data/app/search_builders/hyrax/file_set_search_builder.rb +1 -1
- data/app/search_builders/hyrax/valkyrie_abstract_type_relation.rb +37 -0
- data/app/search_builders/hyrax/valkyrie_work_relation.rb +9 -0
- data/app/services/hyrax/characterization/valkyrie_characterization_service.rb +11 -9
- data/app/services/hyrax/custom_queries/find_by_date_range.rb +55 -0
- data/app/services/hyrax/custom_queries/find_count_by.rb +62 -0
- data/app/services/hyrax/custom_queries/find_file_metadata.rb +1 -1
- data/app/services/hyrax/custom_queries/find_models_by_access.rb +59 -0
- data/app/services/hyrax/derivative_bucketed_storage.rb +25 -0
- data/app/services/hyrax/derivative_path.rb +14 -4
- data/app/services/hyrax/embargo_manager.rb +76 -10
- data/app/services/hyrax/file_set_derivatives_service.rb +3 -2
- data/app/services/hyrax/lease_manager.rb +88 -8
- data/app/services/hyrax/listeners/file_metadata_listener.rb +2 -2
- data/app/services/hyrax/listeners/workflow_listener.rb +8 -11
- data/app/services/hyrax/persist_directly_contained_output_file_service.rb +24 -2
- data/app/services/hyrax/solr_query_service.rb +7 -6
- data/app/services/hyrax/statistics/depositors/summary.rb +1 -1
- data/app/services/hyrax/statistics/over_time.rb +1 -1
- data/app/services/hyrax/statistics/users/over_time.rb +3 -1
- data/app/services/hyrax/statistics/valkyrie_query_service.rb +49 -0
- data/app/services/hyrax/statistics/works/count.rb +1 -1
- data/app/services/hyrax/thumbnail_path_service.rb +5 -0
- data/app/services/hyrax/valkyrie_persist_derivatives.rb +16 -11
- data/app/services/hyrax/valkyrie_upload.rb +5 -3
- data/app/services/hyrax/versioning_service.rb +1 -0
- data/app/services/hyrax/visibility_intention.rb +1 -4
- data/app/services/hyrax/visibility_propagator.rb +1 -1
- data/app/services/hyrax/workflow/actionable_objects.rb +28 -3
- data/app/services/hyrax/workflow/grant_edit_to_depositor.rb +1 -1
- data/app/services/hyrax/workflow/grant_read_to_depositor.rb +1 -1
- data/app/services/hyrax/workflow/permission_query.rb +23 -2
- data/app/views/hyrax/admin/workflows/_tabs.html.erb +9 -0
- data/app/views/hyrax/admin/workflows/index.html.erb +53 -76
- data/app/views/hyrax/base/_file_manager_members.html.erb +2 -2
- data/app/views/hyrax/base/_form.html.erb +0 -10
- data/app/views/hyrax/base/_form_permission_embargo.html.erb +1 -1
- data/app/views/hyrax/base/_form_permission_lease.html.erb +1 -1
- data/app/views/hyrax/base/_form_visibility_component.html.erb +2 -2
- data/app/views/hyrax/base/_items.html.erb +1 -1
- data/app/views/hyrax/base/file_manager.html.erb +1 -1
- data/app/views/hyrax/base/show.json.jbuilder +2 -2
- data/app/views/hyrax/file_sets/show.html.erb +5 -3
- data/app/views/hyrax/homepage/_explore_collections.html.erb +1 -1
- data/chart/hyrax/Chart.yaml +18 -14
- data/chart/hyrax/README.md +34 -21
- data/chart/hyrax/templates/_helpers.tpl +26 -1
- data/chart/hyrax/templates/configmap-env.yaml +12 -2
- data/chart/hyrax/templates/secrets.yaml +1 -1
- data/chart/hyrax/values.yaml +36 -14
- data/config/initializers/listeners.rb +4 -10
- data/config/initializers/storage_adapter_initializer.rb +1 -1
- data/config/locales/hyrax.en.yml +8 -0
- data/config/metadata/file_set_metadata.yaml +1 -1
- data/docker-compose-koppie.yml +17 -4
- data/docker-compose.yml +19 -6
- data/documentation/developing-your-hyrax-based-app.md +6 -14
- data/documentation/legacyREADME.md +3 -1
- data/hyrax.gemspec +2 -2
- data/karma.conf.js +8 -9
- data/lib/generators/hyrax/templates/config/initializers/hyrax.rb +1 -1
- data/lib/generators/hyrax/templates/config/initializers/riiif.rb +15 -5
- data/lib/hyrax/active_fedora_dummy_model.rb +6 -1
- data/lib/hyrax/configuration.rb +6 -0
- data/lib/hyrax/engine.rb +2 -0
- data/lib/hyrax/publisher.rb +19 -3
- data/lib/hyrax/specs/capybara.rb +9 -4
- data/lib/hyrax/transactions/container.rb +5 -0
- data/lib/hyrax/transactions/steps/add_file_sets.rb +6 -0
- data/lib/hyrax/transactions/steps/apply_permission_template.rb +40 -0
- data/lib/hyrax/transactions/steps/save.rb +21 -0
- data/lib/hyrax/transactions/work_create.rb +1 -0
- data/lib/hyrax/version.rb +1 -1
- data/lib/hyrax.rb +1 -0
- data/lib/wings/active_fedora_converter/default_work.rb +7 -2
- data/lib/wings/active_fedora_converter/file_metadata_node.rb +1 -1
- data/lib/wings/active_fedora_converter.rb +47 -11
- data/lib/wings/model_transformer.rb +23 -4
- data/lib/wings/setup.rb +21 -1
- data/lib/wings/valkyrie/persister.rb +4 -2
- data/package.json +3 -1
- data/template.rb +1 -1
- metadata +17 -12
- data/app/forms/hyrax/forms/file_manager_form.rb +0 -35
- data/app/services/hyrax/collections/migration_service.rb +0 -113
- data/app/views/hyrax/base/_form_collections_error.html.erb +0 -1
- data/app/views/hyrax/base/_form_in_works_error.html.erb +0 -3
- data/app/views/hyrax/base/_form_ordered_members_error.html.erb +0 -3
- data/app/views/hyrax/base/_form_visibility_error.html.erb +0 -19
@@ -20,11 +20,27 @@ module Hyrax
|
|
20
20
|
# @!attribute [rw] user
|
21
21
|
# @return [::User]
|
22
22
|
attr_accessor :user
|
23
|
+
##
|
24
|
+
# @!attribute [rw] workflow_state_filter
|
25
|
+
# @return [String]
|
26
|
+
attr_accessor :workflow_state_filter
|
27
|
+
##
|
28
|
+
# @!attribute [rw] page of results to return, 1 based
|
29
|
+
# @return [Integer]
|
30
|
+
attr_accessor :page
|
31
|
+
##
|
32
|
+
# @!attribute [rw] per_page number of results in the page
|
33
|
+
# @return [Integer]
|
34
|
+
attr_accessor :per_page
|
23
35
|
|
24
36
|
##
|
25
37
|
# @param [::User] user the user whose
|
26
|
-
|
38
|
+
# @param [String] optional filter by workstate name
|
39
|
+
def initialize(user:, workflow_state_filter: nil)
|
27
40
|
@user = user
|
41
|
+
@workflow_state_filter = workflow_state_filter
|
42
|
+
@page = 1
|
43
|
+
@per_page = 10
|
28
44
|
end
|
29
45
|
|
30
46
|
##
|
@@ -34,7 +50,8 @@ module Hyrax
|
|
34
50
|
ids_and_states = id_state_pairs
|
35
51
|
return if ids_and_states.none?
|
36
52
|
|
37
|
-
docs = Hyrax::SolrQueryService.new.with_ids(ids: ids_and_states.map(&:first))
|
53
|
+
docs = Hyrax::SolrQueryService.new.with_ids(ids: ids_and_states.map(&:first))
|
54
|
+
.solr_documents(page: @page, rows: @per_page, sort: 'system_create_dtsi ASC')
|
38
55
|
|
39
56
|
docs.each do |solr_doc|
|
40
57
|
object = ObjectInWorkflowDecorator.new(solr_doc)
|
@@ -46,6 +63,13 @@ module Hyrax
|
|
46
63
|
end
|
47
64
|
end
|
48
65
|
|
66
|
+
##
|
67
|
+
# @return [Integer] total number of entities selected
|
68
|
+
def total_count
|
69
|
+
PermissionQuery.scope_entities_for_the_user(user: user, workflow_state_filter: workflow_state_filter)
|
70
|
+
.count
|
71
|
+
end
|
72
|
+
|
49
73
|
private
|
50
74
|
|
51
75
|
##
|
@@ -53,7 +77,8 @@ module Hyrax
|
|
53
77
|
# @return [Array[String, Sipity::WorkflowState]]
|
54
78
|
def id_state_pairs
|
55
79
|
gids_and_states = PermissionQuery
|
56
|
-
.scope_entities_for_the_user(user: user)
|
80
|
+
.scope_entities_for_the_user(user: user, page: page, per_page: per_page, workflow_state_filter: workflow_state_filter)
|
81
|
+
.order(created_at: :asc)
|
57
82
|
.pluck(:proxy_for_global_id, :workflow_state_id)
|
58
83
|
|
59
84
|
return [] if gids_and_states.none?
|
@@ -11,7 +11,7 @@ module Hyrax
|
|
11
11
|
return true unless target.try(:depositor)
|
12
12
|
|
13
13
|
model = target.try(:model) || target # get the model if target is a ChangeSet
|
14
|
-
model.edit_users
|
14
|
+
model.edit_users += Array.wrap(target.depositor)
|
15
15
|
model.try(:permission_manager)&.acl&.save
|
16
16
|
|
17
17
|
# If there are a lot of members, granting access to each could take a
|
@@ -12,7 +12,7 @@ module Hyrax
|
|
12
12
|
return true unless target.try(:depositor)
|
13
13
|
|
14
14
|
model = target.try(:model) || target # get the model if target is a ChangeSet
|
15
|
-
model.read_users
|
15
|
+
model.read_users += Array.wrap(target.depositor)
|
16
16
|
model.try(:permission_manager)&.acl&.save
|
17
17
|
|
18
18
|
# If there are a lot of members, granting access to each could take a
|
@@ -194,7 +194,7 @@ module Hyrax
|
|
194
194
|
# @return [ActiveRecord::Relation<Sipity::Entity>]
|
195
195
|
#
|
196
196
|
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
197
|
-
def scope_entities_for_the_user(user:)
|
197
|
+
def scope_entities_for_the_user(user:, page: 1, per_page: nil, workflow_state_filter: nil)
|
198
198
|
entities = Sipity::Entity.arel_table
|
199
199
|
workflow_state_actions = Sipity::WorkflowStateAction.arel_table
|
200
200
|
workflow_states = Sipity::WorkflowState.arel_table
|
@@ -227,13 +227,34 @@ module Hyrax
|
|
227
227
|
entity_specific_where = where_builder.call(entity_responsibilities).and(
|
228
228
|
entities[:id].eq(entity_responsibilities[:entity_id])
|
229
229
|
)
|
230
|
+
entity_specific_where = filter_by_workflow_state(entity_specific_where, workflow_states, workflow_state_filter) if workflow_state_filter
|
230
231
|
workflow_specific_where = where_builder.call(workflow_responsibilities)
|
232
|
+
workflow_specific_where = filter_by_workflow_state(workflow_specific_where, workflow_states, workflow_state_filter) if workflow_state_filter
|
231
233
|
|
232
|
-
Sipity::Entity.where(
|
234
|
+
result = Sipity::Entity.where(
|
233
235
|
entities[:id].in(entity_specific_joins.where(entity_specific_where))
|
234
236
|
.or(entities[:id].in(workflow_specific_joins.where(workflow_specific_where)))
|
235
237
|
)
|
238
|
+
# Apply paging if provided
|
239
|
+
if per_page.nil?
|
240
|
+
result
|
241
|
+
else
|
242
|
+
result.page(page).per(per_page)
|
243
|
+
end
|
236
244
|
end
|
245
|
+
|
246
|
+
# @api private
|
247
|
+
#
|
248
|
+
# Append a filter by workflow state name to the provided where builder.
|
249
|
+
# If the filter begins with a !, it will filter to states not equal to the filter.
|
250
|
+
def filter_by_workflow_state(where_builder, workflow_states, filter)
|
251
|
+
if filter.start_with?('!')
|
252
|
+
where_builder.and(workflow_states[:name].not_eq(filter[1..]))
|
253
|
+
else
|
254
|
+
where_builder.and(workflow_states[:name].eq(filter))
|
255
|
+
end
|
256
|
+
end
|
257
|
+
|
237
258
|
# rubocop:enable Metrics/AbcSize, Metrics/MethodLength
|
238
259
|
|
239
260
|
# @api public
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<ul class="nav nav-tabs" id="my_nav" role="list">
|
2
|
+
<li<%= ' class="nav-item"'.html_safe if @response.viewing_under_review? %>>
|
3
|
+
<%= link_to t('hyrax.admin.workflows.index.tabs.under_review'),
|
4
|
+
hyrax.admin_workflows_path(state: 'under-review'), class: "nav-link#{' active' if @response.viewing_under_review?}" %>
|
5
|
+
</li>
|
6
|
+
<li<%= ' class="nav-item"'.html_safe if !@response.viewing_under_review? %>>
|
7
|
+
<%= link_to t('hyrax.admin.workflows.index.tabs.published'), hyrax.admin_workflows_path(state: 'published'), class: "nav-link#{' active' if !@response.viewing_under_review?}" %>
|
8
|
+
</li>
|
9
|
+
</ul>
|
@@ -4,87 +4,64 @@
|
|
4
4
|
|
5
5
|
<div class="row">
|
6
6
|
<div class="col-md-12">
|
7
|
-
<div class="
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
<div class="card labels">
|
19
|
-
<div class="card-body">
|
20
|
-
<div class="table-responsive">
|
21
|
-
<table class="table table-sm table-striped datatable">
|
22
|
-
<thead>
|
23
|
-
<tr>
|
24
|
-
<th width="40%">Work</th>
|
25
|
-
<th width="20%">Depositor</th>
|
26
|
-
<th width="20%">Submission Date</th>
|
27
|
-
<th width="20%">Status</th>
|
28
|
-
</tr>
|
29
|
-
</thead>
|
30
|
-
<tbody>
|
31
|
-
<% @status_list.each do |document| %>
|
32
|
-
<tr>
|
33
|
-
<td>
|
34
|
-
<%= link_to document, [main_app, document] %>
|
35
|
-
</td>
|
36
|
-
<td>
|
37
|
-
<%= safe_join(document.creator, tag(:br)) %>
|
38
|
-
</td>
|
39
|
-
<td>
|
40
|
-
<%= document.date_modified %>
|
41
|
-
</td>
|
42
|
-
<td>
|
43
|
-
<span class="state state-pending"><%= document.workflow_state %></span>
|
44
|
-
</td>
|
45
|
-
</tr>
|
46
|
-
<% end %>
|
47
|
-
</tbody>
|
48
|
-
</table>
|
49
|
-
</div>
|
50
|
-
</div>
|
51
|
-
</div>
|
7
|
+
<div class="tabs">
|
8
|
+
<%= render 'tabs' %>
|
9
|
+
<div class="card">
|
10
|
+
<div class="card-header">
|
11
|
+
<span class="count-display">
|
12
|
+
<% if @response.viewing_under_review? %>
|
13
|
+
<%= I18n.t('hyrax.admin.workflows.index.works_under_review', total_count: @response.total_count).html_safe %>
|
14
|
+
<% else %>
|
15
|
+
<%= I18n.t('hyrax.admin.workflows.index.works_published', total_count: @response.total_count).html_safe %>
|
16
|
+
<% end %>
|
17
|
+
</span>
|
52
18
|
</div>
|
53
|
-
<div
|
54
|
-
<div class="
|
55
|
-
<div class="
|
56
|
-
<div class="
|
57
|
-
|
58
|
-
<
|
59
|
-
<
|
60
|
-
|
61
|
-
|
62
|
-
<th width="20%">Submission Date</th>
|
63
|
-
<th width="20%">Status</th>
|
64
|
-
</tr>
|
65
|
-
</thead>
|
66
|
-
<tbody>
|
67
|
-
<% @published_list.each do |document| %>
|
68
|
-
<tr>
|
69
|
-
<td>
|
70
|
-
<%= link_to document, [main_app, document] %>
|
71
|
-
</td>
|
72
|
-
<td>
|
73
|
-
<%= safe_join(document.creator, tag(:br)) %>
|
74
|
-
</td>
|
75
|
-
<td>
|
76
|
-
<%= document.date_modified %>
|
77
|
-
</td>
|
78
|
-
<td>
|
79
|
-
<span class="state state-pending"><%= document.workflow_state %></span>
|
80
|
-
</td>
|
81
|
-
</tr>
|
19
|
+
<div class="card-body">
|
20
|
+
<div class="row">
|
21
|
+
<div class="col-sm-12">
|
22
|
+
<div class="sort-toggle mt-2">
|
23
|
+
<%= form_tag hyrax.admin_workflows_path, method: :get, class: 'per_page' do %>
|
24
|
+
<fieldset class="col-12">
|
25
|
+
<legend class="sr-only"><%= t('hyrax.dashboard.my.sr.results_per_page') %></legend>
|
26
|
+
<%= label_tag :per_page do %>
|
27
|
+
Show <%= select_tag :per_page, options_for_select(Hyrax.config.range_for_number_of_results_to_display_per_page.map(&:to_s), h(params[:per_page])), title: "entries" %> per page
|
82
28
|
<% end %>
|
83
|
-
|
84
|
-
|
29
|
+
<%= render Blacklight::HiddenSearchStateComponent.new(params: search_state.params_for_search.except(:per_page, :sort, :utf8)) %>
|
30
|
+
</fieldset>
|
31
|
+
<% end %>
|
85
32
|
</div>
|
86
33
|
</div>
|
87
34
|
</div>
|
35
|
+
<h2 class="sr-only"><%= t('.works_listing') %></h2>
|
36
|
+
<table class="table table-sm table-striped works-list">
|
37
|
+
<thead>
|
38
|
+
<tr>
|
39
|
+
<th width="40%"><%= t(".heading.work") %></th>
|
40
|
+
<th width="20%"><%= t(".heading.depositor") %></th>
|
41
|
+
<th width="20%"><%= t(".heading.submission_date") %></th>
|
42
|
+
<th width="20%"><%= t(".heading.status") %></th>
|
43
|
+
</tr>
|
44
|
+
</thead>
|
45
|
+
<tbody>
|
46
|
+
<% @response.docs.each do |document| %>
|
47
|
+
<tr>
|
48
|
+
<td>
|
49
|
+
<%= link_to document, [main_app, document] %>
|
50
|
+
</td>
|
51
|
+
<td>
|
52
|
+
<%= safe_join(document.creator, tag(:br)) %>
|
53
|
+
</td>
|
54
|
+
<td>
|
55
|
+
<%= document.date_modified %>
|
56
|
+
</td>
|
57
|
+
<td>
|
58
|
+
<span class="state state-pending"><%= document.workflow_state %></span>
|
59
|
+
</td>
|
60
|
+
</tr>
|
61
|
+
<% end %>
|
62
|
+
</tbody>
|
63
|
+
</table>
|
64
|
+
<%= render 'hyrax/my/results_pagination' %>
|
88
65
|
</div>
|
89
66
|
</div>
|
90
67
|
</div>
|
@@ -2,10 +2,10 @@
|
|
2
2
|
id: "sortable",
|
3
3
|
class: "list-unstyled grid d-flex flex-wrap clearfix",
|
4
4
|
data: {
|
5
|
-
id: @form.id,
|
5
|
+
id: @form.id.to_s,
|
6
6
|
"class-name" => @form.model_name.plural,
|
7
7
|
"singular-class-name" => @form.model_name.singular,
|
8
|
-
|
8
|
+
"sort_property" => @form.valkyrie_presenter? ? "member_ids" : "ordered_member_ids"
|
9
9
|
} do %>
|
10
10
|
<% @form.member_presenters.each do |member| %>
|
11
11
|
<%= render "file_manager_member", node: member %>
|
@@ -4,16 +4,6 @@
|
|
4
4
|
'param-key' => @form.model_name.param_key },
|
5
5
|
multipart: true
|
6
6
|
} do |f| %>
|
7
|
-
<% if f.object.errors.any? %>
|
8
|
-
<div class="alert alert-danger alert-dismissable" role="alert">
|
9
|
-
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
10
|
-
<%= f.object.errors.full_messages_for(:base).send(SimpleForm.error_method) %>
|
11
|
-
<%= render 'form_in_works_error', f: f %>
|
12
|
-
<%= render 'form_ordered_members_error', f: f %>
|
13
|
-
<%= render 'form_collections_error', f: f %>
|
14
|
-
<%= render 'form_visibility_error', f: f %>
|
15
|
-
</div>
|
16
|
-
<% end %>
|
17
7
|
<% if Flipflop.batch_upload? && !f.object.persisted? %>
|
18
8
|
<% provide :metadata_tab do %>
|
19
9
|
<p class="switch-upload-type"><%= t('.batch_upload_hint') %> <%= link_to t('.batch_link'), hyrax.new_batch_upload_path(payload_concern: @form.model.class) %></p>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="form-inline">
|
2
2
|
<%= visibility_badge(Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_EMBARGO) %>
|
3
3
|
<%= f.input :visibility_during_embargo, wrapper: :inline, collection: visibility_options(:restrict), include_blank: false %>
|
4
|
-
<%= f.input :embargo_release_date, wrapper: :inline, input_html: { value: f.object.embargo_release_date || Date.tomorrow, class: 'datepicker' } %>
|
4
|
+
<%= f.input :embargo_release_date, wrapper: :inline, input_html: { value: f.object.embargo_release_date&.to_date || Date.tomorrow, class: 'datepicker' } %>
|
5
5
|
<%= f.input :visibility_after_embargo, wrapper: :inline, collection: visibility_options(:loosen), include_blank: false %>
|
6
6
|
</div>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="form-inline">
|
2
2
|
<%= visibility_badge(Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_LEASE) %>
|
3
3
|
<%= f.input :visibility_during_lease, wrapper: :inline, collection: visibility_options(:loosen), include_blank: false %>
|
4
|
-
<%= f.input :lease_expiration_date, wrapper: :inline, input_html: { value: f.object.lease_expiration_date || Date.tomorrow, class: 'datepicker' } %>
|
4
|
+
<%= f.input :lease_expiration_date, wrapper: :inline, input_html: { value: f.object.lease_expiration_date&.to_date || Date.tomorrow, class: 'datepicker' } %>
|
5
5
|
<%= f.input :visibility_after_lease, wrapper: :inline, collection: visibility_options(:restrict), include_blank: false %>
|
6
6
|
</div>
|
@@ -39,7 +39,7 @@
|
|
39
39
|
<div class="form-inline">
|
40
40
|
<%= f.input :visibility_during_embargo, wrapper: :inline, collection: visibility_options(:restrict), include_blank: false %>
|
41
41
|
<%= t('hyrax.works.form.visibility_until') %>
|
42
|
-
<%= f.date_field :embargo_release_date, wrapper: :inline, value: f.object.embargo_release_date || Date.tomorrow, class: 'datepicker form-control' %>
|
42
|
+
<%= f.date_field :embargo_release_date, wrapper: :inline, value: f.object.embargo_release_date&.to_date || Date.tomorrow, class: 'datepicker form-control' %>
|
43
43
|
<%= f.input :visibility_after_embargo, wrapper: :inline, collection: visibility_options(:loosen), include_blank: false %>
|
44
44
|
</div>
|
45
45
|
</div>
|
@@ -55,7 +55,7 @@
|
|
55
55
|
<div class="form-inline">
|
56
56
|
<%= f.input :visibility_during_lease, wrapper: :inline, collection: visibility_options(:loosen), include_blank: false %>
|
57
57
|
<%= t('hyrax.works.form.visibility_until') %>
|
58
|
-
<%= f.date_field :lease_expiration_date, wrapper: :inline, value: f.object.lease_expiration_date || Date.tomorrow, class: 'datepicker form-control' %>
|
58
|
+
<%= f.date_field :lease_expiration_date, wrapper: :inline, value: f.object.lease_expiration_date&.to_date || Date.tomorrow, class: 'datepicker form-control' %>
|
59
59
|
<%= f.input :visibility_after_lease, wrapper: :inline, collection: visibility_options(:restrict), include_blank: false %>
|
60
60
|
</div>
|
61
61
|
</div>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
<% array_of_ids = presenter.list_of_item_ids_to_display %>
|
3
|
-
<% members = presenter.
|
3
|
+
<% members = presenter.member_presenters(array_of_ids) %>
|
4
4
|
<% if members.present? %>
|
5
5
|
<table class="table table-striped related-files">
|
6
6
|
<thead>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
@curation_concern = Wings::ActiveFedoraConverter.convert(resource: @curation_concern) if
|
3
|
-
@curation_concern.is_a?
|
2
|
+
@curation_concern = ::Wings::ActiveFedoraConverter.convert(resource: @curation_concern) if
|
3
|
+
@curation_concern.is_a?(Hyrax::Resource) && Object.const_defined?("Wings")
|
4
4
|
|
5
5
|
json.extract! @curation_concern, *[:id] + @curation_concern.class.fields.reject { |f| [:has_model].include? f }
|
6
6
|
json.version @curation_concern.try(:etag)
|
@@ -11,8 +11,10 @@
|
|
11
11
|
<%= render 'file_set_title', presenter: @presenter %>
|
12
12
|
</header>
|
13
13
|
|
14
|
-
|
15
|
-
<%= render
|
14
|
+
<% @presenter.show_partials.each do |partial_path| %>
|
15
|
+
<%= render partial_path %>
|
16
|
+
<% end %>
|
17
|
+
|
16
18
|
<%= render 'hyrax/users/activity_log', events: @presenter.events %>
|
17
19
|
</div><!-- /columns second -->
|
18
20
|
</div> <!-- /.row -->
|
@@ -22,4 +24,4 @@
|
|
22
24
|
<span class='hide analytics-event' data-category="file-set-in-collection" data-action="file-set-in-collection-view" data-name="<%= collection_id %>" >
|
23
25
|
<% end %>
|
24
26
|
<span class='hide analytics-event' data-category="file-set-in-work" data-action="file-set-in-work-view" data-name="<%= @presenter.parent.id %>" >
|
25
|
-
<span class='hide analytics-event' data-category="file-set" data-action="file-set-view" data-name="<%= @presenter.id %>" >
|
27
|
+
<span class='hide analytics-event' data-category="file-set" data-action="file-set-view" data-name="<%= @presenter.id %>" >
|
@@ -23,7 +23,7 @@
|
|
23
23
|
<ul class="list-inline collection-highlights-list">
|
24
24
|
<li class="list-inline-item">
|
25
25
|
<%= link_to t('hyrax.homepage.admin_sets.link'),
|
26
|
-
main_app.search_catalog_path(f: {
|
26
|
+
main_app.search_catalog_path(f: { generic_type_sim: ["Collection"]}),
|
27
27
|
class: 'btn btn-secondary' %>
|
28
28
|
</li>
|
29
29
|
</ul>
|
data/chart/hyrax/Chart.yaml
CHANGED
@@ -2,34 +2,38 @@ apiVersion: v2
|
|
2
2
|
name: hyrax
|
3
3
|
description: An open-source, Samvera-powered digital repository system
|
4
4
|
type: application
|
5
|
-
version: 3.
|
5
|
+
version: 3.3.0
|
6
6
|
appVersion: 3.3.0
|
7
7
|
dependencies:
|
8
8
|
- name: fcrepo
|
9
|
-
version: 0.
|
9
|
+
version: 1.0.0
|
10
10
|
repository: oci://ghcr.io/samvera
|
11
11
|
condition: fcrepo.enabled
|
12
12
|
- name: memcached
|
13
|
-
version: 6.
|
14
|
-
repository:
|
13
|
+
version: 6.6.0
|
14
|
+
repository: oci://registry-1.docker.io/bitnamicharts
|
15
15
|
condition: memcached.enabled
|
16
16
|
- name: minio
|
17
|
-
version: 12.
|
18
|
-
repository:
|
17
|
+
version: 12.8.0
|
18
|
+
repository: oci://registry-1.docker.io/bitnamicharts
|
19
19
|
condition: minio.enabled
|
20
20
|
- name: postgresql
|
21
|
-
version: 12.
|
22
|
-
repository:
|
21
|
+
version: 12.9.0
|
22
|
+
repository: oci://registry-1.docker.io/bitnamicharts
|
23
23
|
condition: postgresql.enabled
|
24
24
|
- name: redis
|
25
|
-
version: 17.
|
26
|
-
repository:
|
25
|
+
version: 17.16.0
|
26
|
+
repository: oci://registry-1.docker.io/bitnamicharts
|
27
27
|
condition: redis.enabled
|
28
28
|
- name: solr
|
29
|
-
version:
|
30
|
-
repository:
|
29
|
+
version: 8.0.0
|
30
|
+
repository: oci://registry-1.docker.io/bitnamicharts
|
31
31
|
condition: solr.enabled
|
32
32
|
- name: nginx
|
33
|
-
version:
|
34
|
-
repository:
|
33
|
+
version: 15.2.0
|
34
|
+
repository: oci://registry-1.docker.io/bitnamicharts
|
35
35
|
condition: nginx.enabled
|
36
|
+
- name: fits
|
37
|
+
version: 0.1.0
|
38
|
+
repository: https://samvera-labs.github.io/fits-charts
|
39
|
+
condition: fits.enabled
|
data/chart/hyrax/README.md
CHANGED
@@ -35,28 +35,30 @@ production environments.
|
|
35
35
|
|
36
36
|
The chart populates the following environment variables:
|
37
37
|
|
38
|
-
| Variable | Description | Condition
|
39
|
-
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
38
|
+
| Variable | Description | Condition |
|
39
|
+
|-------------------|--------------------------------|------------------------------------------|
|
40
|
+
| CH12N_TOOL | Tool for characterization | `fits.enabled` or `externalFits.enabled` |
|
41
|
+
| DB_PASSWORD | Postgresql password | n/a |
|
42
|
+
| DB_PORT | Postgresql service port | n/a |
|
43
|
+
| DB_HOST | Postgresql hostname | n/a |
|
44
|
+
| DB_USERNAME | Postgresql username | n/a |
|
45
|
+
| MEMCACHED_HOST | Memcached host | `memcached.enabled` |
|
46
|
+
| RACK_ENV | app environment ('production') | n/a |
|
47
|
+
| RAILS_ENV | app environment ('production') | n/a |
|
48
|
+
| REDIS_HOST | Redis service host | `redis.enabled` |
|
49
|
+
| FCREPO_BASE_PATH | Fedora Commons root path | n/a |
|
50
|
+
| FCREPO_HOST | Fedora Commons host | n/a |
|
51
|
+
| FCREPO_PORT | Fedora Commons port | n/a |
|
52
|
+
| FCREPO_REST_PATH | Fedora Commons REST endpoint | n/a |
|
53
|
+
| FITS_SERVLET_URL | URL for FITS servlet | `fits.enabled` or `externalFits.enabled` |
|
54
|
+
| SKIP_HYRAX_ENGINE_SEED | Flag to load Hyrax engine seed file | n/a |
|
55
|
+
| SOLR_ADMIN_USER | Solr user for basic auth | n/a |
|
56
|
+
| SOLR_ADMIN_PASSWORD | Solr password for basic auth | n/a |
|
57
|
+
| SOLR_COLLECTION_NAME | The name of the solr collection to use | n/a |
|
56
58
|
| SOLR_CONFIGSET_NAME | The name of the solr configset to use for config management tasks | n/a |
|
57
|
-
| SOLR_HOST | Solr service host | n/a
|
58
|
-
| SOLR_PORT | Solr service port | n/a
|
59
|
-
| SOLR_URL | Solr service full URL | n/a
|
59
|
+
| SOLR_HOST | Solr service host | n/a |
|
60
|
+
| SOLR_PORT | Solr service port | n/a |
|
61
|
+
| SOLR_URL | Solr service full URL | n/a |
|
60
62
|
|
61
63
|
## With an external SolrCloud
|
62
64
|
|
@@ -89,6 +91,17 @@ To use an existing or external `fcrepo` instance, use the chart values:
|
|
89
91
|
- `fcrepo.enabled`: false
|
90
92
|
- `externalFcrepoHost`: "myfedora.hostname.example.com"
|
91
93
|
|
94
|
+
|
95
|
+
# Optional Fits Service
|
96
|
+
|
97
|
+
Running fits as a servlet will result in much faster fits responses. This is because the loading cost of the
|
98
|
+
various Java components far out weighs the processing time of those components.
|
99
|
+
|
100
|
+
To enable fits as a service:
|
101
|
+
|
102
|
+
- ``fits.enabled: true` or `externalFits.enabled: true` and specify the
|
103
|
+
existing `externalFits.url`
|
104
|
+
|
92
105
|
## For DevOps:
|
93
106
|
|
94
107
|
For those interested in trying out or contributing to this Chart, it's helpful
|
@@ -86,6 +86,23 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
|
86
86
|
{{- end }}
|
87
87
|
{{- end -}}
|
88
88
|
|
89
|
+
|
90
|
+
{{/*
|
91
|
+
Create default fully qualified service names.
|
92
|
+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
93
|
+
*/}}
|
94
|
+
{{- define "hyrax.fits.fullname" -}}
|
95
|
+
{{- printf "%s-%s" .Release.Name "fits" | trunc 63 | trimSuffix "-" -}}
|
96
|
+
{{- end -}}
|
97
|
+
|
98
|
+
{{- define "hyrax.fits.host" -}}
|
99
|
+
{{- if .Values.fits.enabled }}
|
100
|
+
{{- include "hyrax.fits.fullname" . }}
|
101
|
+
{{- else }}
|
102
|
+
{{- .Values.externalFitsHost | default "NO_FITS_HOST_DEFINED" }}
|
103
|
+
{{- end }}
|
104
|
+
{{- end -}}
|
105
|
+
|
89
106
|
{{- define "hyrax.memcached.fullname" -}}
|
90
107
|
{{- printf "%s-%s" .Release.Name "memcached" | trunc 63 | trimSuffix "-" -}}
|
91
108
|
{{- end -}}
|
@@ -130,6 +147,10 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
|
130
147
|
{{- end }}
|
131
148
|
{{- end -}}
|
132
149
|
|
150
|
+
{{- define "hyrax.postgresql.url" -}}
|
151
|
+
{{- printf "postgresql://%s:%s@%s/%s?pool=5" ( include "hyrax.postgresql.username" . ) ( include "hyrax.postgresql.password" . ) ( include "hyrax.postgresql.host" . ) ( include "hyrax.postgresql.database" . ) -}}
|
152
|
+
{{- end -}}
|
153
|
+
|
133
154
|
{{- define "hyrax.redis.fullname" -}}
|
134
155
|
{{- printf "%s-%s" .Release.Name "redis" | trunc 63 | trimSuffix "-" -}}
|
135
156
|
{{- end -}}
|
@@ -172,7 +193,11 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
|
172
193
|
{{- end -}}
|
173
194
|
|
174
195
|
{{- define "hyrax.solr.port" -}}
|
175
|
-
{{- .Values.
|
196
|
+
{{- if .Values.solr.enabled }}
|
197
|
+
{{- .Values.solr.containerPorts.http | default 8983 }}
|
198
|
+
{{- else }}
|
199
|
+
{{- .Values.externalSolrPort }}
|
200
|
+
{{- end }}
|
176
201
|
{{- end -}}
|
177
202
|
|
178
203
|
{{- define "hyrax.solr.url" -}}
|
@@ -8,8 +8,13 @@ metadata:
|
|
8
8
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
9
9
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
10
10
|
data:
|
11
|
+
{{- if (or .Values.fits.enabled .Values.externalFits.enabled) }}
|
12
|
+
CH12N_TOOL: "fits_servlet"
|
13
|
+
{{- else }}
|
14
|
+
CH12N_TOOL: "fits"
|
15
|
+
{{- end }}
|
11
16
|
DB_HOST: {{ template "hyrax.postgresql.host" . }}
|
12
|
-
DB_PORT:
|
17
|
+
DB_PORT: {{ .Values.postgresql.containerPorts.postgresql | default 5432 | quote }}
|
13
18
|
DB_USERNAME: {{ template "hyrax.postgresql.database" . }}
|
14
19
|
{{- if .Values.memcached.enabled }}
|
15
20
|
MEMCACHED_HOST: {{ template "hyrax.memcached.fullname" . }}
|
@@ -29,6 +34,11 @@ data:
|
|
29
34
|
FCREPO_BASE_PATH: {{ .Values.fcrepoBasePathOverride | default (printf "/%s" (include "hyrax.fullname" .)) | quote }}
|
30
35
|
FCREPO_PORT: {{ .Values.fcrepo.servicePort | default 8080 | quote }}
|
31
36
|
FCREPO_REST_PATH: {{ .Values.fcrepo.restPath | default "rest" }}
|
37
|
+
{{- if .Values.fits.enabled }}
|
38
|
+
FITS_SERVLET_URL: http://{{ template "hyrax.fits.host" . }}:{{ .Values.fits.servicePort | default 8080 }}{{ .Values.fits.subPath | default "/fits" }}
|
39
|
+
{{- else if .Values.externalFits.enabled }}
|
40
|
+
FITS_SERVLET_URL: {{ .Values.externalFits.url }}
|
41
|
+
{{- end }}
|
32
42
|
REDIS_PROVIDER: SIDEKIQ_REDIS_URL
|
33
43
|
{{- if .Values.minio.enabled }}
|
34
44
|
MINIO_ENDPOINT: {{ template "hyrax.minio.fullname" . }}
|
@@ -38,5 +48,5 @@ data:
|
|
38
48
|
SOLR_COLLECTION_NAME: {{ template "hyrax.solr.collectionName" . }}
|
39
49
|
SOLR_CONFIGSET_NAME: {{ template "hyrax.fullname" . }}
|
40
50
|
SOLR_HOST: {{ template "hyrax.solr.host" . }}
|
41
|
-
SOLR_PORT: {{
|
51
|
+
SOLR_PORT: {{ include "hyrax.solr.port" . | quote}}
|
42
52
|
SOLR_URL: {{ template "hyrax.solr.url" . }}
|
@@ -8,7 +8,7 @@ type: Opaque
|
|
8
8
|
data:
|
9
9
|
SECRET_KEY_BASE: {{ randAlphaNum 20 | b64enc | quote }}
|
10
10
|
DB_PASSWORD: {{ include "hyrax.postgresql.password" . | b64enc }}
|
11
|
-
DATABASE_URL: {{
|
11
|
+
DATABASE_URL: {{ include "hyrax.postgresql.url" . | b64enc }}
|
12
12
|
{{- if .Values.minio.enabled }}
|
13
13
|
MINIO_ACCESS_KEY: {{ .Values.minio.auth.rootUser | b64enc}}
|
14
14
|
MINIO_SECRET_KEY: {{ .Values.minio.auth.rootPassword | b64enc}}
|