Class: AdminDashboardGeneralData
- Inherits:
-
AdminDashboardData
- Object
- AdminDashboardData
- AdminDashboardGeneralData
- Defined in:
- app/models/admin_dashboard_general_data.rb
Constant Summary
Constants inherited from AdminDashboardData
AdminDashboardData::GLOBAL_REPORTS, AdminDashboardData::PROBLEM_MESSAGE_PREFIX, AdminDashboardData::SCHEDULED_PROBLEM_STORAGE_KEY
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from AdminDashboardData
add_problem_check, add_problem_message, #as_json, clear_problem_message, clear_problems_started, fetch_problems, fetch_stats, #initialize, problem_message_check, problem_message_key, #problems, problems_started_at, problems_started_key, reports, reset_problem_checks, set_problems_started
Constructor Details
This class inherits a constructor from AdminDashboardData
Class Method Details
.stats_cache_key ⇒ Object
15 16 17 |
# File 'app/models/admin_dashboard_general_data.rb', line 15 def self.stats_cache_key "general-dashboard-data-#{Report::SCHEMA_VERSION}" end |
Instance Method Details
#get_json ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'app/models/admin_dashboard_general_data.rb', line 4 def get_json days_since_update = Discourse.last_commit_date ? ((DateTime.now - Discourse.last_commit_date) / 1.day).to_i : nil { updated_at: Time.zone.now.as_json, discourse_updated_at: Discourse.last_commit_date, release_notes_link: "https://meta.discourse.org/c/announcements/67?tags=release-notes&before=#{days_since_update}", } end |