forked from Gitlink/forgeplus
群智熵分析报表接口调整
This commit is contained in:
parent
f59ab5bcf1
commit
46da5a0d84
|
@ -66,9 +66,9 @@ module ProjectsHelper
|
|||
jianmu_devops: jianmu_devops_code(project, user),
|
||||
jianmu_devops_url: jianmu_devops_url,
|
||||
cloud_ide_saas_url: cloud_ide_saas_url(user),
|
||||
ai_shang_v1_url: ai_shang_url(project,"v1"),
|
||||
ai_shang_v2_url: ai_shang_url(project,"v2"),
|
||||
ai_shang_v3_url: ai_shang_v3_url(project,"v3"),
|
||||
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
|
||||
}).compact
|
||||
|
||||
|
@ -141,21 +141,35 @@ module ProjectsHelper
|
|||
"#{saas_url}/oauth/login?product_account_id=PA1001218&tenant_code=TI1001383&oauth_url=#{oauth_url}&token=#{token.value}"
|
||||
end
|
||||
|
||||
def ai_shang_url(project, version)
|
||||
def ai_shang_v1_url(project)
|
||||
url = EduSetting.get("ai_shang_url") || "https://shang.gitlink.org.cn"
|
||||
case project.identifier.to_s.downcase
|
||||
when nil then ""
|
||||
when 'rails' then "#{url}/#{version}/rails/entropy"
|
||||
when 'jittor' then "#{url}/#{version}/jittor/entropy"
|
||||
when 'paddle' then "#{url}/#{version}/Paddle/entropy"
|
||||
when 'vue' then "#{url}/#{version}/vue/entropy"
|
||||
when 'bootstrap' then "#{url}/#{version}/bootstrap/entropy"
|
||||
when 'tensorflow' then "#{url}/#{version}/tensorflow/entropy"
|
||||
when 'rails' then "#{url}/v1/rails/entropy"
|
||||
when 'jittor' then "#{url}/v1/jittor/entropy"
|
||||
when 'paddle' then "#{url}/v1/Paddle/entropy"
|
||||
when 'vue' then "#{url}/v1/vue/entropy"
|
||||
when 'bootstrap' then "#{url}/v1/bootstrap/entropy"
|
||||
when 'tensorflow' then "#{url}/v1/tensorflow/entropy"
|
||||
else ''
|
||||
end
|
||||
end
|
||||
|
||||
def ai_shang_v3_url(project, version)
|
||||
def ai_shang_v2_url(project)
|
||||
url = EduSetting.get("ai_shang_url") || "https://shang.gitlink.org.cn"
|
||||
case project.identifier.to_s.downcase
|
||||
when nil then ""
|
||||
when 'rails' then "#{url}/v2/getMediumData?repo_login=rails&repo_name=rails"
|
||||
when 'jittor' then "#{url}/v2/getMediumData?repo_login=Jittor&repo_name=jittor"
|
||||
when 'paddle' then "#{url}/v2/getMediumData?repo_login=PaddlePaddle&repo_name=Paddle"
|
||||
when 'vue' then "#{url}/v2/getMediumData?repo_login=vuejs&repo_name=vue"
|
||||
when 'bootstrap' then "#{url}/v2/getMediumData?repo_login=twbs&repo_name=bootstrap"
|
||||
when 'tensorflow' then "#{url}/v2/getMediumData?repo_login=tensorflow&repo_name=tensorflow"
|
||||
else ''
|
||||
end
|
||||
end
|
||||
|
||||
def ai_shang_v3_url(project)
|
||||
url = EduSetting.get("ai_shang_v3_url") || "https://entropy.ingress.isa.buaanlsde.cn"
|
||||
case project.identifier.to_s.downcase
|
||||
when nil then ""
|
||||
|
|
Loading…
Reference in New Issue