pywebexec 1.5.16__tar.gz → 1.5.18__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 (47) hide show
  1. {pywebexec-1.5.16/pywebexec.egg-info → pywebexec-1.5.18}/PKG-INFO +1 -1
  2. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/pywebexec.py +5 -8
  3. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/css/style.css +9 -2
  4. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/js/popup.js +1 -0
  5. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/js/script.js +2 -2
  6. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/version.py +2 -2
  7. {pywebexec-1.5.16 → pywebexec-1.5.18/pywebexec.egg-info}/PKG-INFO +1 -1
  8. {pywebexec-1.5.16 → pywebexec-1.5.18}/.github/workflows/python-publish.yml +0 -0
  9. {pywebexec-1.5.16 → pywebexec-1.5.18}/.gitignore +0 -0
  10. {pywebexec-1.5.16 → pywebexec-1.5.18}/LICENSE +0 -0
  11. {pywebexec-1.5.16 → pywebexec-1.5.18}/README.md +0 -0
  12. {pywebexec-1.5.16 → pywebexec-1.5.18}/pyproject.toml +0 -0
  13. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/__init__.py +0 -0
  14. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/css/Consolas NF.ttf +0 -0
  15. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/css/xterm.css +0 -0
  16. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/images/aborted.svg +0 -0
  17. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/images/copy.svg +0 -0
  18. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/images/copy_ok.svg +0 -0
  19. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/images/down-arrow.svg +0 -0
  20. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/images/failed.svg +0 -0
  21. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/images/favicon.svg +0 -0
  22. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/images/font-decrease.svg +0 -0
  23. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/images/font-increase.svg +0 -0
  24. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/images/pause.svg +0 -0
  25. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/images/popup.svg +0 -0
  26. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/images/resume.svg +0 -0
  27. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/images/running.svg +0 -0
  28. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/images/success.svg +0 -0
  29. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/js/commands.js +0 -0
  30. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/js/xterm/LICENSE +0 -0
  31. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/js/xterm/addon-canvas.js +0 -0
  32. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/js/xterm/addon-canvas.js.map +0 -0
  33. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/js/xterm/addon-fit.js +0 -0
  34. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/js/xterm/addon-fit.js.map +0 -0
  35. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/js/xterm/addon-unicode11.js +0 -0
  36. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/js/xterm/addon-unicode11.js.map +0 -0
  37. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/js/xterm/xterm.js +0 -0
  38. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/static/js/xterm/xterm.js.map +0 -0
  39. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/templates/__init__.py +0 -0
  40. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/templates/index.html +1 -1
  41. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec/templates/popup.html +1 -1
  42. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec.egg-info/SOURCES.txt +0 -0
  43. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec.egg-info/dependency_links.txt +0 -0
  44. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec.egg-info/entry_points.txt +0 -0
  45. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec.egg-info/requires.txt +0 -0
  46. {pywebexec-1.5.16 → pywebexec-1.5.18}/pywebexec.egg-info/top_level.txt +0 -0
  47. {pywebexec-1.5.16 → pywebexec-1.5.18}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 1.5.16
3
+ Version: 1.5.18
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Home-page: https://github.com/joknarf/pywebexec
6
6
  Author: Franck Jouvanceau
@@ -552,14 +552,11 @@ def stop_command(command_id):
552
552
  os.killpg(os.getpgid(pid), 15) # Send SIGTERM to the process group
553
553
  return jsonify({'message': 'Command aborted'})
554
554
  except Exception as e:
555
- status_data = read_command_status(command_id) or {}
556
- status_data['status'] = 'failed'
557
- status_data['end_time'] = end_time
558
- status_data['exit_code'] = 1
559
- with open(get_status_file_path(command_id), 'w') as f:
560
- json.dump(status_data, f)
561
- with open(get_output_file_path(command_id), 'a') as output_file:
562
- output_file.write(str(e))
555
+ update_command_status(command_id, {
556
+ 'status': 'aborted',
557
+ 'end_time': end_time,
558
+ 'exit_code': -15,
559
+ })
563
560
  return jsonify({'error': 'Failed to terminate command'}), 500
564
561
 
565
562
  parseargs()
@@ -56,7 +56,13 @@ select { /* Safari bug */
56
56
  overflow-y: hidden;
57
57
  }
58
58
  .copy-icon { cursor: pointer; }
59
- .monospace { font-family: Consolas NF, monospace; }
59
+ .monospace {
60
+ font-family: Consolas NF,monospace;
61
+ font-size: 13px;
62
+ }
63
+ .system-font {
64
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
65
+ }
60
66
  .copied { color: green; margin-left: 5px; }
