pywebexec 1.5.9__py3-none-any.whl → 1.5.11__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 +3 -1
- pywebexec/static/css/style.css +22 -4
- pywebexec/static/js/popup.js +8 -1
- pywebexec/static/js/script.js +9 -3
- pywebexec/templates/index.html +1 -0
- pywebexec/templates/popup.html +1 -0
- pywebexec/version.py +2 -2
- {pywebexec-1.5.9.dist-info → pywebexec-1.5.11.dist-info}/METADATA +1 -1
- {pywebexec-1.5.9.dist-info → pywebexec-1.5.11.dist-info}/RECORD +13 -13
- {pywebexec-1.5.9.dist-info → pywebexec-1.5.11.dist-info}/LICENSE +0 -0
- {pywebexec-1.5.9.dist-info → pywebexec-1.5.11.dist-info}/WHEEL +0 -0
- {pywebexec-1.5.9.dist-info → pywebexec-1.5.11.dist-info}/entry_points.txt +0 -0
- {pywebexec-1.5.9.dist-info → pywebexec-1.5.11.dist-info}/top_level.txt +0 -0
pywebexec/pywebexec.py
CHANGED
@@ -752,12 +752,14 @@ def popup(command_id):
|
|
752
752
|
|
753
753
|
@app.route('/dopopup/<command_id>')
|
754
754
|
def do_popup(command_id):
|
755
|
+
token = request.args.get('token', '')
|
756
|
+
token_param = f'?token={token}' if token else ''
|
755
757
|
return f"""
|
756
758
|
<html>
|
757
759
|
<head>
|
758
760
|
<script type="text/javascript">
|
759
761
|
window.onload = function() {{
|
760
|
-
window.open('/popup/{command_id}', '_blank', 'width=1000,height=600');
|
762
|
+
window.open('/popup/{command_id}{token_param}', '_blank', 'width=1000,height=600');
|
761
763
|
window.close();
|
762
764
|
}};
|
763
765
|
</script>
|
pywebexec/static/css/style.css
CHANGED
@@ -83,6 +83,7 @@ form {
|
|
83
83
|
display: inline-block;
|
84
84
|
width: 16px;
|
85
85
|
height: 16px;
|
86
|
+
min-width: 16px;
|
86
87
|
margin-right: 5px;
|
87
88
|
background-size: contain;
|
88
89
|
background-repeat: no-repeat;
|
@@ -254,16 +255,18 @@ body.dimmed * {
|
|
254
255
|
transform: translate(-50%, -50%);
|
255
256
|
}
|
256
257
|
/* allow wide chars in terminal */
|
258
|
+
/*
|
257
259
|
span {
|
258
260
|
letter-spacing: 0px !important;
|
259
261
|
margin-right: -0.17px;
|
260
262
|
margin-left: -0.09px
|
261
263
|
}
|
264
|
+
*/
|
262
265
|
.slider-container {
|
263
266
|
display: flex;
|
264
267
|
align-items: center;
|
265
|
-
gap:
|
266
|
-
margin-top:
|
268
|
+
gap: 7px;
|
269
|
+
margin-top: 5px;
|
267
270
|
}
|
268
271
|
#outputSlider {
|
269
272
|
width: 100%;
|
@@ -324,10 +327,11 @@ span {
|
|
324
327
|
.pause-resume-button {
|
325
328
|
background-color: transparent;
|
326
329
|
border: none;
|
327
|
-
padding: 0
|
328
|
-
width: 24px;
|
330
|
+
/*padding: 0;*/
|
331
|
+
min-width: 24px;
|
329
332
|
height: 24px;
|
330
333
|
cursor: pointer;
|
334
|
+
flex-shrink: 0;
|
331
335
|
}
|
332
336
|
|
333
337
|
|
@@ -345,3 +349,17 @@ span {
|
|
345
349
|
pointer-events: none;
|
346
350
|
}
|
347
351
|
|
352
|
+
.command-info {
|
353
|
+
display: inline-block;
|
354
|
+
padding: 5px 10px 5px 10px;
|
355
|
+
background-color: #ddd;
|
356
|
+
max-width: 300px;
|
357
|
+
white-space: nowrap;
|
358
|
+
border-radius: 5px;
|
359
|
+
overflow: hidden;
|
360
|
+
text-overflow: ellipsis;
|
361
|
+
flex-shrink: 0;
|
362
|
+
font-family: Consolas NF, monospace;
|
363
|
+
font-size: 13px;
|
364
|
+
}
|
365
|
+
|
pywebexec/static/js/popup.js
CHANGED
@@ -109,14 +109,17 @@ async function fetchOutput(url) {
|
|
109
109
|
}
|
110
110
|
nextOutputLink = data.links.next;
|
111
111
|
if (data.status != 'running') {
|
112
|
-
document.title = document.title.replace('[running]',`[${data.status}]`);
|
113
112
|
clearInterval(outputInterval);
|
113
|
+
document.title = document.title.replace('[running]',`[${data.status}]`);
|
114
114
|
toggleButton.style.display = 'none';
|
115
|
+
document.getElementById('commandStatus').classList.remove('status-running');
|
116
|
+
document.getElementById('commandStatus').classList.add(`status-${data.status}`);
|
115
117
|
} else {
|
116
118
|
toggleButton.style.display = 'block';
|
117
119
|
const title = extractTitle(data.output);
|
118
120
|
if (title) {
|
119
121
|
document.title = `${title} - [running]`;
|
122
|
+
document.getElementById('commandInfo').innerHTML = `<span id="commandStatus" class="status-icon status-running"></span>${title}`;
|
120
123
|
}
|
121
124
|
}
|
122
125
|
}
|
@@ -141,6 +144,10 @@ async function viewOutput(command_id) {
|
|
141
144
|
return;
|
142
145
|
}
|
143
146
|
const data = await response.json();
|
147
|
+
const commandInfo = document.getElementById('commandInfo');
|
148
|
+
const command = `${data.command.replace(/^\.\//, '')} ${data.params.join(' ')}`;
|
149
|
+
commandInfo.innerHTML = `<span id="commandStatus" class="status-icon status-${data.status}"></span>${command}`;
|
150
|
+
commandInfo.setAttribute('title', command);
|
144
151
|
document.title = `${data.command} ${data.params.join(' ')} - [${data.status}]`;
|
145
152
|
if (data.command == 'term')
|
146
153
|
terminal.options.cursorInactiveStyle = 'outline';
|
pywebexec/static/js/script.js
CHANGED
@@ -196,12 +196,14 @@ async function fetchOutput(url) {
|
|
196
196
|
if (data.status != 'running') {
|
197
197
|
clearInterval(outputInterval);
|
198
198
|
toggleButton.style.display = 'none';
|
199
|
+
document.getElementById('commandStatus').classList.remove('status-running');
|
200
|
+
document.getElementById('commandStatus').classList.add(`status-${data.status}`);
|
199
201
|
} else {
|
200
202
|
toggleButton.style.display = 'block';
|
201
|
-
|
203
|
+
const title = extractTitle(data.output);
|
202
204
|
if (title) {
|
203
|
-
document.
|
204
|
-
}
|
205
|
+
document.getElementById('commandInfo').innerHTML = `<span id="commandStatus" class="status-icon status-running"></span>${title}`;
|
206
|
+
}
|
205
207
|
}
|
206
208
|
}
|
207
209
|
} catch (error) {
|
@@ -225,6 +227,10 @@ async function viewOutput(command_id) {
|
|
225
227
|
return;
|
226
228
|
}
|
227
229
|
const data = await response.json();
|
230
|
+
const commandInfo = document.getElementById('commandInfo');
|
231
|
+
const command = `${data.command.replace(/^\.\//, '')} ${data.params.join(' ')}`;
|
232
|
+
commandInfo.innerHTML = `<span id="commandStatus" class="status-icon status-${data.status}"></span>${command}`;
|
233
|
+
commandInfo.setAttribute('title', command);
|
228
234
|
if (data.command == 'term')
|
229
235
|
terminal.options.cursorInactiveStyle = 'outline';
|
230
236
|
else
|
pywebexec/templates/index.html
CHANGED
@@ -51,6 +51,7 @@
|
|
51
51
|
<button id="toggleFetch" class="pause-resume-button pause"></button>
|
52
52
|
<button id="decreaseFontSize" class="font-size-button font-decrease"></button>
|
53
53
|
<button id="increaseFontSize" class="font-size-button font-increase"></button>
|
54
|
+
<span id="commandInfo" class="command-info"></span>
|
54
55
|
</div>
|
55
56
|
<script src="/static/js/xterm/xterm.js"></script>
|
56
57
|
<script src="/static/js/xterm/addon-canvas.js"></script>
|
pywebexec/templates/popup.html
CHANGED
@@ -19,6 +19,7 @@
|
|
19
19
|
<button id="toggleFetch" class="pause-resume-button pause"></button>
|
20
20
|
<button id="decreaseFontSize" class="font-size-button font-decrease"></button>
|
21
21
|
<button id="increaseFontSize" class="font-size-button font-increase"></button>
|
22
|
+
<span id="commandInfo" class="command-info"></span>
|
22
23
|
</div>
|
23
24
|
<script src="/static/js/xterm/xterm.js"></script>
|
24
25
|
<script src="/static/js/xterm/addon-canvas.js"></script>
|
pywebexec/version.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
pywebexec/__init__.py,sha256=4spIsVaF8RJt8S58AG_wWoORRNkws9Iwqprj27C3ljM,99
|
2
|
-
pywebexec/pywebexec.py,sha256=
|
3
|
-
pywebexec/version.py,sha256=
|
2
|
+
pywebexec/pywebexec.py,sha256=hvI-vJUhokza4ozxPuuhWGFv3rMV0gqQNfNHW8eYXKk,29001
|
3
|
+
pywebexec/version.py,sha256=p1fq7QoKaNjtN3UU0XJGuZWqcgUBN1evGzppffbE8m0,413
|
4
4
|
pywebexec/static/css/Consolas NF.ttf,sha256=DJEOzF0eqZ-kxu3Gs_VE8X0NJqiobBzmxWDGpdgGRxI,1313900
|
5
|
-
pywebexec/static/css/style.css,sha256=
|
5
|
+
pywebexec/static/css/style.css,sha256=jRVrTyOQiIV8dkBwcQKn_FvCpxAgfRP5jCDE9SFpZrc,7636
|
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.gif,sha256=iYuzQGkMxrakSIwt6gPieKCImGZoSAHmU5MUNZa7cpw,25696
|
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=
|
22
|
-
pywebexec/static/js/script.js,sha256=
|
21
|
+
pywebexec/static/js/popup.js,sha256=EF0iEV2Pu0zywv_EvmxD6pJkdbSTXneYg2dX5dwD3F8,8507
|
22
|
+
pywebexec/static/js/script.js,sha256=8Dzm7gtMPcyQwedsqlzEeYliIJXARFitSEZUSzR7NbA,16093
|
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=
|
34
|
-
pywebexec/templates/popup.html,sha256=
|
35
|
-
pywebexec-1.5.
|
36
|
-
pywebexec-1.5.
|
37
|
-
pywebexec-1.5.
|
38
|
-
pywebexec-1.5.
|
39
|
-
pywebexec-1.5.
|
40
|
-
pywebexec-1.5.
|
33
|
+
pywebexec/templates/index.html,sha256=jY8YUABYuznk8LxWtGx5dn72GhHx1D-DrScx-KeMO6U,2755
|
34
|
+
pywebexec/templates/popup.html,sha256=UgI42un_4N3JwyeQJfvVC1Vm9Pn23MEWKKVcs1gsInA,1362
|
35
|
+
pywebexec-1.5.11.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
|
36
|
+
pywebexec-1.5.11.dist-info/METADATA,sha256=ND0EJv5hLg88aK1tBKg10GEZ1lD60AS2Q0Jq_3LEVH4,7802
|
37
|
+
pywebexec-1.5.11.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
38
|
+
pywebexec-1.5.11.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
|
39
|
+
pywebexec-1.5.11.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
|
40
|
+
pywebexec-1.5.11.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|