vnc免登录

pre_develop
jingquan huang 6 years ago
parent e417fbaeb1
commit 3d49a48107

@ -45,7 +45,7 @@ class GamesService
# 高性能取上一关、下一关
prev_game = Game.prev_identifier(shixun.id, game.myshixun_id, game_challenge.position)
next_game = if current_user.is_certification_teacher || shixun_manager(shixun, current_user) || game.status || shixun.task_pass
next_game = if shixun.vnc || current_user.is_certification_teacher || shixun_manager(shixun, current_user) || game.status || shixun.task_pass
Game.next_game(shixun.id, game.myshixun_id, game_challenge.position).try(:identifier)
end
@ -87,11 +87,12 @@ class GamesService
if res && res['code'].to_i != 0
raise("实训云平台繁忙繁忙等级99")
end
url = service_host +":#{res['port']}/vnc.html"
url = service_host +":#{res['port']}/vnc_lite.html"
container = container.merge(:vnc_url => url, :test => "666")
rescue Exception => e
Rails.logger.error(e.message)
end
container = container.merge(:vnc_url => url)
end

Loading…
Cancel
Save