forked from Trustie/forgeplus
群智熵分析报表接口
This commit is contained in:
parent
6c1f9cabda
commit
f8350c4043
|
@ -66,6 +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"),
|
||||
ignore_id: project.ignore_id
|
||||
}).compact
|
||||
|
||||
|
@ -138,6 +141,34 @@ 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)
|
||||
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"
|
||||
else ''
|
||||
end
|
||||
end
|
||||
|
||||
def ai_shang_v3_url(project, version)
|
||||
url = EduSetting.get("ai_shang_v3_url") || "https://entropy.ingress.isa.buaanlsde.cn"
|
||||
case project.identifier.to_s.downcase
|
||||
when nil then ""
|
||||
when 'rails' then "#{url}/rails/entropy"
|
||||
when 'jittor' then "#{url}/jittor/entropy"
|
||||
when 'paddle' then "#{url}/Paddle/entropy"
|
||||
when 'vue' then "#{url}/vue/entropy"
|
||||
when 'bootstrap' then "#{url}/bootstrap/entropy"
|
||||
when 'tensorflow' then "#{url}/tensorflow/entropy"
|
||||
else ''
|
||||
end
|
||||
end
|
||||
|
||||
def aes_encrypt(key, des_text)
|
||||
# des_text='{"access_key_id":"STS.NTuC9RVmWfJqj3JkcMzPnDf7X","access_key_secret":"E8NxRZWGNxxMfwgt5nFLnBFgg6AzgXCZkSNCyqygLuHM","end_point":"oss-accelerate.aliyuncs.com","security_token":"CAIS8gF1q6Ft5B2yfSjIr5fACIPmu7J20YiaaBX7j2MYdt9Cq6Ocujz2IHhMenVhA+8Wv/02n2hR7PcYlq9IS55VWEqc/VXLaywQo22beIPkl5Gfz95t0e+IewW6Dxr8w7WhAYHQR8/cffGAck3NkjQJr5LxaTSlWS7OU/TL8+kFCO4aRQ6ldzFLKc5LLw950q8gOGDWKOymP2yB4AOSLjIx6lAt2T8vs/7hmZPFukSFtjCglL9J/baWC4O/csxhMK14V9qIx+FsfsLDqnUIs0YWpf0p3P0doGyf54vMWUM05A6dduPS7txkLAJwerjVl1/ADxc0/hqAASXhPeiktbmDjwvnSn4iKcSGQ+xoQB468eHXNdvf13dUlbbE1+JhRi0pZIB2UCtN9oTsLHcwIHt+EJaoMd3+hGwPVmvHSXzECDFHylZ8l/pzTwlE/aCtZyVmI5cZEvmWu2xBa3GRbULo7lLvyeX1cHTVmVWf4Nk6D09PzTU8qlAj","bucket":"edu-bigfiles1","region":"oss-cn-hangzhou","callback_url":"https://data.educoder.net/api/buckets/callback.json","bucket_host":"data.educoder.net"}'
|
||||
# des = OpenSSL::Cipher::Cipher.new('aes-256-ctr')
|
||||
|
|
Loading…
Reference in New Issue