pywebexec 1.1.8__tar.gz → 1.1.10__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.
- {pywebexec-1.1.8/pywebexec.egg-info → pywebexec-1.1.10}/PKG-INFO +1 -1
- {pywebexec-1.1.8 → pywebexec-1.1.10}/pywebexec/pywebexec.py +5 -2
- {pywebexec-1.1.8 → pywebexec-1.1.10}/pywebexec/static/css/style.css +2 -2
- {pywebexec-1.1.8 → pywebexec-1.1.10}/pywebexec/static/js/script.js +6 -5
- {pywebexec-1.1.8 → pywebexec-1.1.10}/pywebexec/version.py +2 -2
- {pywebexec-1.1.8 → pywebexec-1.1.10/pywebexec.egg-info}/PKG-INFO +1 -1
- {pywebexec-1.1.8 → pywebexec-1.1.10}/.github/workflows/python-publish.yml +0 -0
- {pywebexec-1.1.8 → pywebexec-1.1.10}/.gitignore +0 -0
- {pywebexec-1.1.8 → pywebexec-1.1.10}/LICENSE +0 -0
- {pywebexec-1.1.8 → pywebexec-1.1.10}/README.md +0 -0
- {pywebexec-1.1.8 → pywebexec-1.1.10}/pyproject.toml +0 -0
- {pywebexec-1.1.8 → pywebexec-1.1.10}/pywebexec/__init__.py +0 -0
- {pywebexec-1.1.8 → pywebexec-1.1.10}/pywebexec/static/images/aborted.svg +0 -0
- {pywebexec-1.1.8 → pywebexec-1.1.10}/pywebexec/static/images/copy.svg +0 -0
- {pywebexec-1.1.8 → pywebexec-1.1.10}/pywebexec/static/images/copy_ok.svg +0 -0
- {pywebexec-1.1.8 → pywebexec-1.1.10}/pywebexec/static/images/failed.svg +0 -0
- {pywebexec-1.1.8 → pywebexec-1.1.10}/pywebexec/static/images/favicon.svg +0 -0
- {pywebexec-1.1.8 → pywebexec-1.1.10}/pywebexec/static/images/running.gif +0 -0
- {pywebexec-1.1.8 → pywebexec-1.1.10}/pywebexec/static/images/success.svg +0 -0
- {pywebexec-1.1.8 → pywebexec-1.1.10}/pywebexec/templates/__init__.py +0 -0
- {pywebexec-1.1.8 → pywebexec-1.1.10}/pywebexec/templates/index.html +0 -0
- {pywebexec-1.1.8 → pywebexec-1.1.10}/pywebexec.egg-info/SOURCES.txt +0 -0
- {pywebexec-1.1.8 → pywebexec-1.1.10}/pywebexec.egg-info/dependency_links.txt +0 -0
- {pywebexec-1.1.8 → pywebexec-1.1.10}/pywebexec.egg-info/entry_points.txt +0 -0
- {pywebexec-1.1.8 → pywebexec-1.1.10}/pywebexec.egg-info/requires.txt +0 -0
- {pywebexec-1.1.8 → pywebexec-1.1.10}/pywebexec.egg-info/top_level.txt +0 -0
- {pywebexec-1.1.8 → pywebexec-1.1.10}/setup.cfg +0 -0
|
@@ -342,7 +342,10 @@ def read_command_status(command_id):
|
|
|
342
342
|
if not os.path.exists(status_file_path):
|
|
343
343
|
return None
|
|
344
344
|
with open(status_file_path, 'r') as f:
|
|
345
|
-
|
|
345
|
+
try:
|
|
346
|
+
status_data = json.load(f)
|
|
347
|
+
except json.JSONDecodeError:
|
|
348
|
+
return None
|
|
346
349
|
|
|
347
350
|
# Cache the status if it is not "running"
|
|
348
351
|
if status_data['status'] != 'running':
|
|
@@ -520,7 +523,7 @@ def list_commands():
|
|
|
520
523
|
params = shlex.join(status['params'])
|
|
521
524
|
except AttributeError:
|
|
522
525
|
params = " ".join([shlex.quote(p) if " " in p else p for p in status['params']])
|
|
523
|
-
command = status
|
|
526
|
+
command = status.get('command', '-') + ' ' + params
|
|
524
527
|
commands.append({
|
|
525
528
|
'command_id': command_id,
|
|
526
529
|
'status': status['status'],
|
|
@@ -89,10 +89,10 @@ form {
|
|
|
89
89
|
background-image: url("/static/images/aborted.svg")
|
|
90
90
|
}
|
|
91
91
|
.copy_clip {
|
|
92
|
-
padding-right:
|
|
92
|
+
padding-right: 20px;
|
|
93
93
|
background-repeat: no-repeat;
|
|
94
94
|
background-position: right top;
|
|
95
|
-
background-size:
|
|
95
|
+
background-size: 20px 12px;
|
|
96
96
|
white-space: nowrap;
|
|
97
97
|
}
|
|
98
98
|
.copy_clip:hover {
|
|
@@ -33,7 +33,7 @@ async function fetchCommands() {
|
|
|
33
33
|
commandRow.onclick = () => viewOutput(command.command_id);
|
|
34
34
|
commandRow.innerHTML = `
|
|
35
35
|
<td class="monospace">
|
|
36
|
-
<span class="copy_clip" onclick="copyToClipboard('${command.command_id}', this)">${command.command_id.slice(0, 8)}</span>
|
|
36
|
+
<span class="copy_clip" onclick="copyToClipboard('${command.command_id}', this, event)">${command.command_id.slice(0, 8)}</span>
|
|
37
37
|
</td>
|
|
38
38
|
<td><span class="status-icon status-${command.status}"></span>${command.status}</td>
|
|
39
39
|
<td>${formatTime(command.start_time)}</td>
|
|
@@ -41,8 +41,7 @@ async function fetchCommands() {
|
|
|
41
41
|
<td>${command.exit_code}</td>
|
|
42
42
|
<td>${command.command.replace(/^\.\//, '')}</td>
|
|
43
43
|
<td>
|
|
44
|
-
${command.status === 'running' ? `<button onclick="stopCommand('${command.command_id}')">Stop</button>` :
|
|
45
|
-
`}
|
|
44
|
+
${command.status === 'running' ? `<button onclick="stopCommand('${command.command_id}')">Stop</button>` : `<button onclick="relaunchCommand('${command.command_id}')">Run</button>`}
|
|
46
45
|
</td>
|
|
47
46
|
<td class="monospace outcol">${command.last_output_line || ''}</td>
|
|
48
47
|
`;
|
|
@@ -146,12 +145,14 @@ function formatDuration(startTime, endTime) {
|
|
|
146
145
|
return `${hours}h ${minutes}m ${seconds}s`;
|
|
147
146
|
}
|
|
148
147
|
|
|
149
|
-
function copyToClipboard(text, element) {
|
|
148
|
+
function copyToClipboard(text, element, event) {
|
|
149
|
+
event.stopPropagation();
|
|
150
|
+
event.stopImmediatePropagation();
|
|
150
151
|
navigator.clipboard.writeText(text).then(() => {
|
|
151
152
|
element.classList.add('copy_clip_ok');
|
|
152
153
|
setTimeout(() => {
|
|
153
154
|
element.classList.remove('copy_clip_ok');
|
|
154
|
-
},
|
|
155
|
+
}, 1000);
|
|
155
156
|
});
|
|
156
157
|
}
|
|
157
158
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|