pywebexec 1.5.17__py3-none-any.whl → 1.5.19__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;
@@ -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>`}
@@ -200,7 +200,7 @@ async function fetchOutput(url) {
200
200
  document.getElementById('commandStatus').classList.add(`status-${data.status}`);
201
201
  const row = document.getElementsByClassName("currentcommand");
202
202
  if (row.length > 0)
203
- row[0].cells[4].innerHTML = `<span class="status-icon status-${data.status}"></span>${data.status}${data.status === 'failed' ? ` (${data.exit_code})` : ''}`;
203
+ row[0].cells[4].innerHTML = `<span class="status-icon status-${data.status}"></span>${data.status}`;
204
204
  } else {
205
205
  toggleButton.style.display = 'block';
206
206
  const title = extractTitle(data.output);
@@ -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.17'
16
- __version_tuple__ = version_tuple = (1, 5, 17)
15
+ __version__ = version = '1.5.19'
16
+ __version_tuple__ = version_tuple = (1, 5, 19)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 1.5.17
3
+ Version: 1.5.19
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=pqPZqU0SMvSiE-_JolScA8UT2UZT9TmDka1pcSoM4sg,413
2
+ pywebexec/pywebexec.py,sha256=S24FSD4XywesMvM6nqJMdS8E1lF9mklN4nUlnZUp9Zs,28760
3
+ pywebexec/version.py,sha256=DFRbCVOtNypFr9EX2HuujkRvOAgwqVoG22_WiEle6F8,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
@@ -19,7 +19,7 @@ pywebexec/static/images/running.svg,sha256=fBCYwYb2O9K4N3waC2nURP25NRwZlqR4PbDZy
19
19
  pywebexec/static/images/success.svg,sha256=PJDcCSTevJh7rkfSFLtc7P0pbeh8PVQBS8DaOLQemmc,489
20
20
  pywebexec/static/js/commands.js,sha256=8JDb3Q55EJOYf2Q9Uy6qEuqAnn1oGjM0RndgQ4aOjqo,7725
21
21
  pywebexec/static/js/popup.js,sha256=TCzGoPVS_EvwzGc544SvRgLYG7XWXRF8tIQGfu3atrU,8533
22
- pywebexec/static/js/script.js,sha256=xs7VbmZNniLLryA84PxyV4ksTRyWccudChNeBU-XpWI,16435
22
+ pywebexec/static/js/script.js,sha256=XOJaJwfI6pvQX5Q6B3tflOmHu1LwMWRjwpkMLCzJ_u4,16399
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.17.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
36
- pywebexec-1.5.17.dist-info/METADATA,sha256=hAJJpBcXIT45uUr5WRQzx_BL0H45UamOcXRa5q77jb4,7802
37
- pywebexec-1.5.17.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
38
- pywebexec-1.5.17.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
39
- pywebexec-1.5.17.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
40
- pywebexec-1.5.17.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.19.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
36
+ pywebexec-1.5.19.dist-info/METADATA,sha256=qkCP3h_UEbQCkjUS7w8D7_KHVuJLnUBEO0HHCzc9i50,7802
37
+ pywebexec-1.5.19.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
38
+ pywebexec-1.5.19.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
39
+ pywebexec-1.5.19.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
40
+ pywebexec-1.5.19.dist-info/RECORD,,