Skip to content

Commit

Permalink
Merge branch 'main' of github.com:datadryad/dryad-app into 3480-upgra…
Browse files Browse the repository at this point in the history
…de-blacklight-and-solr-to-current-versions
  • Loading branch information
alinvetian committed Dec 6, 2024
2 parents 8ea2b2d + 3c75742 commit 89e05d0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
4 changes: 1 addition & 3 deletions app/controllers/stash_engine/curation_stats_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ class CurationStatsController < ApplicationController

def index
params.permit(:format)

@all_stats = authorize CurationStats.all
@current_stats = authorize CurationStats.where(date: 1.month.ago..Time.now.utc.to_date).order('date DESC')

@admin_stats = authorize StashEngine::AdminDatasetsController::Stats.new, policy_class: CurationStatsPolicy
Expand All @@ -30,7 +28,7 @@ def csv_enumerator
Enumerator.new do |rows|
rows << ['Date', 'Queue size', 'Unclaimed', 'Created', 'New to queue', 'New to PPR', 'PPR to Queue',
'Curation to AAR', 'Curation to published', 'Withdrawn', 'Author revised', 'Author versioned'].to_csv(row_sep: "\r\n")
@all_stats.order(:date).find_each do |stat|
CurationStats.order(:date).find_each do |stat|
row = [
stat.date,
stat.datasets_to_be_curated,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function File({file, clickRemove, clickValidationReport}) {
case TabularCheckStatus.checking:
return (
<>
<i className="fa fa-circle-o-notch fa-spin" aria-hidden="true" />
<i className="fas fa-circle-notch fa-spin" aria-hidden="true" />
<span className="screen-reader-only">Validating...</span>
</>
);
Expand Down
1 change: 1 addition & 0 deletions app/views/layouts/_members_publishers.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<li>Oxford University Press</li>
<li>The Palaeontological Association</li>
<li>The Paleontological Society</li>
<li>PLOS</li>
<li>Rockefeller University Press</li>
<li>Royal Entomological Society</li>
<li>The Royal Society</li>
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/stash_engine_tasks.rake
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,7 @@ namespace :curation_stats do
desc 'Calculate any curation stats that are missing from v2 launch day until yesterday'
task recalculate_all: :environment do
launch_day = Date.new(2019, 9, 17)
(launch_day..Time.now.utc.to_date - 1.day).find_each do |date|
(launch_day..Time.now.utc.to_date - 1.day).each do |date|
print '.'
stats = StashEngine::CurationStats.find_or_create_by(date: date)
stats.recalculate unless stats.created_at > 2.seconds.ago
Expand Down

0 comments on commit 89e05d0

Please sign in to comment.