pywebexec 1.4.2__py3-none-any.whl → 1.4.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pywebexec/pywebexec.py CHANGED
@@ -454,27 +454,25 @@ def run_command(command, params, command_id, user):
454
454
  update_command_status(command_id, 'running', command=command, params=params, start_time=start_time, user=user)
455
455
  output_file_path = get_output_file_path(command_id)
456
456
  try:
457
- def spawn_tty():
458
- with open(output_file_path, 'wb') as fd:
459
- p = pexpect.spawn(command, params, ignore_sighup=True, timeout=None)
460
- update_command_status(command_id, 'running', pid=p.pid, user=user)
461
- p.setwinsize(24, 120)
462
- p.logfile = fd
463
- p.expect(pexpect.EOF)
464
- fd.flush()
465
- status = p.wait()
466
- end_time = datetime.now().isoformat()
467
- # Update the status based on the result
468
- if status is None:
469
- exit_code = -15
470
- update_command_status(command_id, 'aborted', end_time=end_time, exit_code=exit_code, user=user)
457
+ with open(output_file_path, 'wb') as fd:
458
+ p = pexpect.spawn(command, params, ignore_sighup=True, timeout=None)
459
+ update_command_status(command_id, 'running', pid=p.pid, user=user)
460
+ p.setwinsize(24, 125)
461
+ p.logfile = fd
462
+ p.expect(pexpect.EOF)
463
+ fd.flush()
464
+ status = p.wait()
465
+ end_time = datetime.now().isoformat()
466
+ # Update the status based on the result
467
+ if status is None:
468
+ exit_code = -15
469
+ update_command_status(command_id, 'aborted', end_time=end_time, exit_code=exit_code, user=user)
470
+ else:
471
+ exit_code = status
472
+ if exit_code == 0:
473
+ update_command_status(command_id, 'success', end_time=end_time, exit_code=exit_code, user=user)
471
474
  else:
472
- exit_code = status
473
- if exit_code == 0:
474
- update_command_status(command_id, 'success', end_time=end_time, exit_code=exit_code, user=user)
475
- else:
476
- update_command_status(command_id, 'failed', end_time=end_time, exit_code=exit_code, user=user)
477
- spawn_tty()
475
+ update_command_status(command_id, 'failed', end_time=end_time, exit_code=exit_code, user=user)
478
476
  except Exception as e:
479
477
  end_time = datetime.now().isoformat()
480
478
  update_command_status(command_id, 'failed', end_time=end_time, exit_code=1, user=user)
@@ -25,7 +25,7 @@ function filterCommands() {
25
25
  options[i].style.display = 'none';
26
26
  }
27
27
  }
