pywebexec 1.5.19__py3-none-any.whl → 1.6.1__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/static/css/style.css +26 -6
- pywebexec/static/images/norun.svg +1 -0
- pywebexec/static/js/script.js +25 -5
- pywebexec/templates/index.html +2 -2
- pywebexec/version.py +2 -2
- {pywebexec-1.5.19.dist-info → pywebexec-1.6.1.dist-info}/METADATA +1 -1
- {pywebexec-1.5.19.dist-info → pywebexec-1.6.1.dist-info}/RECORD +11 -10
- {pywebexec-1.5.19.dist-info → pywebexec-1.6.1.dist-info}/LICENSE +0 -0
- {pywebexec-1.5.19.dist-info → pywebexec-1.6.1.dist-info}/WHEEL +0 -0
- {pywebexec-1.5.19.dist-info → pywebexec-1.6.1.dist-info}/entry_points.txt +0 -0
- {pywebexec-1.5.19.dist-info → pywebexec-1.6.1.dist-info}/top_level.txt +0 -0
pywebexec/static/css/style.css
CHANGED
@@ -55,7 +55,9 @@ select { /* Safari bug */
|
|
55
55
|
border-radius: 10px;
|
56
56
|
overflow-y: hidden;
|
57
57
|
}
|
58
|
-
.copy-icon {
|
58
|
+
.copy-icon {
|
59
|
+
cursor: pointer;
|
60
|
+
}
|
59
61
|
.monospace {
|
60
62
|
font-family: Consolas NF,monospace;
|
61
63
|
font-size: 13px;
|
@@ -63,7 +65,10 @@ select { /* Safari bug */
|
|
63
65
|
.system-font {
|
64
66
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
65
67
|
}
|
66
|
-
.copied {
|
68
|
+
.copied {
|
69
|
+
color: green;
|
70
|
+
margin-left: 5px;
|
71
|
+
}
|
67
72
|
button {
|
68
73
|
-webkit-appearance: none;
|
69
74
|
-webkit-border-radius: none;
|
@@ -101,17 +106,23 @@ form {
|
|
101
106
|
background-image: url("/static/images/favicon.svg");
|
102
107
|
vertical-align: bottom;
|
103
108
|
}
|
109
|
+
#thStatus {
|
110
|
+
cursor: pointer;
|
111
|
+
}
|
112
|
+
.status-norun {
|
113
|
+
background-image: url("/static/images/norun.svg");
|
114
|
+
}
|
104
115
|
.status-running {
|
105
|
-
background-image: url("/static/images/running.svg")
|
116
|
+
background-image: url("/static/images/running.svg");
|
106
117
|
}
|
107
118
|
.status-success {
|
108
|
-
background-image: url("/static/images/success.svg")
|
119
|
+
background-image: url("/static/images/success.svg");
|
109
120
|
}
|
110
121
|
.status-failed {
|
111
|
-
background-image: url("/static/images/failed.svg")
|
122
|
+
background-image: url("/static/images/failed.svg");
|
112
123
|
}
|
113
124
|
.status-aborted {
|
114
|
-
background-image: url("/static/images/aborted.svg")
|
125
|
+
background-image: url("/static/images/aborted.svg");
|
115
126
|
}
|
116
127
|
.copy_clip {
|
117
128
|
padding-right: 20px;
|
@@ -370,3 +381,12 @@ span {
|
|
370
381
|
font-size: 13px;
|
371
382
|
}
|
372
383
|
|
384
|
+
.nbrunning {
|
385
|
+
display: inline-block;
|
386
|
+
font-size: 13px;
|
387
|
+
font-weight: normal;
|
388
|
+
border: 1px solid #aaa;
|
389
|
+
border-radius: 18px;
|
390
|
+
min-width: 18px;
|
391
|
+
text-align: center;
|
392
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg fill="#000000" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path d="m0 12c0-6.627 5.373-12 12-12s12 5.373 12 12-5.373 12-12 12c-6.624-.008-11.992-5.376-12-11.999zm2.4 0c0 5.302 4.298 9.6 9.6 9.6s9.6-4.298 9.6-9.6-4.298-9.6-9.6-9.6c-5.299.006-9.594 4.301-9.6 9.599v.001zm4 0c0-3.093 2.507-5.6 5.6-5.6s5.6 2.507 5.6 5.6-2.507 5.6-5.6 5.6c-3.093 0-5.6-2.507-5.6-5.6z"></path></g></svg>
|
pywebexec/static/js/script.js
CHANGED
@@ -9,6 +9,8 @@ const maxScrollback = 99999;
|
|
9
9
|
const maxSize = 10485760; // 10MB
|
10
10
|
let fontSize = 14;
|
11
11
|
let isPaused = false;
|
12
|
+
let showRunningOnly = false;
|
13
|
+
let hiddenCommandIds = [];
|
12
14
|
|
13
15
|
function initTerminal()
|
14
16
|
{
|
@@ -115,7 +117,7 @@ document.getElementById('launchForm').addEventListener('submit', async (event) =
|
|
115
117
|
}
|
116
118
|
});
|
117
119
|
|
118
|
-
async function fetchCommands() {
|
120
|
+
async function fetchCommands(hide=false) {
|
119
121
|
try {
|
120
122
|
const response = await fetch(`/commands${urlToken}`);
|
121
123
|
if (!response.ok) {
|
@@ -130,21 +132,28 @@ async function fetchCommands() {
|
|
130
132
|
currentCommandId = commands[0].command_id;
|
131
133
|
viewOutput(currentCommandId);
|
132
134
|
}
|
135
|
+
runningCommands = [];
|
133
136
|
commands.forEach(command => {
|
137
|
+
if (hide && showRunningOnly && command.status !== 'running') {
|
138
|
+
hiddenCommandIds.push(command.command_id);
|
139
|
+
return;
|
140
|
+
}
|
141
|
+
if (hiddenCommandIds.includes(command.command_id)) return;
|
134
142
|
const commandRow = document.createElement('tr');
|
135
143
|
commandRow.className = `clickable-row ${command.command_id === currentCommandId ? 'currentcommand' : ''}`;
|
136
144
|
commandRow.onclick = () => viewOutput(command.command_id);
|
145
|
+
if (command.status === 'running') runningCommands.push(command.command.replace(/^\.\//, ''));
|
137
146
|
commandRow.innerHTML = `
|
138
147
|
<td class="monospace">
|
139
148
|
${navigator.clipboard == undefined ? `${command.command_id.slice(0, 8)}` : `<span class="copy_clip" onclick="copyToClipboard('${command.command_id}', this, event)">${command.command_id.slice(0, 8)}</span>`}
|
140
149
|
</td>
|
141
150
|
<td>${formatTime(command.start_time)}</td>
|
142
151
|
<td>${command.status === 'running' ? formatDuration(command.start_time, new Date().toISOString()) : formatDuration(command.start_time, command.end_time)}</td>
|
143
|
-
<td class="system-font">${command.command.replace(/^\.\//, '')}</td>
|
144
152
|
<td><span class="status-icon status-${command.status}"></span>${command.status}${command.status === 'failed' ? ` (${command.exit_code})` : ''}</td>
|
145
153
|
<td>
|
146
154
|
${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>`}
|
147
155
|
</td>
|
156
|
+
<td class="system-font">${command.command.replace(/^\.\//, '')}</td>
|
148
157
|
<td class="monospace outcol">
|
149
158
|
<button class="popup-button" onclick="openPopup('${command.command_id}', event)"></button>
|
150
159
|
${command.last_output_line || ''}
|
@@ -152,6 +161,13 @@ async function fetchCommands() {
|
|
152
161
|
`;
|
153
162
|
commandsTbody.appendChild(commandRow);
|
154
163
|
});
|
164
|
+
if (runningCommands.length) {
|
165
|
+
document.getElementById('thStatus').innerHTML=`<span class="status-icon status-running"></span>Running <span class="system-font nbrunning">${runningCommands.length}</span>`;
|
166
|
+
document.getElementById('thStatus').setAttribute('title', runningCommands.join("\n"));
|
167
|
+
} else {
|
168
|
+
document.getElementById('thStatus').innerHTML=`<span class="status-icon status-norun"></span>Status`;
|
169
|
+
document.getElementById('thStatus').setAttribute('title', "no command running");
|
170
|
+
}
|
155
171
|
document.getElementById('dimmer').style.display = 'none';
|
156
172
|
} catch (error) {
|
157
173
|
console.log('Error fetching commands:', error);
|
@@ -198,9 +214,7 @@ async function fetchOutput(url) {
|
|
198
214
|
toggleButton.style.display = 'none';
|
199
215
|
document.getElementById('commandStatus').classList.remove('status-running');
|
200
216
|
document.getElementById('commandStatus').classList.add(`status-${data.status}`);
|
201
|
-
|
202
|
-
if (row.length > 0)
|
203
|
-
row[0].cells[4].innerHTML = `<span class="status-icon status-${data.status}"></span>${data.status}`;
|
217
|
+
fetchCommands();
|
204
218
|
} else {
|
205
219
|
toggleButton.style.display = 'block';
|
206
220
|
const title = extractTitle(data.output);
|
@@ -429,6 +443,12 @@ function toggleFetchOutput() {
|
|
429
443
|
|
430
444
|
toggleButton.addEventListener('click', toggleFetchOutput);
|
431
445
|
|
446
|
+
document.getElementById('thStatus').addEventListener('click', () => {
|
447
|
+
showRunningOnly = !showRunningOnly;
|
448
|
+
hiddenCommandIds = [];
|
449
|
+
fetchCommands(showRunningOnly);
|
450
|
+
});
|
451
|
+
|
432
452
|
window.addEventListener('resize', adjustOutputHeight);
|
433
453
|
window.addEventListener('load', () => {
|
434
454
|
initResizer();
|
pywebexec/templates/index.html
CHANGED
@@ -31,9 +31,9 @@
|
|
31
31
|
<th>ID</th>
|
32
32
|
<th>Start Time</th>
|
33
33
|
<th>Duration</th>
|
34
|
-
<th>
|
35
|
-
<th>Status</th>
|
34
|
+
<th id="thStatus"><span class="status-icon status-norun"></span>Status</th>
|
36
35
|
<th>Action</th>
|
36
|
+
<th>Command</th>
|
37
37
|
<th>Output</th>
|
38
38
|
</tr>
|
39
39
|
</thead>
|
pywebexec/version.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
pywebexec/__init__.py,sha256=4spIsVaF8RJt8S58AG_wWoORRNkws9Iwqprj27C3ljM,99
|
2
2
|
pywebexec/pywebexec.py,sha256=S24FSD4XywesMvM6nqJMdS8E1lF9mklN4nUlnZUp9Zs,28760
|
3
|
-
pywebexec/version.py,sha256=
|
3
|
+
pywebexec/version.py,sha256=edFVVa8HpVPfLqL2y6CKtViSqJREfmXxInA-HCy-134,411
|
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=_v1VCscdxUZjuFRkK4ty012oXTNysyKi2m0SiqoF0Oo,8182
|
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
|
@@ -12,6 +12,7 @@ pywebexec/static/images/failed.svg,sha256=ADZ7IKrUyOXtqpivnz3VcH0-Wru-I5MOi3OJAk
|
|
12
12
|
pywebexec/static/images/favicon.svg,sha256=9gSN5Oak1zTWhTCyutlupPBKUxcbdoVt7dvhk8xvEug,1224
|
13
13
|
pywebexec/static/images/font-decrease.svg,sha256=89TJXQpfZ-XDJ2qC0c7cbLH-tWC-4AJQr_VOgsp06Gg,1782
|
14
14
|
pywebexec/static/images/font-increase.svg,sha256=u-EBxUzmOhKx4UH96fb4gLZ0l6Jkew1HLhcSqz7Z1ak,1869
|
15
|
+
pywebexec/static/images/norun.svg,sha256=_9PyQklBOfUwFak1gVrm-76tYM825urAFhj-zMBec20,555
|
15
16
|
pywebexec/static/images/pause.svg,sha256=qKDx76yirEvSeeez50zUn0i9Twdem9XLgveekALVLy4,1387
|
16
17
|
pywebexec/static/images/popup.svg,sha256=0Bl9A_v5cBsMPn6FnOlVWlAQKgd2zqiWQbhjcL9BDzI,559
|
17
18
|
pywebexec/static/images/resume.svg,sha256=99LP1Ya2JXakRCO9kW8JMuT_4a_CannF65EiuwtvK4A,607
|
@@ -19,7 +20,7 @@ pywebexec/static/images/running.svg,sha256=fBCYwYb2O9K4N3waC2nURP25NRwZlqR4PbDZy
|
|
19
20
|
pywebexec/static/images/success.svg,sha256=PJDcCSTevJh7rkfSFLtc7P0pbeh8PVQBS8DaOLQemmc,489
|
20
21
|
pywebexec/static/js/commands.js,sha256=8JDb3Q55EJOYf2Q9Uy6qEuqAnn1oGjM0RndgQ4aOjqo,7725
|
21
22
|
pywebexec/static/js/popup.js,sha256=TCzGoPVS_EvwzGc544SvRgLYG7XWXRF8tIQGfu3atrU,8533
|
22
|
-
pywebexec/static/js/script.js,sha256=
|
23
|
+
pywebexec/static/js/script.js,sha256=mGY_-A1rZNjgpTU8FsVH0j6Tj7v4pHpSaREPbTttvEs,17376
|
23
24
|
pywebexec/static/js/xterm/LICENSE,sha256=EU1P4eXTull-_T9I80VuwnJXubB-zLzUl3xpEYj2T1M,1083
|
24
25
|
pywebexec/static/js/xterm/addon-canvas.js,sha256=ez6QTVvsmLVNJmdJlM-ZQ5bErwlxAQ_9DUmDIptl2TM,94607
|
25
26
|
pywebexec/static/js/xterm/addon-canvas.js.map,sha256=ECBA4B-BqUpdFeRzlsEWLSQnudnhLP-yPQJ8_hKquMo,379537
|
@@ -30,11 +31,11 @@ pywebexec/static/js/xterm/addon-unicode11.js.map,sha256=paDj5KKtTIUGedQn2x7CaUTD
|
|
30
31
|
pywebexec/static/js/xterm/xterm.js,sha256=H5kaw7Syg-v5bmCuI6AKUnZd06Lkb6b92p8aqwMvdJU,289441
|
31
32
|
pywebexec/static/js/xterm/xterm.js.map,sha256=Y7O2Pb-fIS7Z8AC1D5s04_aiW_Jf1f4mCfN0U_OI6Zw,1118392
|
32
33
|
pywebexec/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
33
|
-
pywebexec/templates/index.html,sha256=
|
34
|
+
pywebexec/templates/index.html,sha256=3XAXlpluzmTxC75KLzHDI4aJvQyQrOShB_weJ27PE2U,2815
|
34
35
|
pywebexec/templates/popup.html,sha256=6FfzMjxuAC_xwyMGPf3p5tm6iPVY0QCsqY80eotD0z8,1362
|
35
|
-
pywebexec-1.
|
36
|
-
pywebexec-1.
|
37
|
-
pywebexec-1.
|
38
|
-
pywebexec-1.
|
39
|
-
pywebexec-1.
|
40
|
-
pywebexec-1.
|
36
|
+
pywebexec-1.6.1.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
|
37
|
+
pywebexec-1.6.1.dist-info/METADATA,sha256=UiFTdeosOUAPxCTu68JhlVO5SYAA3qiudlZC3t3rVCI,7801
|
38
|
+
pywebexec-1.6.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
39
|
+
pywebexec-1.6.1.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
|
40
|
+
pywebexec-1.6.1.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
|
41
|
+
pywebexec-1.6.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|