pywebexec 1.1.13__tar.gz → 1.1.17__tar.gz

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.
Files changed (27) hide show
  1. {pywebexec-1.1.13/pywebexec.egg-info → pywebexec-1.1.17}/PKG-INFO +2 -2
  2. {pywebexec-1.1.13 → pywebexec-1.1.17}/README.md +1 -1
  3. {pywebexec-1.1.13 → pywebexec-1.1.17}/pywebexec/pywebexec.py +3 -9
  4. {pywebexec-1.1.13 → pywebexec-1.1.17}/pywebexec/static/js/script.js +3 -3
  5. {pywebexec-1.1.13 → pywebexec-1.1.17}/pywebexec/version.py +2 -2
  6. {pywebexec-1.1.13 → pywebexec-1.1.17/pywebexec.egg-info}/PKG-INFO +2 -2
  7. {pywebexec-1.1.13 → pywebexec-1.1.17}/.github/workflows/python-publish.yml +0 -0
  8. {pywebexec-1.1.13 → pywebexec-1.1.17}/.gitignore +0 -0
  9. {pywebexec-1.1.13 → pywebexec-1.1.17}/LICENSE +0 -0
  10. {pywebexec-1.1.13 → pywebexec-1.1.17}/pyproject.toml +0 -0
  11. {pywebexec-1.1.13 → pywebexec-1.1.17}/pywebexec/__init__.py +0 -0
  12. {pywebexec-1.1.13 → pywebexec-1.1.17}/pywebexec/static/css/style.css +0 -0
  13. {pywebexec-1.1.13 → pywebexec-1.1.17}/pywebexec/static/images/aborted.svg +0 -0
  14. {pywebexec-1.1.13 → pywebexec-1.1.17}/pywebexec/static/images/copy.svg +0 -0
  15. {pywebexec-1.1.13 → pywebexec-1.1.17}/pywebexec/static/images/copy_ok.svg +0 -0
  16. {pywebexec-1.1.13 → pywebexec-1.1.17}/pywebexec/static/images/failed.svg +0 -0
  17. {pywebexec-1.1.13 → pywebexec-1.1.17}/pywebexec/static/images/favicon.svg +0 -0
  18. {pywebexec-1.1.13 → pywebexec-1.1.17}/pywebexec/static/images/running.gif +0 -0
  19. {pywebexec-1.1.13 → pywebexec-1.1.17}/pywebexec/static/images/success.svg +0 -0
  20. {pywebexec-1.1.13 → pywebexec-1.1.17}/pywebexec/templates/__init__.py +0 -0
  21. {pywebexec-1.1.13 → pywebexec-1.1.17}/pywebexec/templates/index.html +2 -2
  22. {pywebexec-1.1.13 → pywebexec-1.1.17}/pywebexec.egg-info/SOURCES.txt +0 -0
  23. {pywebexec-1.1.13 → pywebexec-1.1.17}/pywebexec.egg-info/dependency_links.txt +0 -0
  24. {pywebexec-1.1.13 → pywebexec-1.1.17}/pywebexec.egg-info/entry_points.txt +0 -0
  25. {pywebexec-1.1.13 → pywebexec-1.1.17}/pywebexec.egg-info/requires.txt +0 -0
  26. {pywebexec-1.1.13 → pywebexec-1.1.17}/pywebexec.egg-info/top_level.txt +0 -0
  27. {pywebexec-1.1.13 → pywebexec-1.1.17}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 1.1.13
3
+ Version: 1.1.17
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Home-page: https://github.com/joknarf/pywebexec
6
6
  Author: Franck Jouvanceau
@@ -83,7 +83,7 @@ $ pywebexec
83
83
  ```
84
84
 
85
85
  * Launch commands with params/view live output/Status using browser
86
- ![pywebexecnew](https://github.com/user-attachments/assets/06290b5e-284e-4e41-b32a-0f5aad074658)
86
+ ![pywebexecnew2](https://github.com/user-attachments/assets/c69e14a3-9624-49b0-81b7-134111b71d2d)
87
87
 
88
88
  all commands output / statuses are available in the executables directory in subdirectory `.web_status`
89
89
 
@@ -21,7 +21,7 @@ $ pywebexec
21
21
  ```
22
22
 
23
23
  * Launch commands with params/view live output/Status using browser
