|
|
|
@ -67,13 +67,19 @@ class GamesController < ApplicationController
|
|
|
|
|
uri = "#{shixun_tomcat}/bridge/vnc/getvnc"
|
|
|
|
|
params = {tpiID: @myshixun.id, :containers => "#{Base64.urlsafe_encode64(shixun_container_limit(@shixun))}"}
|
|
|
|
|
res = uri_post uri, params
|
|
|
|
|
logger.info("###############---- ")
|
|
|
|
|
if res && res['code'].to_i != 0
|
|
|
|
|
raise("实训云平台繁忙(繁忙等级:99)")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if request.subdomain == "pre-newweb"
|
|
|
|
|
# 无域名版本
|
|
|
|
|
#@vnc_url = "http://#{service_host}:#{res['port']}/vnc_lite.html?password=headless"
|
|
|
|
|
@vnc_url = "http://#{service_host}:#{res['port']}/vnc_lite.html?password=headless"
|
|
|
|
|
else
|
|
|
|
|
# 有域名版本
|
|
|
|
|
@vnc_url = "https://#{res['port']}.#{service_host}/vnc_lite.html?password=headless"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
@vnc_evaluate = @shixun.vnc_evaluate
|
|
|
|
|
rescue Exception => e
|
|
|
|
|
Rails.logger.error(e.message)
|
|
|
|
|