forked from Trustie/forgeplus
新增:后台管理maven数和pypi数
This commit is contained in:
parent
07cee56b9a
commit
9551b5a462
|
|
@ -67,12 +67,12 @@ class Admins::DashboardsController < Admins::BaseController
|
|||
|
||||
@maven_count = Rails.cache.fetch("dashboardscontroller:platform:maven_count", expires_in: 1.days) do
|
||||
result = ActiveRecord::Base.connection.select_all("SELECT * FROM pm_nexus_statistics where format ='maven' order by id desc limit 1")
|
||||
result.rows[0][:count]
|
||||
result.rows[0][2]
|
||||
end
|
||||
|
||||
@pypi_count = Rails.cache.fetch("dashboardscontroller:platform:pypi_count", expires_in: 1.days) do
|
||||
result = ActiveRecord::Base.connection.select_all("SELECT * FROM pm_nexus_statistics where format ='pypi' order by id desc limit 1")
|
||||
result.rows[0][:count]
|
||||
result = ActiveRecord::Base.connection.select_all("SELECT * FROM pm_nexus_statistics where format ='pypi' order by id desc limit 1")
|
||||
result.rows[0][2]
|
||||
end
|
||||
|
||||
@subject_name = ["用户数", "项目数", "组织数", "Issue数", "Issue评论数", "PR数", "Commit数", "Maven数", "Pypi数"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue