From cb0010913f7260b7fa9b97238611bf381277098f Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 17 Jun 2019 10:35:44 +0800 Subject: [PATCH] =?UTF-8?q?vnc=E5=9F=9F=E5=90=8D=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/games_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/games_service.rb b/app/services/games_service.rb index f513316e..d732bb48 100644 --- a/app/services/games_service.rb +++ b/app/services/games_service.rb @@ -80,14 +80,14 @@ class GamesService if shixun.vnc begin shixun_tomcat = Redmine::Configuration['shixun_tomcat'] - service_host = Redmine::Configuration['tomcat_php'] + service_host = Redmine::Configuration['vnc_url'] uri = "#{shixun_tomcat}/bridge/vnc/getvnc" params = {tpiID: myshixun.id, :containers => "#{Base64.urlsafe_encode64(container_limit(shixun.mirror_repositories))}"} res = uri_exec uri, params if res && res['code'].to_i != 0 raise("实训云平台繁忙(繁忙等级:99)") end - url = "#{service_host}" +":#{res['port']}/vnc_lite.html?password=headless" + url = "https://#{res['port']}.#{service_host}/vnc_lite.html?password=headless" Rails.logger.info("66666666sssssss#{url}") container = container.merge(:vnc_url => url) Rails.logger.info("777777666sssssss#{container}")