Browse Source

perf: chrome 代填进度条最大 30s 超时

pull/11528/head
Eric 1 year ago committed by 老广
parent
commit
73037c21e8
  1. 4
      apps/terminal/applets/chrome/ChangeLog
  2. 8
      apps/terminal/applets/chrome/code_dialog.py
  3. 2
      apps/terminal/applets/chrome/manifest.yml

4
apps/terminal/applets/chrome/ChangeLog

@ -1,3 +1,7 @@
# 2023-09-15 Version 0.9
## 功能优化
- 进度条显示最大超时
# 2023-08-16 Version 0.8
## 功能优化
- 修复代填失败,造成页面卡住的问题

8
apps/terminal/applets/chrome/code_dialog.py

@ -35,15 +35,23 @@ class CodeDialog(object):
class TkProgressBar(object):
# 30s
wait_max_time = 3000 * 10
def __init__(self, wait_func=None):
self._wait_func = wait_func
self._done = threading.Event()
self._root = None
self._wait_time = 0
def _check(self):
if self._done.isSet():
self._root.destroy()
return
if self._wait_time >= self.wait_max_time:
self._root.destroy()
return
self._wait_time += 100
self._root.after(100, self._check)
def stop(self):

2
apps/terminal/applets/chrome/manifest.yml

@ -1,6 +1,6 @@
name: chrome
display_name: "{{ 'Chrome Browser' | trans }}"
version: 0.8
version: 0.9
comment: "{{ 'Chrome Browser Open URL Page Address' | trans }}"
author: JumpServer Team
exec_type: python

Loading…
Cancel
Save