geoblacklight_admin 0.4.1 → 0.5.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/README.md +10 -55
- data/Rakefile +3 -0
- data/app/assets/javascripts/geoblacklight_admin/chosen.js +7 -3
- data/app/assets/javascripts/geoblacklight_admin/datepicker.js +2 -2
- data/app/assets/javascripts/geoblacklight_admin/inputmask.js +2 -2
- data/app/assets/javascripts/geoblacklight_admin/truncate.js +2 -2
- data/app/assets/javascripts/geoblacklight_admin.js +1 -4
- data/app/assets/stylesheets/geoblacklight_admin/_core.scss +3 -1
- data/app/assets/stylesheets/geoblacklight_admin/modules/_images.scss +4 -0
- data/app/assets/stylesheets/geoblacklight_admin/modules/_nav.scss +4 -0
- data/app/assets/stylesheets/geoblacklight_admin/modules/_results.scss +5 -0
- data/app/controllers/admin/admin_controller.rb +1 -1
- data/app/controllers/admin/advanced_search_controller.rb +0 -1
- data/app/controllers/admin/assets_controller.rb +142 -0
- data/app/controllers/admin/bulk_actions_controller.rb +1 -1
- data/app/controllers/admin/document_accesses_controller.rb +3 -3
- data/app/controllers/admin/document_assets_controller.rb +33 -23
- data/app/controllers/admin/documents_controller.rb +6 -2
- data/app/controllers/admin/ids_controller.rb +0 -1
- data/app/controllers/admin/imports_controller.rb +2 -2
- data/app/helpers/asset_helper.rb +8 -0
- data/app/helpers/document_helper.rb +4 -0
- data/app/helpers/geoblacklight_admin_helper.rb +11 -1
- data/{lib/generators/geoblacklight_admin/templates → app}/javascript/controllers/results_controller.js +38 -0
- data/app/javascript/entrypoints/engine.js +8 -0
- data/app/javascript/index.js +8 -0
- data/app/jobs/bulk_action_revert_document_job.rb +2 -2
- data/app/jobs/bulk_action_run_document_job.rb +5 -1
- data/app/jobs/bulk_action_run_job.rb +11 -1
- data/app/jobs/geoblacklight_admin/delete_thumbnail_job.rb +17 -0
- data/app/jobs/geoblacklight_admin/remove_parent_dct_references_uri_job.rb +16 -0
- data/app/jobs/geoblacklight_admin/set_parent_dct_references_uri_job.rb +19 -0
- data/app/jobs/geoblacklight_admin/store_image_job.rb +21 -2
- data/app/models/asset.rb +38 -0
- data/app/models/blacklight_api.rb +2 -2
- data/app/models/blacklight_api_facets.rb +1 -1
- data/app/models/blacklight_api_ids.rb +2 -2
- data/app/models/bulk_action_document_state_machine.rb +2 -4
- data/app/models/bulk_action_state_machine.rb +3 -3
- data/app/models/bulk_actions/change_publication_state.rb +10 -0
- data/app/models/document/reference.rb +24 -0
- data/app/models/document.rb +122 -11
- data/app/models/document_thumbnail_state_machine.rb +22 -0
- data/app/models/document_thumbnail_transition.rb +26 -0
- data/app/models/element.rb +1 -1
- data/app/models/geoblacklight_admin/field_mappings_btaa_aardvark.rb +7 -1
- data/app/models/geoblacklight_admin/schema.rb +37 -1
- data/app/models/geoblacklight_admin/solr_utils.rb +87 -0
- data/app/models/kithe/vips_cli_image_to_png.rb +114 -0
- data/app/services/geoblacklight_admin/image_service/iiif.rb +2 -2
- data/app/services/geoblacklight_admin/image_service/iiif_manifest.rb +111 -0
- data/app/services/geoblacklight_admin/image_service/tms.rb +50 -0
- data/app/services/geoblacklight_admin/image_service/wms.rb +1 -4
- data/app/services/geoblacklight_admin/image_service.rb +16 -40
- data/app/services/geoblacklight_admin/item_viewer.rb +1 -1
- data/app/uploaders/asset_uploader.rb +6 -11
- data/app/views/admin/assets/_form.html.erb +19 -0
- data/app/views/admin/assets/display_attach_form.html.erb +39 -0
- data/app/views/admin/assets/edit.html.erb +9 -0
- data/app/views/admin/assets/index.html.erb +75 -0
- data/app/views/admin/assets/show.html.erb +100 -0
- data/app/views/admin/bulk_actions/index.html.erb +50 -48
- data/app/views/admin/bulk_actions/show.html.erb +3 -2
- data/app/views/admin/document_accesses/index.html.erb +68 -64
- data/app/views/admin/document_assets/_form.html.erb +17 -0
- data/app/views/admin/document_assets/display_attach_form.html.erb +4 -9
- data/app/views/admin/document_assets/edit.html.erb +5 -0
- data/app/views/admin/document_assets/index.html.erb +88 -72
- data/app/views/admin/document_downloads/index.html.erb +64 -62
- data/app/views/admin/documents/_document.html.erb +37 -16
- data/app/views/admin/documents/_form.html.erb +21 -6
- data/app/views/admin/documents/_form_nav.html.erb +12 -3
- data/app/views/admin/documents/_result_selected_options.html.erb +6 -1
- data/app/views/admin/documents/admin.html.erb +210 -0
- data/app/views/admin/documents/index.html.erb +10 -1
- data/app/views/admin/documents/versions.html.erb +3 -3
- data/app/views/admin/elements/index.html.erb +55 -54
- data/app/views/admin/form_elements/index.html.erb +38 -35
- data/app/views/admin/imports/index.html.erb +52 -50
- data/app/views/admin/layouts/application.html.erb +7 -4
- data/app/views/admin/shared/_js_behaviors.html.erb +6 -3
- data/app/views/admin/shared/_navbar.html.erb +11 -8
- data/config/locales/documents.en.yml +6 -0
- data/config/routes.rb +1 -0
- data/config/vite.json +14 -0
- data/db/migrate/20240619171628_create_document_thumbnail_statesman.rb +18 -0
- data/lib/generators/geoblacklight_admin/config_generator.rb +63 -15
- data/lib/generators/geoblacklight_admin/install_generator.rb +1 -0
- data/lib/generators/geoblacklight_admin/templates/api_controller.rb +0 -2
- data/lib/generators/geoblacklight_admin/templates/base.html.erb +53 -0
- data/lib/generators/geoblacklight_admin/templates/config/initializers/kithe.rb +1 -0
- data/lib/generators/geoblacklight_admin/templates/config/settings.yml +15 -1
- data/lib/generators/geoblacklight_admin/templates/config/vite.json +16 -0
- data/lib/generators/geoblacklight_admin/templates/frontend/entrypoints/application.js +30 -0
- data/lib/generators/geoblacklight_admin/templates/package-test.json +10 -0
- data/lib/generators/geoblacklight_admin/templates/package.json +5 -29
- data/lib/generators/geoblacklight_admin/templates/vite.config.ts +8 -0
- data/lib/geoblacklight_admin/engine.rb +1 -0
- data/lib/geoblacklight_admin/rake_task.rb +5 -0
- data/lib/geoblacklight_admin/tasks/images.rake +33 -0
- data/lib/geoblacklight_admin/tasks/solr.rake +11 -0
- data/lib/geoblacklight_admin/version.rb +1 -1
- metadata +75 -19
- data/lib/generators/geoblacklight_admin/templates/javascript/controllers/application_controller.js +0 -17
- data/lib/generators/geoblacklight_admin/templates/javascript/controllers/document_controller.js +0 -26
- data/lib/generators/geoblacklight_admin/templates/javascript/controllers/index.js +0 -10
- data/lib/tasks/geoblacklight_admin/images.rake +0 -30
- data/lib/tasks/geoblacklight_admin.rake +0 -213
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: geoblacklight_admin
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Eric Larson
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-09-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: active_storage_validations
|
|
@@ -198,14 +198,14 @@ dependencies:
|
|
|
198
198
|
requirements:
|
|
199
199
|
- - "~>"
|
|
200
200
|
- !ruby/object:Gem::Version
|
|
201
|
-
version: '4.
|
|
201
|
+
version: '4.4'
|
|
202
202
|
type: :runtime
|
|
203
203
|
prerelease: false
|
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
|
205
205
|
requirements:
|
|
206
206
|
- - "~>"
|
|
207
207
|
- !ruby/object:Gem::Version
|
|
208
|
-
version: '4.
|
|
208
|
+
version: '4.4'
|
|
209
209
|
- !ruby/object:Gem::Dependency
|
|
210
210
|
name: haml
|
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -310,14 +310,14 @@ dependencies:
|
|
|
310
310
|
requirements:
|
|
311
311
|
- - "~>"
|
|
312
312
|
- !ruby/object:Gem::Version
|
|
313
|
-
version: '
|
|
313
|
+
version: '15.0'
|
|
314
314
|
type: :runtime
|
|
315
315
|
prerelease: false
|
|
316
316
|
version_requirements: !ruby/object:Gem::Requirement
|
|
317
317
|
requirements:
|
|
318
318
|
- - "~>"
|
|
319
319
|
- !ruby/object:Gem::Version
|
|
320
|
-
version: '
|
|
320
|
+
version: '15.0'
|
|
321
321
|
- !ruby/object:Gem::Dependency
|
|
322
322
|
name: pg
|
|
323
323
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -350,22 +350,22 @@ dependencies:
|
|
|
350
350
|
name: rails
|
|
351
351
|
requirement: !ruby/object:Gem::Requirement
|
|
352
352
|
requirements:
|
|
353
|
-
- - "
|
|
353
|
+
- - "~>"
|
|
354
354
|
- !ruby/object:Gem::Version
|
|
355
|
-
version: '
|
|
355
|
+
version: '7.0'
|
|
356
356
|
- - "<"
|
|
357
357
|
- !ruby/object:Gem::Version
|
|
358
|
-
version: '
|
|
358
|
+
version: '8.0'
|
|
359
359
|
type: :runtime
|
|
360
360
|
prerelease: false
|
|
361
361
|
version_requirements: !ruby/object:Gem::Requirement
|
|
362
362
|
requirements:
|
|
363
|
-
- - "
|
|
363
|
+
- - "~>"
|
|
364
364
|
- !ruby/object:Gem::Version
|
|
365
|
-
version: '
|
|
365
|
+
version: '7.0'
|
|
366
366
|
- - "<"
|
|
367
367
|
- !ruby/object:Gem::Version
|
|
368
|
-
version: '
|
|
368
|
+
version: '8.0'
|
|
369
369
|
- !ruby/object:Gem::Dependency
|
|
370
370
|
name: ruby-progressbar
|
|
371
371
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -422,6 +422,34 @@ dependencies:
|
|
|
422
422
|
- - "~>"
|
|
423
423
|
- !ruby/object:Gem::Version
|
|
424
424
|
version: '10.0'
|
|
425
|
+
- !ruby/object:Gem::Dependency
|
|
426
|
+
name: vite_rails
|
|
427
|
+
requirement: !ruby/object:Gem::Requirement
|
|
428
|
+
requirements:
|
|
429
|
+
- - "~>"
|
|
430
|
+
- !ruby/object:Gem::Version
|
|
431
|
+
version: '3.0'
|
|
432
|
+
type: :runtime
|
|
433
|
+
prerelease: false
|
|
434
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
435
|
+
requirements:
|
|
436
|
+
- - "~>"
|
|
437
|
+
- !ruby/object:Gem::Version
|
|
438
|
+
version: '3.0'
|
|
439
|
+
- !ruby/object:Gem::Dependency
|
|
440
|
+
name: vite_ruby
|
|
441
|
+
requirement: !ruby/object:Gem::Requirement
|
|
442
|
+
requirements:
|
|
443
|
+
- - ">="
|
|
444
|
+
- !ruby/object:Gem::Version
|
|
445
|
+
version: '3.5'
|
|
446
|
+
type: :runtime
|
|
447
|
+
prerelease: false
|
|
448
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
449
|
+
requirements:
|
|
450
|
+
- - ">="
|
|
451
|
+
- !ruby/object:Gem::Version
|
|
452
|
+
version: '3.5'
|
|
425
453
|
- !ruby/object:Gem::Dependency
|
|
426
454
|
name: byebug
|
|
427
455
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -741,7 +769,9 @@ files:
|
|
|
741
769
|
- app/assets/stylesheets/geoblacklight_admin/modules/_elements.scss
|
|
742
770
|
- app/assets/stylesheets/geoblacklight_admin/modules/_forms.scss
|
|
743
771
|
- app/assets/stylesheets/geoblacklight_admin/modules/_icons.scss
|
|
772
|
+
- app/assets/stylesheets/geoblacklight_admin/modules/_images.scss
|
|
744
773
|
- app/assets/stylesheets/geoblacklight_admin/modules/_nav.scss
|
|
774
|
+
- app/assets/stylesheets/geoblacklight_admin/modules/_results.scss
|
|
745
775
|
- app/assets/stylesheets/geoblacklight_admin/modules/_tables.scss
|
|
746
776
|
- app/assets/stylesheets/geoblacklight_admin/modules/_toasts.scss
|
|
747
777
|
- app/assets/stylesheets/geoblacklight_admin/modules/_visibility.scss
|
|
@@ -749,6 +779,7 @@ files:
|
|
|
749
779
|
- app/channels/export_channel.rb
|
|
750
780
|
- app/controllers/admin/admin_controller.rb
|
|
751
781
|
- app/controllers/admin/advanced_search_controller.rb
|
|
782
|
+
- app/controllers/admin/assets_controller.rb
|
|
752
783
|
- app/controllers/admin/bookmarks_controller.rb
|
|
753
784
|
- app/controllers/admin/bulk_actions_controller.rb
|
|
754
785
|
- app/controllers/admin/document_accesses_controller.rb
|
|
@@ -764,6 +795,7 @@ files:
|
|
|
764
795
|
- app/controllers/admin/notifications_controller.rb
|
|
765
796
|
- app/controllers/admin/search_controller.rb
|
|
766
797
|
- app/controllers/admin/users_controller.rb
|
|
798
|
+
- app/helpers/asset_helper.rb
|
|
767
799
|
- app/helpers/bulk_actions_helper.rb
|
|
768
800
|
- app/helpers/document_helper.rb
|
|
769
801
|
- app/helpers/form_input_helper.rb
|
|
@@ -771,6 +803,9 @@ files:
|
|
|
771
803
|
- app/helpers/import_documents_helper.rb
|
|
772
804
|
- app/helpers/mappings_helper.rb
|
|
773
805
|
- app/indexers/document_indexer.rb
|
|
806
|
+
- app/javascript/controllers/results_controller.js
|
|
807
|
+
- app/javascript/entrypoints/engine.js
|
|
808
|
+
- app/javascript/index.js
|
|
774
809
|
- app/jobs/bulk_action_collect_documents.rb
|
|
775
810
|
- app/jobs/bulk_action_revert_document_job.rb
|
|
776
811
|
- app/jobs/bulk_action_revert_job.rb
|
|
@@ -779,6 +814,9 @@ files:
|
|
|
779
814
|
- app/jobs/export_job.rb
|
|
780
815
|
- app/jobs/export_json_bulk_job.rb
|
|
781
816
|
- app/jobs/export_json_job.rb
|
|
817
|
+
- app/jobs/geoblacklight_admin/delete_thumbnail_job.rb
|
|
818
|
+
- app/jobs/geoblacklight_admin/remove_parent_dct_references_uri_job.rb
|
|
819
|
+
- app/jobs/geoblacklight_admin/set_parent_dct_references_uri_job.rb
|
|
782
820
|
- app/jobs/geoblacklight_admin/store_image_job.rb
|
|
783
821
|
- app/jobs/import_document_job.rb
|
|
784
822
|
- app/jobs/import_run_job.rb
|
|
@@ -809,6 +847,8 @@ files:
|
|
|
809
847
|
- app/models/document_access.rb
|
|
810
848
|
- app/models/document_download.rb
|
|
811
849
|
- app/models/document_state_machine.rb
|
|
850
|
+
- app/models/document_thumbnail_state_machine.rb
|
|
851
|
+
- app/models/document_thumbnail_transition.rb
|
|
812
852
|
- app/models/document_transition.rb
|
|
813
853
|
- app/models/element.rb
|
|
814
854
|
- app/models/form_control.rb
|
|
@@ -821,6 +861,7 @@ files:
|
|
|
821
861
|
- app/models/geoblacklight_admin/field_mappings_gblv1.rb
|
|
822
862
|
- app/models/geoblacklight_admin/iso_language_codes.rb
|
|
823
863
|
- app/models/geoblacklight_admin/schema.rb
|
|
864
|
+
- app/models/geoblacklight_admin/solr_utils.rb
|
|
824
865
|
- app/models/import.rb
|
|
825
866
|
- app/models/import/csv_duplicates_validator.rb
|
|
826
867
|
- app/models/import/csv_header_validator.rb
|
|
@@ -832,6 +873,7 @@ files:
|
|
|
832
873
|
- app/models/import_gblv1.rb
|
|
833
874
|
- app/models/import_state_machine.rb
|
|
834
875
|
- app/models/import_transition.rb
|
|
876
|
+
- app/models/kithe/vips_cli_image_to_png.rb
|
|
835
877
|
- app/models/mapping.rb
|
|
836
878
|
- app/models/notification.rb
|
|
837
879
|
- app/models/user.rb
|
|
@@ -843,8 +885,10 @@ files:
|
|
|
843
885
|
- app/services/geoblacklight_admin/image_service.rb
|
|
844
886
|
- app/services/geoblacklight_admin/image_service/dynamic_map_layer.rb
|
|
845
887
|
- app/services/geoblacklight_admin/image_service/iiif.rb
|
|
888
|
+
- app/services/geoblacklight_admin/image_service/iiif_manifest.rb
|
|
846
889
|
- app/services/geoblacklight_admin/image_service/image_map_layer.rb
|
|
847
890
|
- app/services/geoblacklight_admin/image_service/tiled_map_layer.rb
|
|
891
|
+
- app/services/geoblacklight_admin/image_service/tms.rb
|
|
848
892
|
- app/services/geoblacklight_admin/image_service/wms.rb
|
|
849
893
|
- app/services/geoblacklight_admin/item_viewer.rb
|
|
850
894
|
- app/services/zip_file_generator.rb
|
|
@@ -854,6 +898,11 @@ files:
|
|
|
854
898
|
- app/views/admin/api/_field.json.jbuilder
|
|
855
899
|
- app/views/admin/api/fetch.json.jbuilder
|
|
856
900
|
- app/views/admin/api/index.json.jbuilder
|
|
901
|
+
- app/views/admin/assets/_form.html.erb
|
|
902
|
+
- app/views/admin/assets/display_attach_form.html.erb
|
|
903
|
+
- app/views/admin/assets/edit.html.erb
|
|
904
|
+
- app/views/admin/assets/index.html.erb
|
|
905
|
+
- app/views/admin/assets/show.html.erb
|
|
857
906
|
- app/views/admin/bookmarks/_bookmark.json.jbuilder
|
|
858
907
|
- app/views/admin/bookmarks/create.js.erb
|
|
859
908
|
- app/views/admin/bookmarks/destroy.js.erb
|
|
@@ -877,7 +926,9 @@ files:
|
|
|
877
926
|
- app/views/admin/document_accesses/new.html.erb
|
|
878
927
|
- app/views/admin/document_accesses/show.html.erb
|
|
879
928
|
- app/views/admin/document_accesses/show.json.jbuilder
|
|
929
|
+
- app/views/admin/document_assets/_form.html.erb
|
|
880
930
|
- app/views/admin/document_assets/display_attach_form.html.erb
|
|
931
|
+
- app/views/admin/document_assets/edit.html.erb
|
|
881
932
|
- app/views/admin/document_assets/index.html.erb
|
|
882
933
|
- app/views/admin/document_downloads/_document_download.json.jbuilder
|
|
883
934
|
- app/views/admin/document_downloads/_form.html.erb
|
|
@@ -908,6 +959,7 @@ files:
|
|
|
908
959
|
- app/views/admin/documents/_result_selected_options.html.erb
|
|
909
960
|
- app/views/admin/documents/_result_selection_options.html.erb
|
|
910
961
|
- app/views/admin/documents/_result_toggle.html.erb
|
|
962
|
+
- app/views/admin/documents/admin.html.erb
|
|
911
963
|
- app/views/admin/documents/edit.html.erb
|
|
912
964
|
- app/views/admin/documents/features/_assets.html.erb
|
|
913
965
|
- app/views/admin/documents/features/_institutional_access_links.html.erb
|
|
@@ -993,8 +1045,10 @@ files:
|
|
|
993
1045
|
- config/locales/geoblacklight.en.yml
|
|
994
1046
|
- config/locales/simple_form.en.yml
|
|
995
1047
|
- config/routes.rb
|
|
1048
|
+
- config/vite.json
|
|
996
1049
|
- db/migrate/20230316183001_add_geoblacklight_admin_gem.rb
|
|
997
1050
|
- db/migrate/20231106215104_bulk_action_sti.rb
|
|
1051
|
+
- db/migrate/20240619171628_create_document_thumbnail_statesman.rb
|
|
998
1052
|
- db/seeds.rb
|
|
999
1053
|
- db/seeds_elements.csv
|
|
1000
1054
|
- db/seeds_elements.numbers
|
|
@@ -1009,6 +1063,7 @@ files:
|
|
|
1009
1063
|
- lib/generators/geoblacklight_admin/templates/_show_sidebar.html.erb
|
|
1010
1064
|
- lib/generators/geoblacklight_admin/templates/_user_util_links.html.erb
|
|
1011
1065
|
- lib/generators/geoblacklight_admin/templates/api_controller.rb
|
|
1066
|
+
- lib/generators/geoblacklight_admin/templates/base.html.erb
|
|
1012
1067
|
- lib/generators/geoblacklight_admin/templates/config/database.yml
|
|
1013
1068
|
- lib/generators/geoblacklight_admin/templates/config/geomg_aardvark_schema.json
|
|
1014
1069
|
- lib/generators/geoblacklight_admin/templates/config/initializers/devise.rb
|
|
@@ -1022,6 +1077,7 @@ files:
|
|
|
1022
1077
|
- lib/generators/geoblacklight_admin/templates/config/initializers/statesman.rb
|
|
1023
1078
|
- lib/generators/geoblacklight_admin/templates/config/settings.yml
|
|
1024
1079
|
- lib/generators/geoblacklight_admin/templates/config/sidekiq.yml
|
|
1080
|
+
- lib/generators/geoblacklight_admin/templates/config/vite.json
|
|
1025
1081
|
- lib/generators/geoblacklight_admin/templates/devise/confirmations/new.html.erb
|
|
1026
1082
|
- lib/generators/geoblacklight_admin/templates/devise/invitations/edit.html.erb
|
|
1027
1083
|
- lib/generators/geoblacklight_admin/templates/devise/invitations/new.html.erb
|
|
@@ -1034,17 +1090,15 @@ files:
|
|
|
1034
1090
|
- lib/generators/geoblacklight_admin/templates/devise/sessions/new.html.erb
|
|
1035
1091
|
- lib/generators/geoblacklight_admin/templates/devise/shared/_links.html.erb
|
|
1036
1092
|
- lib/generators/geoblacklight_admin/templates/devise/unlocks/new.html.erb
|
|
1093
|
+
- lib/generators/geoblacklight_admin/templates/frontend/entrypoints/application.js
|
|
1037
1094
|
- lib/generators/geoblacklight_admin/templates/images/bookmark-regular.svg
|
|
1038
1095
|
- lib/generators/geoblacklight_admin/templates/images/bookmark-solid.svg
|
|
1039
1096
|
- lib/generators/geoblacklight_admin/templates/javascript/channels/consumer.js
|
|
1040
1097
|
- lib/generators/geoblacklight_admin/templates/javascript/channels/export_channel.js
|
|
1041
1098
|
- lib/generators/geoblacklight_admin/templates/javascript/channels/index.js
|
|
1042
|
-
- lib/generators/geoblacklight_admin/templates/javascript/controllers/application_controller.js
|
|
1043
|
-
- lib/generators/geoblacklight_admin/templates/javascript/controllers/document_controller.js
|
|
1044
|
-
- lib/generators/geoblacklight_admin/templates/javascript/controllers/index.js
|
|
1045
|
-
- lib/generators/geoblacklight_admin/templates/javascript/controllers/results_controller.js
|
|
1046
1099
|
- lib/generators/geoblacklight_admin/templates/javascript/packs/application.js
|
|
1047
1100
|
- lib/generators/geoblacklight_admin/templates/javascript/src/js/admin/qa_autocomplete.js
|
|
1101
|
+
- lib/generators/geoblacklight_admin/templates/package-test.json
|
|
1048
1102
|
- lib/generators/geoblacklight_admin/templates/package.json
|
|
1049
1103
|
- lib/generators/geoblacklight_admin/templates/solr/README-geoblacklight-solr-development.txt
|
|
1050
1104
|
- lib/generators/geoblacklight_admin/templates/solr/conf/_rest_managed.json
|
|
@@ -1065,12 +1119,14 @@ files:
|
|
|
1065
1119
|
- lib/generators/geoblacklight_admin/templates/solr/conf/xslt/example_rss.xsl
|
|
1066
1120
|
- lib/generators/geoblacklight_admin/templates/solr/conf/xslt/luke.xsl
|
|
1067
1121
|
- lib/generators/geoblacklight_admin/templates/views/_index_split_default.html.erb
|
|
1122
|
+
- lib/generators/geoblacklight_admin/templates/vite.config.ts
|
|
1068
1123
|
- lib/generators/geoblacklight_admin/views_generator.rb
|
|
1069
1124
|
- lib/geoblacklight_admin.rb
|
|
1070
1125
|
- lib/geoblacklight_admin/engine.rb
|
|
1126
|
+
- lib/geoblacklight_admin/rake_task.rb
|
|
1127
|
+
- lib/geoblacklight_admin/tasks/images.rake
|
|
1128
|
+
- lib/geoblacklight_admin/tasks/solr.rake
|
|
1071
1129
|
- lib/geoblacklight_admin/version.rb
|
|
1072
|
-
- lib/tasks/geoblacklight_admin.rake
|
|
1073
|
-
- lib/tasks/geoblacklight_admin/images.rake
|
|
1074
1130
|
homepage: https://github.com/geobtaa/geoblacklight_admin
|
|
1075
1131
|
licenses:
|
|
1076
1132
|
- MIT
|
|
@@ -1090,7 +1146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
1090
1146
|
- !ruby/object:Gem::Version
|
|
1091
1147
|
version: '0'
|
|
1092
1148
|
requirements: []
|
|
1093
|
-
rubygems_version: 3.
|
|
1149
|
+
rubygems_version: 3.5.9
|
|
1094
1150
|
signing_key:
|
|
1095
1151
|
specification_version: 4
|
|
1096
1152
|
summary: Administrative UI for GeoBlacklight. Built on Kithe.
|
data/lib/generators/geoblacklight_admin/templates/javascript/controllers/application_controller.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Controller } from 'stimulus'
|
|
2
|
-
|
|
3
|
-
/* This is your application's ApplicationController.
|
|
4
|
-
* All StimulusReflex controllers should inherit from this class.
|
|
5
|
-
*
|
|
6
|
-
* Example:
|
|
7
|
-
*
|
|
8
|
-
* import ApplicationController from './application_controller'
|
|
9
|
-
*
|
|
10
|
-
* export default class extends ApplicationController { ... }
|
|
11
|
-
*
|
|
12
|
-
* Learn more at: https://docs.stimulusreflex.com
|
|
13
|
-
*/
|
|
14
|
-
export default class extends Controller {
|
|
15
|
-
connect () {
|
|
16
|
-
}
|
|
17
|
-
}
|
data/lib/generators/geoblacklight_admin/templates/javascript/controllers/document_controller.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// Visit The Stimulus Handbook for more details
|
|
2
|
-
// https://stimulusjs.org/handbook/introduction
|
|
3
|
-
//
|
|
4
|
-
// This example controller works with specially annotated HTML like:
|
|
5
|
-
//
|
|
6
|
-
// <div data-controller="results">
|
|
7
|
-
// <h1 data-target="results.selectAll"></h1>
|
|
8
|
-
// </div>
|
|
9
|
-
|
|
10
|
-
import { Application } from "stimulus"
|
|
11
|
-
import ScrollTo from "stimulus-scroll-to"
|
|
12
|
-
|
|
13
|
-
export default class extends ScrollTo {
|
|
14
|
-
connect() {
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// You can set default options in this getter for all your anchors.
|
|
18
|
-
get defaultOptions () {
|
|
19
|
-
return {
|
|
20
|
-
behavior: 'smooth'
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const application = Application.start()
|
|
26
|
-
application.register("scroll-to", ScrollTo)
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// Load all the controllers within this directory and all subdirectories.
|
|
2
|
-
// Controller files must be named *_controller.js.
|
|
3
|
-
|
|
4
|
-
import { Application } from "stimulus"
|
|
5
|
-
import { definitionsFromContext } from "stimulus/webpack-helpers"
|
|
6
|
-
import controller from './application_controller'
|
|
7
|
-
|
|
8
|
-
const application = Application.start()
|
|
9
|
-
const context = require.context("controllers", true, /_controller\.js$/)
|
|
10
|
-
application.load(definitionsFromContext(context))
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
require "csv"
|
|
2
|
-
|
|
3
|
-
namespace :geoblacklight_admin do
|
|
4
|
-
namespace :images do
|
|
5
|
-
desc "Harvest image for specific document"
|
|
6
|
-
task harvest_doc_id: :environment do
|
|
7
|
-
GeoblacklightAdmin::StoreImageJob.perform_later(ENV["DOC_ID"])
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
desc "Harvest all images"
|
|
11
|
-
task harvest_all: :environment do
|
|
12
|
-
query = "*:*"
|
|
13
|
-
index = Geoblacklight::SolrDocument.index
|
|
14
|
-
results = index.send_and_receive(index.blacklight_config.solr_path,
|
|
15
|
-
q: query,
|
|
16
|
-
fl: "*",
|
|
17
|
-
rows: 100_000_000)
|
|
18
|
-
# num_found = results.response[:numFound]
|
|
19
|
-
# doc_counter = 0
|
|
20
|
-
results.docs.each do |document|
|
|
21
|
-
sleep(1)
|
|
22
|
-
begin
|
|
23
|
-
GeoblacklightAdmin::StoreImageJob.perform_later(document["id"])
|
|
24
|
-
rescue Blacklight::Exceptions::RecordNotFound
|
|
25
|
-
next
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
task stats: :environment do
|
|
4
|
-
Rake::Task["gbl_admin:stats"].invoke
|
|
5
|
-
end
|
|
6
|
-
|
|
7
|
-
namespace :gbl_admin do
|
|
8
|
-
desc "Run Solr and GeoBlacklight for interactive development"
|
|
9
|
-
task :server, [:rails_server_args] do |_t, args|
|
|
10
|
-
require "solr_wrapper"
|
|
11
|
-
SolrWrapper.wrap(port: "8983") do |solr|
|
|
12
|
-
solr.with_collection(name: "blacklight-core",
|
|
13
|
-
dir: File.join(
|
|
14
|
-
File.expand_path(Rails.root, File.dirname(__FILE__)), "solr", "conf"
|
|
15
|
-
)) do
|
|
16
|
-
puts "\nSolr server running: http://localhost:#{solr.port}/solr/#/blacklight-core"
|
|
17
|
-
puts "\n^C to stop"
|
|
18
|
-
puts " "
|
|
19
|
-
begin
|
|
20
|
-
Rake::Task["geoblacklight:solr:seed"].invoke
|
|
21
|
-
system "bundle exec rails s #{args[:rails_server_args]}"
|
|
22
|
-
rescue Interrupt
|
|
23
|
-
puts "Shutting down..."
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
desc "Run test suite"
|
|
31
|
-
task ci: :environment do
|
|
32
|
-
Rails.env = "test"
|
|
33
|
-
shared_solr_opts = {managed: true, verbose: true, persist: false, download_dir: "tmp"}
|
|
34
|
-
shared_solr_opts[:version] = ENV["SOLR_VERSION"] if ENV["SOLR_VERSION"]
|
|
35
|
-
|
|
36
|
-
success = true
|
|
37
|
-
SolrWrapper.wrap(shared_solr_opts.merge(port: 8983, instance_dir: "tmp/blacklight-core")) do |solr|
|
|
38
|
-
solr.with_collection(name: "blacklight-core", dir: Rails.root.join("solr/conf").to_s) do
|
|
39
|
-
system('RAILS_ENV=test TESTOPTS="-v" bundle exec rails test:system test') || success = false
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
exit!(1) unless success
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
namespace :gbl_admin do
|
|
47
|
-
desc "Set everything to published state"
|
|
48
|
-
task publish_all: :environment do
|
|
49
|
-
Document.all.each do |doc|
|
|
50
|
-
doc.publication_state = "Published"
|
|
51
|
-
doc.save
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
puts "\nAll documents published."
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
task production_guard: :environment do
|
|
58
|
-
if Rails.env.production? && ENV["PRODUCTION_OKAY"] != "true"
|
|
59
|
-
warn "\nNot safe for production. If you are sure, run with `PRODUCTION_OKAY=true #{ARGV.join}`\n\n"
|
|
60
|
-
exit 1
|
|
61
|
-
end
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
task stats: :environment do
|
|
65
|
-
require "rails/code_statistics"
|
|
66
|
-
::STATS_DIRECTORIES << ["Indexers", "app/indexers"]
|
|
67
|
-
::STATS_DIRECTORIES << ["Indexers Tests", "test/indexers"]
|
|
68
|
-
CodeStatistics::TEST_TYPES << "Indexers Tests"
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
desc "Run Solr and GBLADMIN for development"
|
|
72
|
-
task server: :environment do
|
|
73
|
-
require "solr_wrapper"
|
|
74
|
-
|
|
75
|
-
shared_solr_opts = {managed: true, verbose: true, persist: false, download_dir: "tmp"}
|
|
76
|
-
shared_solr_opts[:version] = ENV["SOLR_VERSION"] if ENV["SOLR_VERSION"]
|
|
77
|
-
|
|
78
|
-
SolrWrapper.wrap(shared_solr_opts.merge(port: 8983, instance_dir: "tmp/blacklight-core")) do |solr|
|
|
79
|
-
solr.with_collection(name: "blacklight-core", dir: Rails.root.join("solr/conf").to_s) do
|
|
80
|
-
puts "Solr running at http://localhost:8983/solr/blacklight-core/, ^C to exit"
|
|
81
|
-
puts " "
|
|
82
|
-
begin
|
|
83
|
-
# Rake::Task['gbl_admin:solr:restore'].invoke
|
|
84
|
-
system "bundle exec rails s --binding=#{ENV.fetch("GEOMG_SERVER_BIND_INTERFACE",
|
|
85
|
-
"0.0.0.0")} --port=#{ENV.fetch("GEOMG_SERVER_PORT",
|
|
86
|
-
"3000")}"
|
|
87
|
-
sleep
|
|
88
|
-
rescue Interrupt
|
|
89
|
-
puts "\nShutting down..."
|
|
90
|
-
end
|
|
91
|
-
end
|
|
92
|
-
end
|
|
93
|
-
end
|
|
94
|
-
|
|
95
|
-
desc "Start solr server for testing."
|
|
96
|
-
task test: :environment do
|
|
97
|
-
if Rails.env.test?
|
|
98
|
-
shared_solr_opts = {managed: true, verbose: true, persist: false, download_dir: "tmp"}
|
|
99
|
-
shared_solr_opts[:version] = ENV["SOLR_VERSION"] if ENV["SOLR_VERSION"]
|
|
100
|
-
|
|
101
|
-
SolrWrapper.wrap(shared_solr_opts.merge(port: 8983, instance_dir: "tmp/blacklight-core")) do |solr|
|
|
102
|
-
solr.with_collection(name: "blacklight-core", dir: Rails.root.join("solr/conf").to_s) do
|
|
103
|
-
puts "Solr running at http://localhost:8983/solr/#/blacklight-core/, ^C to exit"
|
|
104
|
-
begin
|
|
105
|
-
Rake::Task["db:fixtures:load"].invoke
|
|
106
|
-
# Rake::Task["gbl_admin:solr:reindex"].invoke
|
|
107
|
-
sleep
|
|
108
|
-
rescue Interrupt
|
|
109
|
-
puts "\nShutting down..."
|
|
110
|
-
end
|
|
111
|
-
end
|
|
112
|
-
end
|
|
113
|
-
else
|
|
114
|
-
system("rake gbl_admin:test RAILS_ENV=test")
|
|
115
|
-
end
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
desc "Start solr server for development."
|
|
119
|
-
task :development do
|
|
120
|
-
shared_solr_opts = {managed: true, verbose: true, persist: false, download_dir: "tmp"}
|
|
121
|
-
shared_solr_opts[:version] = ENV["SOLR_VERSION"] if ENV["SOLR_VERSION"]
|
|
122
|
-
|
|
123
|
-
SolrWrapper.wrap(shared_solr_opts.merge(port: 8983, instance_dir: "tmp/blacklight-core")) do |solr|
|
|
124
|
-
solr.with_collection(name: "blacklight-core", dir: Rails.root.join("solr", "conf").to_s) do
|
|
125
|
-
puts "Solr running at http://localhost:8983/solr/#/blacklight-core/, ^C to exit"
|
|
126
|
-
begin
|
|
127
|
-
# Rake::Task['geoblacklight:solr:seed'].invoke
|
|
128
|
-
sleep
|
|
129
|
-
rescue Interrupt
|
|
130
|
-
puts "\nShutting down..."
|
|
131
|
-
end
|
|
132
|
-
end
|
|
133
|
-
end
|
|
134
|
-
end
|
|
135
|
-
|
|
136
|
-
namespace :solr do
|
|
137
|
-
desc "sync all Works and Collections to solr index"
|
|
138
|
-
task reindex: :environment do
|
|
139
|
-
Kithe::Indexable.index_with(batching: true) do
|
|
140
|
-
progress_bar = ProgressBar.create(total: Document.count, format: Kithe::STANDARD_PROGRESS_BAR_FORMAT)
|
|
141
|
-
|
|
142
|
-
scope = Kithe::Model.where(kithe_model_type: 1)
|
|
143
|
-
|
|
144
|
-
scope.find_each do |model|
|
|
145
|
-
progress_bar.title = "#{model.class.name}:#{model.friendlier_id}"
|
|
146
|
-
model.update_index
|
|
147
|
-
progress_bar.increment
|
|
148
|
-
end
|
|
149
|
-
end
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
desc "delete any model objects in solr that no longer exist in the db"
|
|
153
|
-
task delete_orphans: :environment do
|
|
154
|
-
deleted_ids = Kithe::SolrUtil.delete_solr_orphans
|
|
155
|
-
puts "Deleted #{deleted_ids.count} Solr objects"
|
|
156
|
-
end
|
|
157
|
-
|
|
158
|
-
desc "delete ALL items from Solr"
|
|
159
|
-
task delete_all: %i[environment production_guard] do
|
|
160
|
-
Kithe::SolrUtil.delete_all
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
desc "print out mapped index hash for specified ID, eg rake scihist:solr:debug_indexing[adf232adf]"
|
|
164
|
-
task :debug_indexing, [:friendlier_id] => [:environment] do |_t, args|
|
|
165
|
-
Kithe::Model.find_by(friendlier_id: args[:friendlier_id]).update_index(writer: Traject::DebugWriter.new({}))
|
|
166
|
-
end
|
|
167
|
-
|
|
168
|
-
desc "Save - Sanity Check"
|
|
169
|
-
task save_check: :environment do
|
|
170
|
-
@steps = 0
|
|
171
|
-
Document.in_batches(of: 1000).each do |relation|
|
|
172
|
-
relation.each do |doc|
|
|
173
|
-
# Reindex doc
|
|
174
|
-
doc.save
|
|
175
|
-
rescue
|
|
176
|
-
puts "Save Failed: #{doc.id}\n"
|
|
177
|
-
end
|
|
178
|
-
|
|
179
|
-
@steps += relation.count
|
|
180
|
-
puts "Docs Saved: #{@steps}"
|
|
181
|
-
end
|
|
182
|
-
end
|
|
183
|
-
|
|
184
|
-
desc "Backup - Create a Solr snapshot"
|
|
185
|
-
task backup: :environment do
|
|
186
|
-
solr = ENV["SOLR_URL"]
|
|
187
|
-
replication = "replication?command=backup"
|
|
188
|
-
|
|
189
|
-
res = Faraday.get "#{solr}/#{replication}"
|
|
190
|
-
puts res.body
|
|
191
|
-
|
|
192
|
-
sleep(10)
|
|
193
|
-
|
|
194
|
-
snapshots = Dir.glob(Rails.root.join("tmp/geoportal-core-development/server/solr/geoportal-core-development/data/snapshot.*").to_s)
|
|
195
|
-
|
|
196
|
-
FileUtils.cp_r(snapshots, Rails.root.join("solr/snapshots").to_s)
|
|
197
|
-
end
|
|
198
|
-
|
|
199
|
-
desc "Restore Backup"
|
|
200
|
-
task restore: :environment do
|
|
201
|
-
solr = ENV["SOLR_URL"]
|
|
202
|
-
replication = "replication?command=restore"
|
|
203
|
-
|
|
204
|
-
snapshot = Dir.glob(Rails.root.join("solr/snapshots/snapshot.*").to_s).last
|
|
205
|
-
|
|
206
|
-
FileUtils.cp_r(snapshot,
|
|
207
|
-
Rails.root.join("tmp/geoportal-core-development/server/solr/geoportal-core-development/data").to_s)
|
|
208
|
-
|
|
209
|
-
res = Faraday.get "#{solr}/#{replication}"
|
|
210
|
-
puts res.body
|
|
211
|
-
end
|
|
212
|
-
end
|
|
213
|
-
end
|