vnc webssh多增加一个参数

dev_static
daiao 5 years ago
parent 9cc7bafe54
commit 8aa7d7bd72

@ -962,8 +962,11 @@ class GamesController < ApplicationController
shixun = game.myshixun.shixun
shixun_tomcat = edu_setting('cloud_bridge')
service_host = edu_setting('vnc_url')
tpiGitURL = "#{edu_setting('git_address_domain')}/#{game.myshixun.repo_path}"
uri = "#{shixun_tomcat}/bridge/vnc/getvnc"
params = {tpiID: game.myshixun.id, :containers => "#{Base64.urlsafe_encode64(shixun_container_limit(shixun))}"}
params = {tpiID: game.myshixun.id, :containers => "#{Base64.urlsafe_encode64(shixun_container_limit(shixun))}",
tpiGitURL: tpiGitURL}
res = uri_post uri, params
if res && res['code'].to_i != 0
raise("实训云平台繁忙繁忙等级99")

@ -216,10 +216,11 @@ class MyshixunsController < ApplicationController
old_time = Time.now.to_i
begin
shixun_tomcat = edu_setting('tomcat_webssh')
tpiGitURL = "#{edu_setting('git_address_domain')}/#{@myshixun.repo_path}"
uri = "#{shixun_tomcat}/bridge/webssh/getConnectInfo"
# 由于中间层采用混合云的方式因为local参数表示在有文件生成的实训是在本地生成还是在其他云端生成评测文件
local = @myshixun.shixun.challenges.where.not(show_type: -1).count == 0
params = {tpiID:@myshixun.id, podType:@myshixun.shixun.try(:webssh), local: local,
params = {tpiID:@myshixun.id, podType:@myshixun.shixun.try(:webssh), local: local, tpiGitURL: tpiGitURL,
containers:(Base64.urlsafe_encode64(shixun_container_limit @myshixun.shixun))}
res = uri_post uri, params
if res && res['code'].to_i != 0

Loading…
Cancel
Save