pywebexec 1.4.15__tar.gz → 1.4.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 (38) hide show
  1. {pywebexec-1.4.15/pywebexec.egg-info → pywebexec-1.4.17}/PKG-INFO +1 -1
  2. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/pywebexec.py +2 -1
  3. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/static/js/script.js +8 -8
  4. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/version.py +2 -2
  5. {pywebexec-1.4.15 → pywebexec-1.4.17/pywebexec.egg-info}/PKG-INFO +1 -1
  6. {pywebexec-1.4.15 → pywebexec-1.4.17}/.github/workflows/python-publish.yml +0 -0
  7. {pywebexec-1.4.15 → pywebexec-1.4.17}/.gitignore +0 -0
  8. {pywebexec-1.4.15 → pywebexec-1.4.17}/LICENSE +0 -0
  9. {pywebexec-1.4.15 → pywebexec-1.4.17}/README.md +0 -0
  10. {pywebexec-1.4.15 → pywebexec-1.4.17}/pyproject.toml +0 -0
  11. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/__init__.py +0 -0
  12. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/static/css/Consolas NF.ttf +0 -0
  13. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/static/css/style.css +0 -0
  14. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/static/css/xterm.css +0 -0
  15. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/static/images/aborted.svg +0 -0
  16. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/static/images/copy.svg +0 -0
  17. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/static/images/copy_ok.svg +0 -0
  18. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/static/images/down-arrow.svg +0 -0
  19. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/static/images/failed.svg +0 -0
  20. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/static/images/favicon.svg +0 -0
  21. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/static/images/popup.svg +0 -0
  22. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/static/images/running.gif +0 -0
  23. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/static/images/success.svg +0 -0
  24. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/static/js/commands.js +0 -0
  25. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/static/js/popup.js +0 -0
  26. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/static/js/xterm/LICENSE +0 -0
  27. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/static/js/xterm/ansi_up.min.js +0 -0
  28. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/static/js/xterm/xterm-addon-fit.js +0 -0
  29. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/static/js/xterm/xterm.js +0 -0
  30. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/templates/__init__.py +0 -0
  31. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/templates/index.html +0 -0
  32. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec/templates/popup.html +0 -0
  33. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec.egg-info/SOURCES.txt +0 -0
  34. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec.egg-info/dependency_links.txt +0 -0
  35. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec.egg-info/entry_points.txt +0 -0
  36. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec.egg-info/requires.txt +0 -0
  37. {pywebexec-1.4.15 → pywebexec-1.4.17}/pywebexec.egg-info/top_level.txt +0 -0
  38. {pywebexec-1.4.15 → pywebexec-1.4.17}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 1.4.15
3
+ Version: 1.4.17
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Home-page: https://github.com/joknarf/pywebexec
6
6
  Author: Franck Jouvanceau
@@ -732,8 +732,9 @@ def main():
732
732
  return 1
733
733
  if args.action == "shareterm":
734
734
  COMMAND_STATUS_DIR = f"{os.getcwd()}/{COMMAND_STATUS_DIR}"
735
+ sys.argv.remove("shareterm")
735
736
  with open(basef + ".log", "ab+") as log:
736
- pywebexec = subprocess.Popen([sys.executable] + sys.argv[:-1], stdout=log, stderr=log)
737
+ pywebexec = subprocess.Popen([sys.executable] + sys.argv, stdout=log, stderr=log)
737
738
  command_id = str(uuid.uuid4())
738
739
  print_urls(command_id)
739
740
  res = start_term(command_id)
@@ -1,6 +1,8 @@
1
1
  let currentCommandId = null;
2
2
  let outputInterval = null;
3
3
  let nextOutputLink = null;
4
+ let slider = document.getElementById('outputSlider');
5
+ let outputPercentage = document.getElementById('outputPercentage');
4
6
  let fullOutput = '';
5
7
  let outputLength = 0;
6
8
  const maxScrollback = 99999;
@@ -135,17 +137,15 @@ async function fetchOutput(url) {
135
137
  terminal.write(data.error);
136
138
  clearInterval(outputInterval);
137
139
  } else {
138
- slider = document.getElementById('outputSlider')
139
- percentage = slider.value;
140
140
  fullOutput += data.output;
141
141
  if (fullOutput.length > maxSize)
142
142
  fullOutput = fullOutput.slice(-maxSize);
143
- if (percentage == 100)
143
+ if (slider.value == 100)
144
144
  terminal.write(data.output); //.replace(/ \r/g, "\r\n")); tty size mismatch
145
145
  else {
146
146
  percentage = Math.round((outputLength * 100)/fullOutput.length);
147
147
  slider.value = percentage;
148
- document.getElementById('outputPercentage').innerText = `${percentage}%`;
148
+ outputPercentage.innerText = `${percentage}%`;
149
149
  }
150
150
  nextOutputLink = data.links.next;
151
151
  if (data.status != 'running') {
@@ -158,7 +158,8 @@ async function fetchOutput(url) {
158
158
  }
159
159
 
160
160
  async function viewOutput(command_id) {
161
- document.getElementById('outputSlider').value = 100;
161
+ slider.value = 100;
162
+ outputPercentage.innerText = '100%';
162
163
  adjustOutputHeight();
163
164
  currentCommandId = command_id;
164
165
  nextOutputLink = `/command_output/${command_id}${urlToken}`;
@@ -314,17 +315,16 @@ function initResizer() {
314
315
 
315
316
  function sliderUpdateOutput()
316
317
  {
317
- const slider = document.getElementById('outputSlider');
318
318
  const percentage = slider.value;
319
319
  outputLength = Math.floor((fullOutput.length * percentage) / 100);
320
320
  const limitedOutput = fullOutput.slice(0, outputLength);
321
321
  terminal.clear();
322
322
  terminal.reset();
323
323
  terminal.write(limitedOutput);
324
- document.getElementById('outputPercentage').innerText = `${percentage}%`;
324
+ outputPercentage.innerText = `${percentage}%`;
325
325
  }
326
326
 
327
- document.getElementById('outputSlider').addEventListener('input', sliderUpdateOutput);
327
+ slider.addEventListener('input', sliderUpdateOutput);
328
328
 
329
329
  window.addEventListener('resize', adjustOutputHeight);
330
330
  window.addEventListener('load', initResizer);
@@ -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.15'
16
- __version_tuple__ = version_tuple = (1, 4, 15)
15
+ __version__ = version = '1.4.17'
16
+ __version_tuple__ = version_tuple = (1, 4, 17)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 1.4.15
3
+ Version: 1.4.17
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
File without changes