24
- ![pywebexecnew](https://github.com/user-attachments/assets/06290b5e-284e-4e41-b32a-0f5aad074658)
24
+ ![pywebexecnew2](https://github.com/user-attachments/assets/c69e14a3-9624-49b0-81b7-134111b71d2d)
25
25
 
26
26
  all commands output / statuses are available in the executables directory in subdirectory `.web_status`
27
27
 
@@ -15,13 +15,8 @@ from gunicorn.app.base import Application
15
15
  import ipaddress
16
16
  from socket import gethostname, gethostbyname_ex
17
17
  import ssl
18
-
19
18
  if os.environ.get('PYWEBEXEC_LDAP_SERVER'):
20
- try:
21
- from ldap3 import Server, Connection, ALL, SIMPLE, SUBTREE, Tls
22
- except:
23
- print("Need to install ldap3: pip install ldap3", file=sys.stderr)
24
- sys.exit(1)
19
+ from ldap3 import Server, Connection, ALL, SIMPLE, SUBTREE, Tls
25
20
 
26
21
  app = Flask(__name__)
27
22
  app.secret_key = os.urandom(24) # Secret key for session management
@@ -42,8 +37,6 @@ if os.path.isdir(f"{CONFDIR}/.config"):
42
37
  CONFDIR += '/.config'
43
38
  CONFDIR += "/.pywebexec"
44
39
 
45
- if not os.path.exists(COMMAND_STATUS_DIR):
46
- os.makedirs(COMMAND_STATUS_DIR)
47
40
 
48
41
  # In-memory cache for command statuses
49
42
  command_status_cache = {}
@@ -271,7 +264,8 @@ def parseargs():
271
264
  else:
272
265
  print(f"Error: {args.dir} not found", file=sys.stderr)
273
266
  sys.exit(1)
274
-
267
+ if not os.path.exists(COMMAND_STATUS_DIR):
268
+ os.makedirs(COMMAND_STATUS_DIR)
275
269
  if args.gencert:
276
270
  hostname = resolve_hostname(gethostname())
277
271
  args.cert = args.cert or f"{CONFDIR}/pywebexec.crt"
@@ -45,13 +45,13 @@ async function fetchCommands() {
45
45
  commandRow.onclick = () => viewOutput(command.command_id);
46
46
  commandRow.innerHTML = `
47
47
  <td class="monospace">
48
- ${navigator.clipboard == undefined ? `${command.command_id}` : `<span class="copy_clip" onclick="copyToClipboard('${command.command_id.slice(0, 8)}', this, event)">${command.command_id.slice(0, 8)}</span>`}
48
+ ${navigator.clipboard == undefined ? `${command.command_id.slice(0, 8)}` : `<span class="copy_clip" onclick="copyToClipboard('${command.command_id}', this, event)">${command.command_id.slice(0, 8)}</span>`}
49
49
  </td>
50
- <td><span class="status-icon status-${command.status}"></span>${command.status}</td>
51
50
  <td>${formatTime(command.start_time)}</td>
52
51
  <td>${command.status === 'running' ? formatDuration(command.start_time, new Date().toISOString()) : formatDuration(command.start_time, command.end_time)}</td>
53
- <td>${command.exit_code}</td>
54
52
  <td>${command.command.replace(/^\.\//, '')}</td>
53
+ <td>${command.exit_code}</td>
54
+ <td><span class="status-icon status-${command.status}"></span>${command.status}</td>
55
55
  <td>
56
56
  ${command.status === 'running' ? `<button onclick="stopCommand('${command.command_id}')">Stop</button>` : `<button onclick="relaunchCommand('${command.command_id}')">Run</button>`}
57
57
  </td>
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.1.13'
16
- __version_tuple__ = version_tuple = (1, 1, 13)
15
+ __version__ = version = '1.1.17'
16
+ __version_tuple__ = version_tuple = (1, 1, 17)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 1.1.13
3
+ Version: 1.1.17
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Home-page: https://github.com/joknarf/pywebexec
6
6
  Author: Franck Jouvanceau
@@ -83,7 +83,7 @@ $ pywebexec
83
83
  ```
84
84
 
85
85
  * Launch commands with params/view live output/Status using browser
86
- ![pywebexecnew](https://github.com/user-attachments/assets/06290b5e-284e-4e41-b32a-0f5aad074658)
86
+ ![pywebexecnew2](https://github.com/user-attachments/assets/c69e14a3-9624-49b0-81b7-134111b71d2d)
87
87
 
88
88
  all commands output / statuses are available in the executables directory in subdirectory `.web_status`
89
89
 
File without changes
File without changes
File without changes
@@ -23,11 +23,11 @@
23
23
  <thead>
24
24
  <tr>
25
25
  <th>ID</th>
26
- <th>Status</th>
27
26
  <th>Start Time</th>
28
27
  <th>Duration</th>
29
- <th>Exit</th>
30
28
  <th>Command</th>
29
+ <th>Exit</th>
30
+ <th>Status</th>
31
31
  <th>Action</th>
32
32
  <th>Output</th>
33
33
  </tr>
File without changes