Sha256: eedc9e926b17cec837cf136d6fa76d5be33e8e5420731320fc3d0c12a0738a8e

Contents?: true

Size: 782 Bytes

Versions: 21

Compression:

Stored size: 782 Bytes

Contents

# frozen_string_literal: true
module Hyrax
  module Admin
    class DashboardPresenter
      # @return [Fixnum] the number of currently registered users
      def user_count(start_date, end_date)
        ::User.where(guest: false)
              .where({ created_at: start_date.to_date.beginning_of_day..end_date.to_date.end_of_day })
              .count
      end

      def repository_objects
        @repository_objects ||= Admin::RepositoryObjectPresenter.new
      end

      def repository_growth(start_date, end_date)
        @repository_growth ||= Admin::RepositoryGrowthPresenter.new(start_date, end_date)
      end

      def user_activity(start_date, end_date)
        @user_activity ||= Admin::UserActivityPresenter.new(start_date, end_date)
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
hyrax-5.1.0.pre.beta1 app/presenters/hyrax/admin/dashboard_presenter.rb
hyrax-5.0.4 app/presenters/hyrax/admin/dashboard_presenter.rb
hyrax-5.0.3 app/presenters/hyrax/admin/dashboard_presenter.rb
hyrax-5.0.2 app/presenters/hyrax/admin/dashboard_presenter.rb
hyrax-5.0.1 app/presenters/hyrax/admin/dashboard_presenter.rb
hyrax-5.0.0 app/presenters/hyrax/admin/dashboard_presenter.rb
hyrax-5.0.0.rc3 app/presenters/hyrax/admin/dashboard_presenter.rb
hyrax-5.0.0.rc2 app/presenters/hyrax/admin/dashboard_presenter.rb
hyrax-5.0.0.rc1 app/presenters/hyrax/admin/dashboard_presenter.rb
hyrax-3.6.0 app/presenters/hyrax/admin/dashboard_presenter.rb
hyrax-4.0.0 app/presenters/hyrax/admin/dashboard_presenter.rb
hyrax-4.0.0.rc3 app/presenters/hyrax/admin/dashboard_presenter.rb
hyrax-4.0.0.rc2 app/presenters/hyrax/admin/dashboard_presenter.rb
hyrax-4.0.0.rc1 app/presenters/hyrax/admin/dashboard_presenter.rb
hyrax-3.5.0 app/presenters/hyrax/admin/dashboard_presenter.rb
hyrax-4.0.0.beta2 app/presenters/hyrax/admin/dashboard_presenter.rb
hyrax-3.4.2 app/presenters/hyrax/admin/dashboard_presenter.rb
hyrax-4.0.0.beta1 app/presenters/hyrax/admin/dashboard_presenter.rb
hyrax-3.4.1 app/presenters/hyrax/admin/dashboard_presenter.rb
hyrax-3.4.0 app/presenters/hyrax/admin/dashboard_presenter.rb