|
|
@ -358,7 +358,7 @@ class MyshixunsController < ApplicationController
|
|
|
|
def vnc
|
|
|
|
def vnc
|
|
|
|
vnc_password = Redmine::Configuration['vnc']
|
|
|
|
vnc_password = Redmine::Configuration['vnc']
|
|
|
|
shixun_tomcat = Redmine::Configuration['shixun_tomcat']
|
|
|
|
shixun_tomcat = Redmine::Configuration['shixun_tomcat']
|
|
|
|
host = Redmine::Configuration['tomcat_php']
|
|
|
|
host = Redmine::Configuration['vnc_url']
|
|
|
|
begin
|
|
|
|
begin
|
|
|
|
uri = "#{shixun_tomcat}/bridge/vnc/getvnc"
|
|
|
|
uri = "#{shixun_tomcat}/bridge/vnc/getvnc"
|
|
|
|
shixun = @myshixun.shixun
|
|
|
|
shixun = @myshixun.shixun
|
|
|
@ -368,7 +368,7 @@ class MyshixunsController < ApplicationController
|
|
|
|
raise("实训云平台繁忙(繁忙等级:99)")
|
|
|
|
raise("实训云平台繁忙(繁忙等级:99)")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
# url = host + ":" + res['port'] + "?password=" + vnc_password
|
|
|
|
# url = host + ":" + res['port'] + "?password=" + vnc_password
|
|
|
|
url = host +":#{res['port']}/vnc.html"
|
|
|
|
url = "https://#{res['port']}.#{host}/vnc.html"
|
|
|
|
render :json => {:url => url}
|
|
|
|
render :json => {:url => url}
|
|
|
|
rescue Exception => e
|
|
|
|
rescue Exception => e
|
|
|
|
logger.error(e)
|
|
|
|
logger.error(e)
|
|
|
|