28
- if (nbVisibleItems>1) {
28
+ if (nbVisibleItems > 1) {
29
29
  commandListSelect.size = Math.min(20, nbVisibleItems);
30
30
  commandListSelect.style.display = 'block';
31
31
  } else {
@@ -211,6 +211,8 @@ async function fetchExecutables() {
211
211
  alert("Failed to fetch executables");
212
212
  }
213
213
  commandListSelect.size = Math.min(20, commandListSelect.options.length);
214
+ if (commandListSelect.options.length == 1)
215
+ commandInput.value = commandListSelect.options[0].text;
214
216
  if (commandListSelect.options.length == 0)
215
217
  document.getElementById('launchForm').style.display = 'none';
216
218
 
pywebexec/version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.4.2'
16
- __version_tuple__ = version_tuple = (1, 4, 2)
15
+ __version__ = version = '1.4.3'
16
+ __version_tuple__ = version_tuple = (1, 4, 3)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 1.4.2
3
+ Version: 1.4.3
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Home-page: https://github.com/joknarf/pywebexec
6
6
  Author: Franck Jouvanceau
@@ -1,6 +1,6 @@
1
1
  pywebexec/__init__.py,sha256=4spIsVaF8RJt8S58AG_wWoORRNkws9Iwqprj27C3ljM,99
2
- pywebexec/pywebexec.py,sha256=O3_iTeNw6ekF-f7-xO_wL0MDMm72v_onrcrB4repxk4,26124
3
- pywebexec/version.py,sha256=tX44urJsC0QN5SJ51xsM0HeojA_8Xx7NXFEGAkYlNE4,411
2
+ pywebexec/pywebexec.py,sha256=w5XUxh9rJqbVO4Um9fJb4DcBd-VoOGc6cNXBjPVPkm8,26003
3
+ pywebexec/version.py,sha256=cUUlK35wR7qLNaS4SMOrkRP_HG0nSHq0YEIezhPHr3c,411
4
4
  pywebexec/static/css/Consolas NF.ttf,sha256=DJEOzF0eqZ-kxu3Gs_VE8X0NJqiobBzmxWDGpdgGRxI,1313900
5
5
  pywebexec/static/css/style.css,sha256=b02WQoXwVm00JpedEslvCHjr35txo2Bfjz3Iboco9U8,5500
6
6
  pywebexec/static/css/xterm.css,sha256=gy8_LGA7Q61DUf8ElwFQzHqHMBQnbbEmpgZcbdgeSHI,5383
@@ -12,7 +12,7 @@ pywebexec/static/images/failed.svg,sha256=ADZ7IKrUyOXtqpivnz3VcH0-Wru-I5MOi3OJAk
12
12
  pywebexec/static/images/favicon.svg,sha256=ti80IfuDZwIvQcmJxkOeUaB1iMsiyOPmQmVO-h0y1IU,1126
13
13
  pywebexec/static/images/running.gif,sha256=iYuzQGkMxrakSIwt6gPieKCImGZoSAHmU5MUNZa7cpw,25696
14
14
  pywebexec/static/images/success.svg,sha256=PJDcCSTevJh7rkfSFLtc7P0pbeh8PVQBS8DaOLQemmc,489
15
- pywebexec/static/js/commands.js,sha256=VdMeCop9V5KwsR2v1J_OY1xFE7tJUYgcMg_lh2VGNjs,7476
15
+ pywebexec/static/js/commands.js,sha256=ZljOQnzPtRdbMUy_juS_vkqRaT-F0xko9-7D0wis_mU,7589
16
16
  pywebexec/static/js/script.js,sha256=_Z1P65x-s_heHMwXbVpPHJHqfQKcIZavVhRej6i3DIs,11570
17
17
  pywebexec/static/js/xterm/LICENSE,sha256=EU1P4eXTull-_T9I80VuwnJXubB-zLzUl3xpEYj2T1M,1083
18
18
  pywebexec/static/js/xterm/ansi_up.min.js,sha256=KNGV0vEr30hNqKQimTAvGVy-icD5A1JqMQTtvYtKR2Y,13203
@@ -20,9 +20,9 @@ pywebexec/static/js/xterm/xterm-addon-fit.js,sha256=Pprm9pZe4SadVXS5Bc8b9VnC9Ex4
20
20
  pywebexec/static/js/xterm/xterm.js,sha256=Bzka76jZwEhVt_LlS0e0qMw7ryGa1p5qfxFyeohphBo,283371
21
21
  pywebexec/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  pywebexec/templates/index.html,sha256=DYtT555wSNhnFtzzHhPMWJireynCJNnAuTytpoORQeE,2321
23
- pywebexec-1.4.2.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
24
- pywebexec-1.4.2.dist-info/METADATA,sha256=JUAk1R0g1qODAIcV0baR36FNZTJNI4fNCQVGEbSzmBA,7399
25
- pywebexec-1.4.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
26
- pywebexec-1.4.2.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
27
- pywebexec-1.4.2.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
28
- pywebexec-1.4.2.dist-info/RECORD,,
23
+ pywebexec-1.4.3.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
24
+ pywebexec-1.4.3.dist-info/METADATA,sha256=kyddTaSqa3FsyNuSdEecNYKal-BIshDa-_xa9sFhjPw,7399
25
+ pywebexec-1.4.3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
26
+ pywebexec-1.4.3.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
27
+ pywebexec-1.4.3.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
28
+ pywebexec-1.4.3.dist-info/RECORD,,