pull/105/head
Apex Liu 2018-01-27 01:51:44 +08:00
parent 66a9e87038
commit d4a0b4a596
4 changed files with 13 additions and 4 deletions

View File

@ -668,6 +668,7 @@ void TsHttpRpc::_rpc_func_run_client(const ex_astr& func_args, ex_astr& buf)
ex_wstr rdp_name = g_cfg.rdp_name;
if (rdp_name == L"mstsc") {
// w_exe_path += g_cfg.rdp_cmdline;
int width = 0;
int higth = 0;
int cx = 0;
@ -754,6 +755,9 @@ void TsHttpRpc::_rpc_func_run_client(const ex_astr& func_args, ex_astr& buf)
ex_replace_all(w_exe_path, _T("{tmp_rdp_file}"), tmp_rdp_file);
}
else if (g_cfg.rdp_name == L"freerdp") {
// w_exe_path += L"{size} {console} {clipboard} {drives} ";
// w_exe_path += g_cfg.rdp_cmdline;
ex_wstr w_screen;
if (rdp_w == 0 || rdp_h == 0) {
@ -785,12 +789,14 @@ void TsHttpRpc::_rpc_func_run_client(const ex_astr& func_args, ex_astr& buf)
w_sid = L"02" + w_sid;
w_exe_path += L" /gdi:sw"; // 使用软件渲染gdi:hw使用硬件加速但是会出现很多黑块录像回放时又是正常的
w_exe_path += L" -grab-keyboard"; // 防止启动FreeRDP后失去本地键盘响应必须得先最小化一下FreeRDP窗口不过貌似不起作用
//w_exe_path += L" -grab-keyboard"; // [new style] 防止启动FreeRDP后失去本地键盘响应必须得先最小化一下FreeRDP窗口不过貌似不起作用
//w_exe_path += L" -K"; // [old style] 防止启动FreeRDP后失去本地键盘响应必须得先最小化一下FreeRDP窗口不过貌似不起作用
// 变量替换
ex_replace_all(w_exe_path, _T("{size}"), w_screen);
ex_replace_all(w_exe_path, _T("{console}"), w_console);
ex_replace_all(w_exe_path, _T("{clipboard}"), L"+clipboard");
//ex_replace_all(w_exe_path, _T("{clipboard}"), L"+clipboard");
ex_replace_all(w_exe_path, _T("{clipboard}"), L"/clipboard");
ex_replace_all(w_exe_path, _T("{drives}"), L"/drives");
}
else {

View File

@ -292,7 +292,7 @@ $app.on_table_host_render_created = function (render) {
case TP_SESS_STAT_RUNNING:
return '<span class="label label-warning">正在连接</span>';
case TP_SESS_STAT_STARTED:
return '<span class="label label-primary">使用中</span>';
return '<span class="label label-success">使用中</span>';
case TP_SESS_STAT_END:
return '<span class="label label-ignore">已结束</span>';
case TP_SESS_STAT_ERR_AUTH_DENIED:

View File

@ -308,6 +308,7 @@ $app.create_dlg_rdp_options = function () {
dlg.rdp_w = _w;
dlg.rdp_h = _h;
dlg.rdp_console = _console;
Cookies.set('rdp_options', {w: _w, h: _h, 'c': _console}, {path: '/ops/remote'});
$app.connect_remote(dlg.uni_id, dlg.acc_id, dlg.host_id, dlg.protocol_type, dlg.protocol_sub_type);
@ -401,6 +402,8 @@ $app.connect_remote = function (uni_id, acc_id, host_id, protocol_type, protocol
rdp_console: $app.dlg_rdp_options.rdp_console
};
console.log('--s--', args);
if(uni_id === 'none')
args.mode = 2;

View File

@ -306,7 +306,7 @@ $app.on_table_session_render_created = function (render) {
case TP_SESS_STAT_RUNNING:
return '<span class="label label-warning">正在连接</span>';
case TP_SESS_STAT_STARTED:
return '<span class="label label-primary">使用中</span>';
return '<span class="label label-success">使用中</span>';
case TP_SESS_STAT_END:
return '<span class="label label-ignore">已结束</span>';
case TP_SESS_STAT_ERR_AUTH_DENIED: