• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / tigerdata-app / 3f98f228-6ecf-4120-a478-d9932b13e420

23 Oct 2025 09:19PM UTC coverage: 91.178%. Remained the same
3f98f228-6ecf-4120-a478-d9932b13e420

push

circleci

web-flow
Added tooltip to Data Sponsor Field (#2092)

Added 20px to margin to display the tooltip.

ref #2081 


<img width="1219" height="201" alt="Screenshot 2025-10-23 at 2 34 36 PM"
src="https://github.com/user-attachments/assets/d529b85c-a834-4aa3-9456-1ca89e1ec6ac"
/>

Co-authored-by: Precilla Prempeh <pprempeh@princeton.edu>
Co-authored-by: Robert-Anthony Lee-Faison <leefaisonr@users.noreply.github.com>

2739 of 3004 relevant lines covered (91.18%)

757.2 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/app/presenters/project_dashboard_presenter.rb
1
# frozen_string_literal: true
2
class ProjectDashboardPresenter < ProjectShowPresenter
4✔
3
  include ActionView::Helpers::DateHelper
4✔
4

5
  delegate :to_model, :updated_at, to: :project
4✔
6

7
  delegate :data_sponsor, :data_manager, to: :project_metadata
4✔
8

9
  def type
4✔
10
    if storage_performance_expectations["approved"].nil?
368✔
11
      "Requested #{storage_performance_expectations['requested']}"
6✔
12
    else
13
      storage_performance_expectations["approved"]
362✔
14
    end
15
  end
16

17
  def latest_file_list_time
4✔
18
    requests = FileInventoryRequest.where(project_id: project.id).order(completion_time: :desc)
370✔
19
    if requests.empty?
370✔
20
      "No Downloads"
362✔
21
    elsif requests.first.completion_time
8✔
22
      "Prepared #{time_ago_in_words(requests.first.completion_time)} ago"
6✔
23
    else
24
      "Preparing now"
2✔
25
    end
26
  end
27

28
  def last_activity
4✔
29
    if project_metadata.updated_on.nil?
366✔
30
      "Not yet active"
8✔
31
    else
32
      "#{remove_about time_ago_in_words(project_metadata.updated_on)} ago"
358✔
33
    end
34
  end
35

36
  def role(user)
4✔
37
    if data_sponsor == user.uid
364✔
38
      "Sponsor"
104✔
39
    elsif data_manager == user.uid
260✔
40
      "Data Manager"
92✔
41
    else
42
      "Data User"
168✔
43
    end
44
  end
45

46
  # Removes "about" (as in "about 1 month ago") from time_ago_in_words
47
  def remove_about(time_ago)
4✔
48
    time_ago.gsub("about ", "")
358✔
49
  end
50
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc