zizia 5.2.0 → 5.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +26 -4
- data/app/controllers/zizia/csv_import_details_controller.rb +1 -1
- data/app/views/zizia/csv_import_details/_pre_ingest_files_table.html.erb +27 -22
- data/app/views/zizia/csv_import_details/show.html.erb +2 -1
- data/app/views/zizia/csv_imports/_record_count.html.erb +1 -1
- data/lib/zizia/version.rb +1 -1
- data/spec/dummy/spec/system/csv_import_details_page_spec.rb +22 -1
- data/spec/dummy/spec/system/import_csv_with_warnings_spec.rb +1 -1
- data/spec/dummy/spec/system/import_from_csv_spec.rb +5 -5
- data/spec/factories/pre_ingest_work.rb +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fdda0863d2774964998749599636d9f063f890c02c6458741c617669d54ee35
|
4
|
+
data.tar.gz: a354eba60184b5c0c8e855eff44a8175072078373df2ddf77830fa9b200b1c60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29b861f2b65d2c96c9479ab62476ea6c9d660f26dc8ddf37422d06fd53cf6d65ed15ea01bb52c017d4be3af8f99c8a23fc0e1d91b5d3fb1a53187280f674fb20
|
7
|
+
data.tar.gz: 2e5143ea56f9a584f2a3e8ac7fc4f4ba4dd38c7514678e9a149371fb474b03e494617fa7638b95e011c4c05f94864405e623ba133d5d960da71d6686eb472702
|
data/CHANGELOG.md
CHANGED
@@ -1,15 +1,37 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## [5.1.0](https://github.com/curationexperts/zizia/tree/5.1.0) (2019-11-
|
3
|
+
## [5.1.0](https://github.com/curationexperts/zizia/tree/5.1.0) (2019-11-11)
|
4
4
|
|
5
|
-
[Full Changelog](https://github.com/curationexperts/zizia/compare/v5.0
|
5
|
+
[Full Changelog](https://github.com/curationexperts/zizia/compare/v5.2.0...5.1.0)
|
6
|
+
|
7
|
+
**Merged pull requests:**
|
8
|
+
|
9
|
+
- Toggle files table [\#63](https://github.com/curationexperts/zizia/pull/63) ([little9](https://github.com/little9))
|
10
|
+
- Paginate PreIngestWorks [\#62](https://github.com/curationexperts/zizia/pull/62) ([little9](https://github.com/little9))
|
11
|
+
- Change count language on preview screen [\#61](https://github.com/curationexperts/zizia/pull/61) ([little9](https://github.com/little9))
|
12
|
+
|
13
|
+
## [v5.2.0](https://github.com/curationexperts/zizia/tree/v5.2.0) (2019-11-06)
|
14
|
+
|
15
|
+
[Full Changelog](https://github.com/curationexperts/zizia/compare/v5.1.0...v5.2.0)
|
16
|
+
|
17
|
+
**Merged pull requests:**
|
18
|
+
|
19
|
+
- Update README to include requiring zizia in the application.rb file [\#60](https://github.com/curationexperts/zizia/pull/60) ([little9](https://github.com/little9))
|
20
|
+
- Remove contrainst from dedupekey [\#59](https://github.com/curationexperts/zizia/pull/59) ([little9](https://github.com/little9))
|
21
|
+
- Make deduplication\_key a unique field in the database [\#57](https://github.com/curationexperts/zizia/pull/57) ([little9](https://github.com/little9))
|
22
|
+
- Add works to batch UI [\#56](https://github.com/curationexperts/zizia/pull/56) ([little9](https://github.com/little9))
|
23
|
+
- Update test solr & fedora to latest known good versions [\#55](https://github.com/curationexperts/zizia/pull/55) ([mark-dce](https://github.com/mark-dce))
|
24
|
+
|
25
|
+
## [v5.1.0](https://github.com/curationexperts/zizia/tree/v5.1.0) (2019-11-04)
|
26
|
+
|
27
|
+
[Full Changelog](https://github.com/curationexperts/zizia/compare/v5.0.1...v5.1.0)
|
6
28
|
|
7
29
|
**Merged pull requests:**
|
8
30
|
|
9
31
|
- Add ability to toggle your imports [\#54](https://github.com/curationexperts/zizia/pull/54) ([little9](https://github.com/little9))
|
10
32
|
- Add deduplication\_key to Zizia::PreIngestWork model [\#53](https://github.com/curationexperts/zizia/pull/53) ([bess](https://github.com/bess))
|
11
|
-
- Initial batch sorting [\#52](https://github.com/curationexperts/zizia/pull/52) ([little9](https://github.com/little9))
|
12
|
-
-
|
33
|
+
- WIP: Initial batch sorting [\#52](https://github.com/curationexperts/zizia/pull/52) ([little9](https://github.com/little9))
|
34
|
+
- Show more info on batch page [\#51](https://github.com/curationexperts/zizia/pull/51) ([little9](https://github.com/little9))
|
13
35
|
- Only show the basename for PreIngestFile [\#50](https://github.com/curationexperts/zizia/pull/50) ([little9](https://github.com/little9))
|
14
36
|
- Add Date to details page [\#49](https://github.com/curationexperts/zizia/pull/49) ([little9](https://github.com/little9))
|
15
37
|
- Set import details pagination to 10 [\#48](https://github.com/curationexperts/zizia/pull/48) ([little9](https://github.com/little9))
|
@@ -2,7 +2,6 @@
|
|
2
2
|
module Zizia
|
3
3
|
class CsvImportDetailsController < ApplicationController
|
4
4
|
helper_method :sort_column, :sort_direction, :user
|
5
|
-
|
6
5
|
load_and_authorize_resource
|
7
6
|
with_themed_layout 'dashboard'
|
8
7
|
|
@@ -20,6 +19,7 @@ module Zizia
|
|
20
19
|
def show
|
21
20
|
@csv_import_detail = Zizia::CsvImportDetail
|
22
21
|
.find(csv_import_detail_params[:id])
|
22
|
+
@pre_ingest_works = Kaminari.paginate_array(@csv_import_detail.pre_ingest_works, total_count: @csv_import_detail.pre_ingest_works.count).page(csv_import_detail_params[:page]).per(10)
|
23
23
|
end
|
24
24
|
|
25
25
|
private
|
@@ -1,24 +1,29 @@
|
|
1
|
-
<
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
<th>Date Created</th>
|
7
|
-
</tr>
|
8
|
-
<% pre_ingest_work.pre_ingest_files.each do |pre_ingest_file| %>
|
1
|
+
<div class="pre-ingest-file-table">
|
2
|
+
<a class="btn btn-primary" data-toggle="collapse" href="#files-table-<%= pre_ingest_work.id %>" role="button" aria-expanded="false" aria-controls="files-table-<%= pre_ingest_work.id %>">
|
3
|
+
View Files
|
4
|
+
</a>
|
5
|
+
<table id="files-table-<%= pre_ingest_work.id %>" class="responsive collapse nowrap table table-striped works-list">
|
9
6
|
<tr>
|
10
|
-
<
|
11
|
-
|
12
|
-
</
|
13
|
-
<
|
14
|
-
<%= number_to_human_size(pre_ingest_file.size) %>
|
15
|
-
</td>
|
16
|
-
<td>
|
17
|
-
<%= pre_ingest_file.row_number %>
|
18
|
-
</td>
|
19
|
-
<td>
|
20
|
-
<%= pre_ingest_file.created_at.strftime("%B %-d, %Y %H:%M") %>
|
21
|
-
</td>
|
7
|
+
<th>Filename</th>
|
8
|
+
<th>Size</th>
|
9
|
+
<th>Row Number</th>
|
10
|
+
<th>Date Created</th>
|
22
11
|
</tr>
|
23
|
-
|
24
|
-
|
12
|
+
<% pre_ingest_work.pre_ingest_files.each do |pre_ingest_file| %>
|
13
|
+
<tr>
|
14
|
+
<td>
|
15
|
+
<%= pre_ingest_file.basename %>
|
16
|
+
</td>
|
17
|
+
<td>
|
18
|
+
<%= number_to_human_size(pre_ingest_file.size) %>
|
19
|
+
</td>
|
20
|
+
<td>
|
21
|
+
<%= pre_ingest_file.row_number %>
|
22
|
+
</td>
|
23
|
+
<td>
|
24
|
+
<%= pre_ingest_file.created_at.strftime("%B %-d, %Y %H:%M") %>
|
25
|
+
</td>
|
26
|
+
</tr>
|
27
|
+
<% end %>
|
28
|
+
</table>
|
29
|
+
</div>
|
@@ -16,7 +16,7 @@
|
|
16
16
|
<th>Files</th>
|
17
17
|
<th>Date</th>
|
18
18
|
</tr>
|
19
|
-
<% @
|
19
|
+
<% @pre_ingest_works.each do |pre_ingest_work| %>
|
20
20
|
<tr>
|
21
21
|
<td>
|
22
22
|
<%= pre_ingest_work.deduplication_key%>
|
@@ -33,4 +33,5 @@
|
|
33
33
|
</tr>
|
34
34
|
<% end %>
|
35
35
|
</table>
|
36
|
+
<%= paginate @pre_ingest_works %>
|
36
37
|
</div>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div class="row">
|
2
2
|
<div class="col-md-8">
|
3
3
|
<div class="alert alert-success">
|
4
|
-
<p> This import will
|
4
|
+
<p> This import will process <%= @csv_import.manifest_records %> row(s). </p>
|
5
5
|
</div>
|
6
6
|
</div>
|
7
7
|
</div>
|
data/lib/zizia/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'rails_helper'
|
2
2
|
include Warden::Test::Helpers
|
3
3
|
|
4
|
-
RSpec.describe 'viewing the csv import detail page' do
|
4
|
+
RSpec.describe 'viewing the csv import detail page', js: true do
|
5
5
|
let(:user) { FactoryBot.create(:admin, email: 'systems@curationexperts.com')}
|
6
6
|
let(:second_user) { FactoryBot.create(:user, email: 'user@curationexperts.com') }
|
7
7
|
let(:csv_import) { FactoryBot.create(:csv_import) }
|
@@ -9,6 +9,8 @@ RSpec.describe 'viewing the csv import detail page' do
|
|
9
9
|
let(:csv_import_detail) { FactoryBot.create_list(:csv_import_detail, 12, created_at: Time.parse('Tue, 29 Oct 2019 14:20:02 UTC +00:00').utc, depositor_id: user.id) }
|
10
10
|
let(:csv_import_detail_second) { FactoryBot.create(:csv_import_detail, created_at: Time.parse('Thur, 31 Oct 2019 14:20:02 UTC +00:00').utc, status: 'zippy', update_actor_stack: 'ZiziaTesting', depositor_id: user.id) }
|
11
11
|
let(:csv_import_detail_third) { FactoryBot.create(:csv_import_detail, created_at: Time.parse('Wed, 30 Oct 2019 14:20:02 UTC +00:00').utc, depositor_id: second_user.id, csv_import_id: 2) }
|
12
|
+
let(:csv_pre_ingest_works) { FactoryBot.create_list(:pre_ingest_work, 12, csv_import_detail_id: 4) }
|
13
|
+
let(:csv_pre_ingest_work_second) { FactoryBot.create(:pre_ingest_work, csv_import_detail_id: 5, created_at: Time.parse('Thur, 31 Oct 2019 14:20:02 UTC +00:00').utc) }
|
12
14
|
|
13
15
|
before do
|
14
16
|
user.save
|
@@ -23,6 +25,8 @@ RSpec.describe 'viewing the csv import detail page' do
|
|
23
25
|
csv_import_detail.each(&:save)
|
24
26
|
csv_import_detail_second.save
|
25
27
|
csv_import_detail_third.save
|
28
|
+
csv_pre_ingest_works.each(&:save)
|
29
|
+
csv_pre_ingest_work_second.save
|
26
30
|
login_as user
|
27
31
|
end
|
28
32
|
|
@@ -113,4 +117,21 @@ RSpec.describe 'viewing the csv import detail page' do
|
|
113
117
|
click_on 'View All Imports'
|
114
118
|
expect(page).to have_content('user@curationexperts.com')
|
115
119
|
end
|
120
|
+
|
121
|
+
it 'has pagination for PreIngestWorks at 10' do
|
122
|
+
visit('/csv_import_details/index')
|
123
|
+
click_on '4'
|
124
|
+
expect(page).to have_content 'Next'
|
125
|
+
click_on 'Next'
|
126
|
+
expect(page).to have_content 'Previous'
|
127
|
+
end
|
128
|
+
|
129
|
+
it 'can hide/show a PreIngestFiles table' do
|
130
|
+
visit('/csv_import_details/index')
|
131
|
+
click_on '5'
|
132
|
+
expect(page).to have_content 'View Files'
|
133
|
+
expect(page).not_to have_content 'Row Number'
|
134
|
+
click_on 'View Files'
|
135
|
+
expect(page).to have_content 'Row Number'
|
136
|
+
end
|
116
137
|
end
|
@@ -31,7 +31,7 @@ RSpec.describe 'Importing records from a CSV file', type: :system, js: true do
|
|
31
31
|
# We expect to see the title of the collection on the page
|
32
32
|
expect(page).to have_content 'Testing Collection'
|
33
33
|
|
34
|
-
expect(page).to have_content 'This import will
|
34
|
+
expect(page).to have_content 'This import will process 3 row(s).'
|
35
35
|
|
36
36
|
# There is a link so the user can cancel.
|
37
37
|
expect(page).to have_link 'Cancel', href: '/csv_imports/new?locale=en'
|
@@ -54,7 +54,7 @@ RSpec.describe 'Importing records from a CSV file', :perform_jobs, :clean, type:
|
|
54
54
|
# We expect to see the title of the collection on the page
|
55
55
|
expect(page).to have_content 'Testing Collection'
|
56
56
|
|
57
|
-
expect(page).to have_content 'This import will
|
57
|
+
expect(page).to have_content 'This import will process 1 row(s).'
|
58
58
|
|
59
59
|
# There is a link so the user can cancel.
|
60
60
|
expect(page).to have_link 'Cancel', href: '/csv_imports/new?locale=en'
|
@@ -116,7 +116,7 @@ RSpec.describe 'Importing records from a CSV file', :perform_jobs, :clean, type:
|
|
116
116
|
# We expect to see the title of the collection on the page
|
117
117
|
expect(page).to have_content 'Testing Collection'
|
118
118
|
|
119
|
-
expect(page).to have_content 'This import will
|
119
|
+
expect(page).to have_content 'This import will process 1 row(s).'
|
120
120
|
# There is a link so the user can cancel.
|
121
121
|
expect(page).to have_link 'Cancel', href: '/csv_imports/new?locale=en'
|
122
122
|
|
@@ -171,7 +171,7 @@ RSpec.describe 'Importing records from a CSV file', :perform_jobs, :clean, type:
|
|
171
171
|
# We expect to see the title of the collection on the page
|
172
172
|
expect(page).to have_content 'Testing Collection'
|
173
173
|
|
174
|
-
expect(page).to have_content 'This import will
|
174
|
+
expect(page).to have_content 'This import will process 2 row(s).'
|
175
175
|
|
176
176
|
# There is a link so the user can cancel.
|
177
177
|
expect(page).to have_link 'Cancel', href: '/csv_imports/new?locale=en'
|
@@ -218,8 +218,7 @@ RSpec.describe 'Importing records from a CSV file', :perform_jobs, :clean, type:
|
|
218
218
|
# We expect to see the title of the collection on the page
|
219
219
|
expect(page).to have_content 'Testing Collection'
|
220
220
|
|
221
|
-
expect(page).to have_content 'This import will
|
222
|
-
|
221
|
+
expect(page).to have_content 'This import will process 1 row(s).'
|
223
222
|
# There is a link so the user can cancel.
|
224
223
|
expect(page).to have_link 'Cancel', href: '/csv_imports/new?locale=en'
|
225
224
|
|
@@ -247,6 +246,7 @@ RSpec.describe 'Importing records from a CSV file', :perform_jobs, :clean, type:
|
|
247
246
|
visit "/csv_import_details/index"
|
248
247
|
expect(page).to have_content('Total Size')
|
249
248
|
click_on '4'
|
249
|
+
click_on 'View Files'
|
250
250
|
expect(page).to have_content('dog.jpg')
|
251
251
|
expect(page).to have_content('cat.jpg')
|
252
252
|
expect(page).to have_content('5.74 MB')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zizia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Data Curation Experts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active-fedora
|