61
67
  button {
62
68
  -webkit-appearance: none;
@@ -352,7 +358,8 @@ span {
352
358
  .command-info {
353
359
  display: inline-block;
354
360
  padding: 5px 10px 5px 10px;
355
- background-color: #ddd;
361
+ background-color: #111;
362
+ color: #eee;
356
363
  max-width: 300px;
357
364
  white-space: nowrap;
358
365
  border-radius: 5px;
@@ -215,6 +215,7 @@ window.addEventListener('resize', adjustOutputHeight);
215
215
  window.addEventListener('load', () => {
216
216
  slider = document.getElementById('outputSlider');
217
217
  slider.addEventListener('input', sliderUpdateOutput);
218
+ adjustOutputHeight();
218
219
  const commandId = window.location.pathname.split('/').slice(-1)[0];
219
220
  viewOutput(commandId);
220
221
  });
@@ -140,7 +140,7 @@ async function fetchCommands() {
140
140
  </td>
141
141
  <td>${formatTime(command.start_time)}</td>
142
142
  <td>${command.status === 'running' ? formatDuration(command.start_time, new Date().toISOString()) : formatDuration(command.start_time, command.end_time)}</td>
143
- <td>${command.command.replace(/^\.\//, '')}</td>
143
+ <td class="system-font">${command.command.replace(/^\.\//, '')}</td>
144
144
  <td><span class="status-icon status-${command.status}"></span>${command.status}${command.status === 'failed' ? ` (${command.exit_code})` : ''}</td>
145
145
  <td>
146
146
  ${command.command.startsWith('term') ? '' : command.status === 'running' ? `<button onclick="stopCommand('${command.command_id}', event)">Stop</button>` : `<button onclick="relaunchCommand('${command.command_id}', event)">Run</button>`}
@@ -312,7 +312,7 @@ async function stopCommand(command_id, event) {
312
312
  }
313
313
  } catch (error) {
314
314
  console.log('Error stopping command:', error);
315
- alert('Failed to stop command. Please try again.');
315
+ alert('Failed to stop command. Process not found.');
316
316
  }
317
317
  }
318
318
 
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.5.16'
16
- __version_tuple__ = version_tuple = (1, 5, 16)
15
+ __version__ = version = '1.5.18'
16
+ __version_tuple__ = version_tuple = (1, 5, 18)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 1.5.16
3
+ Version: 1.5.18
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Home-page: https://github.com/joknarf/pywebexec
6
6
  Author: Franck Jouvanceau
File without changes
File without changes
File without changes
File without changes
@@ -46,12 +46,12 @@
46
46
  <div id="output" class="output"></div>
47
47
  <div id="pausedMessage" class="paused-message">Paused</div>
48
48
  <div class="slider-container">
49
+ <span id="commandInfo" class="command-info"></span>
49
50
  <input type="range" id="outputSlider" min="0" max="100" value="100">
50
51
  <label for="outputSlider"><span id="outputPercentage">100%</span></label>
51
52
  <button id="toggleFetch" class="pause-resume-button pause"></button>
52
53
  <button id="decreaseFontSize" class="font-size-button font-decrease"></button>
53
54
  <button id="increaseFontSize" class="font-size-button font-increase"></button>
54
- <span id="commandInfo" class="command-info"></span>
55
55
  </div>
56
56
  <script src="/static/js/xterm/xterm.js"></script>
57
57
  <script src="/static/js/xterm/addon-canvas.js"></script>
@@ -14,12 +14,12 @@
14
14
  <div id="output" class="output"></div>
15
15
  <div id="pausedMessage" class="paused-message">Paused</div>
16
16
  <div class="slider-container">
17
+ <span id="commandInfo" class="command-info"></span>
17
18
  <input type="range" id="outputSlider" min="0" max="100" value="100">
18
19
  <label for="outputSlider"><span id="outputPercentage">100%</span></label>
19
20
  <button id="toggleFetch" class="pause-resume-button pause"></button>
20
21
  <button id="decreaseFontSize" class="font-size-button font-decrease"></button>
21
22
  <button id="increaseFontSize" class="font-size-button font-increase"></button>
22
- <span id="commandInfo" class="command-info"></span>
23
23
  </div>
24
24
  <script src="/static/js/xterm/xterm.js"></script>
25
25
  <script src="/static/js/xterm/addon-canvas.js"></script>
File without changes