pywebexec 1.5.16__py3-none-any.whl → 1.5.18__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
@@ -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
 
@@ -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>
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.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
@@ -1,8 +1,8 @@
1
1
  pywebexec/__init__.py,sha256=4spIsVaF8RJt8S58AG_wWoORRNkws9Iwqprj27C3ljM,99
2
- pywebexec/pywebexec.py,sha256=hvI-vJUhokza4ozxPuuhWGFv3rMV0gqQNfNHW8eYXKk,29001
3
- pywebexec/version.py,sha256=mHfZXquAABTFJcCTtEKL7lltRkyfT160CZojEvwd1Aw,413
2
+ pywebexec/pywebexec.py,sha256=S24FSD4XywesMvM6nqJMdS8E1lF9mklN4nUlnZUp9Zs,28760
3
+ pywebexec/version.py,sha256=4dXebS3MmuJVzRzthWNVLSC2f7ozQPniKxTATW5ZukM,413
4
4
  pywebexec/static/css/Consolas NF.ttf,sha256=DJEOzF0eqZ-kxu3Gs_VE8X0NJqiobBzmxWDGpdgGRxI,1313900
5
- pywebexec/static/css/style.css,sha256=AryZifTwse0a711MRgHgWFWWWzAzO-FyA6mnVLewVnk,7704
5
+ pywebexec/static/css/style.css,sha256=ALqne5pOJrAgujkl3YiFPwG85iZGKatYfZteEx1pZV8,7872
6
6
  pywebexec/static/css/xterm.css,sha256=uo5phWaUiJgcz0DAzv46uoByLLbJLeetYosL1xf68rY,5559
7
7
  pywebexec/static/images/aborted.svg,sha256=_mP43hU5QdRLFZIknBgjx-dIXrHgQG23-QV27ApXK2A,381
8
8
  pywebexec/static/images/copy.svg,sha256=d9OwtGh5GzzZHzYcDrLfNxZYLth1Q64x7bRyYxu4Px0,622
@@ -18,8 +18,8 @@ pywebexec/static/images/resume.svg,sha256=99LP1Ya2JXakRCO9kW8JMuT_4a_CannF65Eiuw
18
18
  pywebexec/static/images/running.svg,sha256=fBCYwYb2O9K4N3waC2nURP25NRwZlqR4PbDZy6JQMww,610
19
19
  pywebexec/static/images/success.svg,sha256=PJDcCSTevJh7rkfSFLtc7P0pbeh8PVQBS8DaOLQemmc,489
20
20
  pywebexec/static/js/commands.js,sha256=8JDb3Q55EJOYf2Q9Uy6qEuqAnn1oGjM0RndgQ4aOjqo,7725
21
- pywebexec/static/js/popup.js,sha256=EF0iEV2Pu0zywv_EvmxD6pJkdbSTXneYg2dX5dwD3F8,8507
22
- pywebexec/static/js/script.js,sha256=xs7VbmZNniLLryA84PxyV4ksTRyWccudChNeBU-XpWI,16435
21
+ pywebexec/static/js/popup.js,sha256=TCzGoPVS_EvwzGc544SvRgLYG7XWXRF8tIQGfu3atrU,8533
22
+ pywebexec/static/js/script.js,sha256=Vt1CT8-MbxcYQRuHORPL6mCgFxHQyjutm6QiHm7xlFA,16456
23
23
  pywebexec/static/js/xterm/LICENSE,sha256=EU1P4eXTull-_T9I80VuwnJXubB-zLzUl3xpEYj2T1M,1083
24
24
  pywebexec/static/js/xterm/addon-canvas.js,sha256=ez6QTVvsmLVNJmdJlM-ZQ5bErwlxAQ_9DUmDIptl2TM,94607
25
25
  pywebexec/static/js/xterm/addon-canvas.js.map,sha256=ECBA4B-BqUpdFeRzlsEWLSQnudnhLP-yPQJ8_hKquMo,379537
@@ -30,11 +30,11 @@ pywebexec/static/js/xterm/addon-unicode11.js.map,sha256=paDj5KKtTIUGedQn2x7CaUTD
30
30
  pywebexec/static/js/xterm/xterm.js,sha256=H5kaw7Syg-v5bmCuI6AKUnZd06Lkb6b92p8aqwMvdJU,289441
31
31
  pywebexec/static/js/xterm/xterm.js.map,sha256=Y7O2Pb-fIS7Z8AC1D5s04_aiW_Jf1f4mCfN0U_OI6Zw,1118392
32
32
  pywebexec/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
- pywebexec/templates/index.html,sha256=jY8YUABYuznk8LxWtGx5dn72GhHx1D-DrScx-KeMO6U,2755
34
- pywebexec/templates/popup.html,sha256=UgI42un_4N3JwyeQJfvVC1Vm9Pn23MEWKKVcs1gsInA,1362
35
- pywebexec-1.5.16.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
36
- pywebexec-1.5.16.dist-info/METADATA,sha256=DXfCNjzMDuk04babnxAXpGIlMww7LUOvHE2QxtnA8Z8,7802
37
- pywebexec-1.5.16.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
38
- pywebexec-1.5.16.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
39
- pywebexec-1.5.16.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
40
- pywebexec-1.5.16.dist-info/RECORD,,
33
+ pywebexec/templates/index.html,sha256=_3tt0tHElhH75aMNtfqpM_AoHTXTi7Gkuf7ku12NltI,2755
34
+ pywebexec/templates/popup.html,sha256=6FfzMjxuAC_xwyMGPf3p5tm6iPVY0QCsqY80eotD0z8,1362
35
+ pywebexec-1.5.18.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
36
+ pywebexec-1.5.18.dist-info/METADATA,sha256=zc9Gi99XxKqgY8Ubi1IiPgQgndA5P2Q4AA1Yc46J4FI,7802
37
+ pywebexec-1.5.18.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
38
+ pywebexec-1.5.18.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
39
+ pywebexec-1.5.18.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
40
+ pywebexec-1.5.18.dist-info/RECORD,,