mirror of https://github.com/jumpserver/jumpserver
perf: 修复 Chrome 执行脚本失败,页面卡在进度条界面的问题
parent
d02cbcc3a3
commit
8f10b84e94
|
@ -1,3 +1,7 @@
|
|||
# 2023-08-16 Version 0.8
|
||||
## 功能优化
|
||||
- 修复代填失败,造成页面卡住的问题
|
||||
|
||||
# 2023-07-28 Version 0.7
|
||||
## 功能优化
|
||||
- 增加进度窗口,隐藏代填操作
|
||||
|
|
|
@ -121,7 +121,6 @@ def execute_action(driver: webdriver.Chrome, step: StepAction) -> bool:
|
|||
return step.execute(driver)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
notify_err_message(str(e))
|
||||
return False
|
||||
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import subprocess
|
|||
import sys
|
||||
import time
|
||||
from subprocess import CREATE_NO_WINDOW
|
||||
from threading import Thread
|
||||
|
||||
_blockInput = None
|
||||
_messageBox = None
|
||||
|
@ -36,7 +37,10 @@ def unblock_input():
|
|||
|
||||
def notify_err_message(msg):
|
||||
if _messageBox:
|
||||
_messageBox(msg, 'Error')
|
||||
# _messageBox 是阻塞当前线程的,所以需要开启一个新线程执行
|
||||
t = Thread(target=_messageBox, args=(msg, 'Error'), kwargs={})
|
||||
t.daemon = True
|
||||
t.start()
|
||||
|
||||
|
||||
def decode_content(content: bytes) -> str:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: chrome
|
||||
display_name: "{{ 'Chrome Browser' | trans }}"
|
||||
version: 0.7
|
||||
version: 0.8
|
||||
comment: "{{ 'Chrome Browser Open URL Page Address' | trans }}"
|
||||
author: JumpServer Team
|
||||
exec_type: python
|
||||
|
|
Loading…
Reference in New Issue