群智熵分析报表接口调整到项目动态接口

This commit is contained in:
xxq250 2023-02-28 09:26:45 +08:00
parent 46da5a0d84
commit 558d720203
3 changed files with 6 additions and 6 deletions

View File

@ -3,6 +3,6 @@ class Api::V1::Projects::CodeStatsController < Api::V1::BaseController
def index def index
@result_object = Api::V1::Projects::CodeStats::ListService.call(@project, {ref: params[:ref]}, current_user&.gitea_token) @result_object = Api::V1::Projects::CodeStats::ListService.call(@project, {ref: params[:ref]}, current_user&.gitea_token)
puts @result_object # puts @result_object
end end
end end

View File

@ -66,9 +66,6 @@ module ProjectsHelper
jianmu_devops: jianmu_devops_code(project, user), jianmu_devops: jianmu_devops_code(project, user),
jianmu_devops_url: jianmu_devops_url, jianmu_devops_url: jianmu_devops_url,
cloud_ide_saas_url: cloud_ide_saas_url(user), cloud_ide_saas_url: cloud_ide_saas_url(user),
ai_shang_v1_url: ai_shang_v1_url(project),
ai_shang_v2_url: ai_shang_v2_url(project),
ai_shang_v3_url: ai_shang_v3_url(project),
ignore_id: project.ignore_id ignore_id: project.ignore_id
}).compact }).compact

View File

@ -4,11 +4,14 @@ json.change_files @result_object["change_files"]
json.additions @result_object["additions"] json.additions @result_object["additions"]
json.deletions @result_object["deletions"] json.deletions @result_object["deletions"]
json.commit_count_in_all_branches @result_object["commit_count_in_all_branches"] json.commit_count_in_all_branches @result_object["commit_count_in_all_branches"]
json.authors @result_object["authors"].each do |author| json.authors @result_object["authors"].each do |author|
json.author do json.author do
json.partial! 'api/v1/users/commit_user_email', locals: { user: render_cache_commit_author(author), name: author['name'], email: author['email'] } json.partial! 'api/v1/users/commit_user_email', locals: { user: render_cache_commit_author(author), name: author['name'], email: author['email'] }
end end
json.commits author["commits"] json.commits author["commits"]
json.additions author["additions"] json.additions author["additions"]
json.deletions author["deletions"] json.deletions author["deletions"]
end end
json.ai_shang_v1_url ai_shang_v1_url(@project)
json.ai_shang_v2_url ai_shang_v2_url(@project)
json.ai_shang_v3_url ai_shang_v3_url(@project)