pywebexec 1.4.15__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.
- pywebexec/pywebexec.py +2 -1
- pywebexec/static/js/script.js +8 -8
- pywebexec/version.py +2 -2
- {pywebexec-1.4.15.dist-info → pywebexec-1.4.17.dist-info}/METADATA +1 -1
- {pywebexec-1.4.15.dist-info → pywebexec-1.4.17.dist-info}/RECORD +9 -9
- {pywebexec-1.4.15.dist-info → pywebexec-1.4.17.dist-info}/LICENSE +0 -0
- {pywebexec-1.4.15.dist-info → pywebexec-1.4.17.dist-info}/WHEEL +0 -0
- {pywebexec-1.4.15.dist-info → pywebexec-1.4.17.dist-info}/entry_points.txt +0 -0
- {pywebexec-1.4.15.dist-info → pywebexec-1.4.17.dist-info}/top_level.txt +0 -0
pywebexec/pywebexec.py
CHANGED
@@ -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
|
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)
|
pywebexec/static/js/script.js
CHANGED
@@ -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 (
|
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
|
-
|
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
|
-
|
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
|
-
|
324
|
+
outputPercentage.innerText = `${percentage}%`;
|
325
325
|
}
|
326
326
|
|
327
|
-
|
327
|
+
slider.addEventListener('input', sliderUpdateOutput);
|
328
328
|
|
329
329
|
window.addEventListener('resize', adjustOutputHeight);
|
330
330
|
window.addEventListener('load', initResizer);
|
pywebexec/version.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
pywebexec/__init__.py,sha256=4spIsVaF8RJt8S58AG_wWoORRNkws9Iwqprj27C3ljM,99
|
2
|
-
pywebexec/pywebexec.py,sha256=
|
3
|
-
pywebexec/version.py,sha256=
|
2
|
+
pywebexec/pywebexec.py,sha256=095dLydKEtrihG4ld78yqy5QIbFIWO_JdugtHj10FzI,28134
|
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=
|
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.
|
27
|
-
pywebexec-1.4.
|
28
|
-
pywebexec-1.4.
|
29
|
-
pywebexec-1.4.
|
30
|
-
pywebexec-1.4.
|
31
|
-
pywebexec-1.4.
|
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,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|