修正一处手误。
parent
f9ae8029f2
commit
1db6a66ba1
|
@ -73,6 +73,7 @@ class BuilderWin(BuilderBase):
|
||||||
utils.copy_ex(out_path, bin_path, 'tp_web.exe')
|
utils.copy_ex(out_path, bin_path, 'tp_web.exe')
|
||||||
utils.copy_ex(out_path, bin_path, 'tp_core.exe')
|
utils.copy_ex(out_path, bin_path, 'tp_core.exe')
|
||||||
utils.copy_ex(out_path, bin_path, 'tpssh.dll')
|
utils.copy_ex(out_path, bin_path, 'tpssh.dll')
|
||||||
|
utils.copy_ex(out_path, bin_path, 'tprdp.dll')
|
||||||
|
|
||||||
utils.copy_ex(os.path.join(env.root_path, 'out', 'pysrt'), bin_path, (ctx.dist_path, 'pysrt'))
|
utils.copy_ex(os.path.join(env.root_path, 'out', 'pysrt'), bin_path, (ctx.dist_path, 'pysrt'))
|
||||||
|
|
||||||
|
|
|
@ -900,8 +900,12 @@ class SysUserAdd(TPBaseUserAuthJsonHandler):
|
||||||
|
|
||||||
args['user_pswd'] = return_data['data']
|
args['user_pswd'] = return_data['data']
|
||||||
|
|
||||||
if host.sys_user_add(args) < 0:
|
user_id = host.sys_user_add(args)
|
||||||
return self.write_json(-1)
|
if user_id < 0:
|
||||||
|
if user_id == -100:
|
||||||
|
return self.write_json(user_id, '同名账户已经存在!')
|
||||||
|
else:
|
||||||
|
return self.write_json(user_id, '数据库操作失败!')
|
||||||
|
|
||||||
return self.write_json(0)
|
return self.write_json(0)
|
||||||
|
|
||||||
|
|
|
@ -669,14 +669,11 @@ ywl.create_host_edit_dlg = function (tbl) {
|
||||||
};
|
};
|
||||||
dlg_edit_host.on_sys_type_change = function () {
|
dlg_edit_host.on_sys_type_change = function () {
|
||||||
dlg_edit_host.sys_type = parseInt($('#auth-sys-type').val());
|
dlg_edit_host.sys_type = parseInt($('#auth-sys-type').val());
|
||||||
console.log('sys-type', dlg_edit_host.sys_type, 'protocol:', dlg_edit_host.protocol);
|
|
||||||
if (dlg_edit_host.sys_type === OS_TYPE_WINDOWS) {// && dlg_edit_host.protocol === 0) {
|
if (dlg_edit_host.sys_type === OS_TYPE_WINDOWS) {// && dlg_edit_host.protocol === 0) {
|
||||||
dlg_edit_host.protocol = PROTOCOL_TYPE_RDP;
|
dlg_edit_host.protocol = PROTOCOL_TYPE_RDP;
|
||||||
console.log('--1', dlg_edit_host.protocol);
|
|
||||||
}
|
}
|
||||||
else if (dlg_edit_host.sys_type === OS_TYPE_LINUX) {// && dlg_edit_host.protocol === 0) {
|
else if (dlg_edit_host.sys_type === OS_TYPE_LINUX) {// && dlg_edit_host.protocol === 0) {
|
||||||
dlg_edit_host.protocol = PROTOCOL_TYPE_SSH;
|
dlg_edit_host.protocol = PROTOCOL_TYPE_SSH;
|
||||||
console.log('--2', dlg_edit_host.protocol);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#host-protocol-type').val(dlg_edit_host.protocol);
|
$('#host-protocol-type').val(dlg_edit_host.protocol);
|
||||||
|
@ -686,7 +683,6 @@ ywl.create_host_edit_dlg = function (tbl) {
|
||||||
|
|
||||||
dlg_edit_host.on_protocol_change = function () {
|
dlg_edit_host.on_protocol_change = function () {
|
||||||
dlg_edit_host.protocol = parseInt($('#host-protocol-type').val());
|
dlg_edit_host.protocol = parseInt($('#host-protocol-type').val());
|
||||||
console.log('xx', dlg_edit_host.protocol);
|
|
||||||
if (dlg_edit_host.protocol === PROTOCOL_TYPE_RDP)
|
if (dlg_edit_host.protocol === PROTOCOL_TYPE_RDP)
|
||||||
$('#dlg-edit-host-protocol-port').val('3389');
|
$('#dlg-edit-host-protocol-port').val('3389');
|
||||||
else if (dlg_edit_host.protocol === PROTOCOL_TYPE_SSH)
|
else if (dlg_edit_host.protocol === PROTOCOL_TYPE_SSH)
|
||||||
|
@ -1266,7 +1262,7 @@ ywl.create_sys_user = function (tbl) {
|
||||||
dlg_sys_user.check_args = function () {
|
dlg_sys_user.check_args = function () {
|
||||||
|
|
||||||
dlg_sys_user.auth_mode = parseInt($('#auth-user-type').val());
|
dlg_sys_user.auth_mode = parseInt($('#auth-user-type').val());
|
||||||
dlg_sys_user.user_name = parseInt($('#auth-user-host-username').val());
|
dlg_sys_user.user_name = $('#auth-user-host-username').val();
|
||||||
if (dlg_sys_user.auth_mode !== AUTH_NONE &&
|
if (dlg_sys_user.auth_mode !== AUTH_NONE &&
|
||||||
dlg_sys_user.user_name.length === 0) {
|
dlg_sys_user.user_name.length === 0) {
|
||||||
ywl.notify_error('请输入系统用户名!');
|
ywl.notify_error('请输入系统用户名!');
|
||||||
|
|
Loading…
Reference in New Issue