pywebexec 1.4.16__py3-none-any.whl → 1.4.17__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.
@@ -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);
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.4.16'
16
- __version_tuple__ = version_tuple = (1, 4, 16)
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.16
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
@@ -1,6 +1,6 @@
1
1
  pywebexec/__init__.py,sha256=4spIsVaF8RJt8S58AG_wWoORRNkws9Iwqprj27C3ljM,99
2
2
  pywebexec/pywebexec.py,sha256=095dLydKEtrihG4ld78yqy5QIbFIWO_JdugtHj10FzI,28134
3
- pywebexec/version.py,sha256=sKRJPUEh1laY8OT9vcLeuQ7G3PQC7WcvaaimRXuCRuo,413
3
+ pywebexec/version.py,sha256=SWUyms4VxRCFHq27p43L6ONua9907mV6gcqRfpenKW8,413
4
4
  pywebexec/static/css/Consolas NF.ttf,sha256=DJEOzF0eqZ-kxu3Gs_VE8X0NJqiobBzmxWDGpdgGRxI,1313900
5
5
  pywebexec/static/css/style.css,sha256=cGJHPFj23SQ_bFpesfUaFA3VFxhXtpRUOL_zzx3x_X8,5726
6
6
  pywebexec/static/css/xterm.css,sha256=gy8_LGA7Q61DUf8ElwFQzHqHMBQnbbEmpgZcbdgeSHI,5383
@@ -15,7 +15,7 @@ pywebexec/static/images/running.gif,sha256=iYuzQGkMxrakSIwt6gPieKCImGZoSAHmU5MUN
15
15
  pywebexec/static/images/success.svg,sha256=PJDcCSTevJh7rkfSFLtc7P0pbeh8PVQBS8DaOLQemmc,489
16
16
  pywebexec/static/js/commands.js,sha256=8JDb3Q55EJOYf2Q9Uy6qEuqAnn1oGjM0RndgQ4aOjqo,7725
17
17
  pywebexec/static/js/popup.js,sha256=i7BPBh6oS0Q6H528DwP6KwJ8CKh7ULwm1rLHSbyvDhk,4656
18
- pywebexec/static/js/script.js,sha256=x3YJn61YOpV5bSum3nrV7MRP7lMAAWv1-mhWBJen2nE,12161
18
+ pywebexec/static/js/script.js,sha256=kHfJuQQs1H9kfHGruuDnECV5O71keuMc21JPX9l1jss,12046
19
19
  pywebexec/static/js/xterm/LICENSE,sha256=EU1P4eXTull-_T9I80VuwnJXubB-zLzUl3xpEYj2T1M,1083
20
20
  pywebexec/static/js/xterm/ansi_up.min.js,sha256=KNGV0vEr30hNqKQimTAvGVy-icD5A1JqMQTtvYtKR2Y,13203
21
21
  pywebexec/static/js/xterm/xterm-addon-fit.js,sha256=Pprm9pZe4SadVXS5Bc8b9VnC9Ex4QlWwA0pxOH53Gck,1460
@@ -23,9 +23,9 @@ pywebexec/static/js/xterm/xterm.js,sha256=Bzka76jZwEhVt_LlS0e0qMw7ryGa1p5qfxFyeo
23
23
  pywebexec/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
24
  pywebexec/templates/index.html,sha256=DYtT555wSNhnFtzzHhPMWJireynCJNnAuTytpoORQeE,2321
25
25
  pywebexec/templates/popup.html,sha256=T6_tAOUoA58sA1oxB5pb8i42RenoMdCsH8T86Gccb6Q,945
26
- pywebexec-1.4.16.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
27
- pywebexec-1.4.16.dist-info/METADATA,sha256=O_TD8MqU1G4_EpqVrGmj9Vj9LSkLwmvbQr6Ui4IpwNo,7801
28
- pywebexec-1.4.16.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
29
- pywebexec-1.4.16.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
30
- pywebexec-1.4.16.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
31
- pywebexec-1.4.16.dist-info/RECORD,,
26
+ pywebexec-1.4.17.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
27
+ pywebexec-1.4.17.dist-info/METADATA,sha256=kNMbOsvL81CZzPgQuZMIvn_zInRVbb0mWygCjYiH7J8,7801
28
+ pywebexec-1.4.17.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
29
+ pywebexec-1.4.17.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
30
+ pywebexec-1.4.17.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
31
+ pywebexec-1.4.17.dist-info/RECORD,,