webssh添加gameid关联参数

This commit is contained in:
huang 2017-07-07 14:12:40 +08:00
parent a75f477797
commit f4467bc222
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ class MyshixunsController < ApplicationController
if res && res['code'].to_i != 0
raise("实训云平台繁忙繁忙等级92")
end
render :json => {:host => res['address'], :port => res['port'], :username => username, :password => password}
render :json => {:host => res['address'], :port => res['port'], :username => username, :password => password, :game_id => @myshixun.id}
rescue Exception => e
logger.error(e)
render :json => {:error => e.try(:message)}

View File

@ -77,7 +77,7 @@
if(data.error){
return;
}else{
var html = "<iframe src='http://106.75.96.108:9527?Host=" + data.host + "&Port=" + data.port + "&Username=" + data.username + "&Password=" + data.password + "'" + "style='width:100%;border:0;' id='game_webssh'></iframe>";
var html = "<iframe src='http://106.75.96.108:9527?Host=" + data.host + "&Port=" + data.port + "&Username=" + data.username + "&Password=" + data.password + "&Gameid=" + data.game_id + "'" + "style='width:100%;border:0;' id='game_webssh'></iframe>";
console.log(html);
$("#codotab_con_2").html(html);
var h = $("#games_repository_contents").height() - $("#top_repository").height() - 10;