pywebexec 2.4.0__py3-none-any.whl → 2.4.2__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 +2 -0
- pywebexec/static/js/tablefilter.js +54 -2
- pywebexec/version.py +2 -2
- {pywebexec-2.4.0.dist-info → pywebexec-2.4.2.dist-info}/METADATA +1 -1
- {pywebexec-2.4.0.dist-info → pywebexec-2.4.2.dist-info}/RECORD +9 -9
- {pywebexec-2.4.0.dist-info → pywebexec-2.4.2.dist-info}/WHEEL +0 -0
- {pywebexec-2.4.0.dist-info → pywebexec-2.4.2.dist-info}/entry_points.txt +0 -0
- {pywebexec-2.4.0.dist-info → pywebexec-2.4.2.dist-info}/licenses/LICENSE +0 -0
- {pywebexec-2.4.0.dist-info → pywebexec-2.4.2.dist-info}/top_level.txt +0 -0
pywebexec/static/css/style.css
CHANGED
@@ -53,6 +53,7 @@ th {
|
|
53
53
|
align-items: center;
|
54
54
|
gap: 5px;
|
55
55
|
white-space: nowrap;
|
56
|
+
font-weight: 600;
|
56
57
|
}
|
57
58
|
.sort-btn {
|
58
59
|
color: #aaa;
|
@@ -538,6 +539,7 @@ body.dimmed * {
|
|
538
539
|
text-align: center;
|
539
540
|
padding: 0px 4px;
|
540
541
|
margin-left: auto;
|
542
|
+
cursor: pointer
|
541
543
|
}
|
542
544
|
|
543
545
|
.xterm-accessibility {
|
@@ -21,11 +21,13 @@ function initTableFilters(table) {
|
|
21
21
|
// Add sort button at the beginning
|
22
22
|
contentSpan.insertBefore(sortBtn, contentSpan.firstChild);
|
23
23
|
|
24
|
-
// Add row counter for last column
|
24
|
+
// Add export button and row counter for last column
|
25
25
|
if (index === headers.length - 1) {
|
26
|
+
// Add row counter
|
26
27
|
const rowCount = document.createElement('span');
|
27
28
|
rowCount.className = 'row-count';
|
28
29
|
rowCount.classList.add('system-font');
|
30
|
+
rowCount.onclick = () => exportToExcel(table);
|
29
31
|
contentSpan.appendChild(rowCount);
|
30
32
|
}
|
31
33
|
|
@@ -47,7 +49,7 @@ function initTableFilters(table) {
|
|
47
49
|
function updateRowCount(table, count) {
|
48
50
|
const rowCount = table.querySelector('.row-count');
|
49
51
|
if (rowCount) {
|
50
|
-
rowCount.textContent =
|
52
|
+
rowCount.textContent = `⤓ ${count}`;
|
51
53
|
}
|
52
54
|
}
|
53
55
|
|
@@ -143,6 +145,56 @@ function applyFilters(table) {
|
|
143
145
|
}
|
144
146
|
}
|
145
147
|
|
148
|
+
function exportToExcel(table) {
|
149
|
+
// Create HTML content
|
150
|
+
const html = `
|
151
|
+
<html>
|
152
|
+
<head>
|
153
|
+
<meta charset="UTF-8">
|
154
|
+
<style>
|
155
|
+
table { border-collapse: collapse; }
|
156
|
+
th, td { border: 1px solid black; padding: 5px; }
|
157
|
+
th { background-color: #f2f2f2; }
|
158
|
+
</style>
|
159
|
+
</head>
|
160
|
+
<body>
|
161
|
+
<table>
|
162
|
+
<thead>
|
163
|
+
<tr>${
|
164
|
+
Array.from(table.querySelectorAll('thead th'))
|
165
|
+
.filter((_, i) => i !== 4 || table !== commandsTable)
|
166
|
+
.map(th => `<th>${th.querySelector('.th-content')?.textContent.replace('⇕', '').replace(/⤓.*/, '').trim() || ''}</th>`)
|
167
|
+
.join('')
|
168
|
+
}</tr>
|
169
|
+
</thead>
|
170
|
+
<tbody>${
|
171
|
+
Array.from(table.querySelectorAll('tbody tr'))
|
172
|
+
.filter(row => row.style.display !== 'none')
|
173
|
+
.map(row =>
|
174
|
+
`<tr>${
|
175
|
+
Array.from(row.cells)
|
176
|
+
.filter((_, i) => i !== 4 || table !== commandsTable)
|
177
|
+
.map(cell => `<td>${cell.textContent.trim()}</td>`)
|
178
|
+
.join('')
|
179
|
+
}</tr>`
|
180
|
+
).join('')
|
181
|
+
}</tbody>
|
182
|
+
</table>
|
183
|
+
</body>
|
184
|
+
</html>`;
|
185
|
+
|
186
|
+
// Create and trigger download
|
187
|
+
const blob = new Blob([html], { type: 'application/vnd.ms-excel' });
|
188
|
+
const url = window.URL.createObjectURL(blob);
|
189
|
+
const a = document.createElement('a');
|
190
|
+
a.href = url;
|
191
|
+
a.download = 'export_' + new Date().toISOString().slice(0,10) + '.xls';
|
192
|
+
document.body.appendChild(a);
|
193
|
+
a.click();
|
194
|
+
document.body.removeChild(a);
|
195
|
+
window.URL.revokeObjectURL(url);
|
196
|
+
}
|
197
|
+
|
146
198
|
let commandsTable = document.querySelector('#commandsTable');
|
147
199
|
document.addEventListener('DOMContentLoaded', () => {
|
148
200
|
if (commandsTable) initTableFilters(commandsTable);
|
pywebexec/version.py
CHANGED
@@ -2,10 +2,10 @@ pywebexec/__init__.py,sha256=197fHJy0UDBwTTpGCGortZRr-w2kTaD7MxqdbVmTEi0,61
|
|
2
2
|
pywebexec/host_ip.py,sha256=oiCMlo2o3AkkgXDarUSx8T3FWXKI0vk1-EPnx5FGBd8,1332
|
3
3
|
pywebexec/pywebexec.py,sha256=NT4f7Xd4qMkAgjgwguqKKbUkOTCqT7ArRYlsW57Pfwg,48477
|
4
4
|
pywebexec/swagger.yaml,sha256=I_oLpp7Hqel8SDEEykvpmCT-Gv3ytGlziq9bvQOrtZY,7598
|
5
|
-
pywebexec/version.py,sha256=
|
5
|
+
pywebexec/version.py,sha256=RUYmq8GFeP2I_XyABp0HnMjSBqGntVVhgCtP72xF2Nk,511
|
6
6
|
pywebexec/static/css/form.css,sha256=2JUhraeL46JaiNoD_MSKA2JdouHkXaamhd77DnCqG8k,7291
|
7
7
|
pywebexec/static/css/markdown.css,sha256=br4-iK9wigTs54N2KHtjgZ4KLH0THVSvJo-XZAdMHiE,1970
|
8
|
-
pywebexec/static/css/style.css,sha256=
|
8
|
+
pywebexec/static/css/style.css,sha256=SzOKCcH1HWQtSWY1Sw70Y4c_lNTyqStj2zIOIpXmqK0,11694
|
9
9
|
pywebexec/static/css/swagger-ui.css,sha256=xhXN8fnUaIACGHuPIEIr9-qmyYr6Zx0k2wv4Qy7Bg1Y,154985
|
10
10
|
pywebexec/static/css/swagger-ui.css.map,sha256=dJy-xBn_htK4BNupTMIl33ddse7BXsrCdDJWlTJodnw,258842
|
11
11
|
pywebexec/static/css/xterm.css,sha256=uo5phWaUiJgcz0DAzv46uoByLLbJLeetYosL1xf68rY,5559
|
@@ -38,7 +38,7 @@ pywebexec/static/js/popup.js,sha256=IaKmk2U2hEn-Nv6krf_PPW6LaG8NcpCkJKb7lUX0qZo,
|
|
38
38
|
pywebexec/static/js/schemaform.js,sha256=2AIjwdjSDTE2ide8UMmQt4tS-7-JKqidKdopq9mNzvo,12458
|
39
39
|
pywebexec/static/js/script.js,sha256=SpNmskHKJHza0Au7QWrb17EKqiMPbMz5CDmaLt_i3M4,21548
|
40
40
|
pywebexec/static/js/swagger-form.js,sha256=CLcSHMhk5P4-_2MIRBoJLgEnIj_9keDDSzUugXHZjio,4565
|
41
|
-
pywebexec/static/js/tablefilter.js,sha256=
|
41
|
+
pywebexec/static/js/tablefilter.js,sha256=Yy4oC--5kHwbKxM9MpmLPTty_4hthHTk5xfRXYDbbqA,7772
|
42
42
|
pywebexec/static/js/js-yaml/LICENSE,sha256=oHvCRGi5ZUznalR9R6LbKC0HcztxXbTHOpi9Y5YflVA,1084
|
43
43
|
pywebexec/static/js/js-yaml/js-yaml.min.js,sha256=Rdw90D3AegZwWiwpibjH9wkBPwS9U4bjJ51ORH8H69c,39430
|
44
44
|
pywebexec/static/js/marked/LICENSE.md,sha256=jjo_gvWaYJWPVsoI9EVkfDKkcz3HymwsRvbriYRxq5w,2942
|
@@ -68,9 +68,9 @@ pywebexec/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
|
|
68
68
|
pywebexec/templates/index.html,sha256=29-MBjeJ5mgYdrkRB27WiY0okQLYcFFycJvdCMuwvV0,3974
|
69
69
|
pywebexec/templates/popup.html,sha256=3kpMccKD_OLLhJ4Y9KRw6Ny8wQWjVaRrUfV9y5-bDiQ,1580
|
70
70
|
pywebexec/templates/swagger_ui.html,sha256=MAPr-z96VERAecDvX37V8q2Nxph-O0fNDBul1x2w9SI,1147
|
71
|
-
pywebexec-2.4.
|
72
|
-
pywebexec-2.4.
|
73
|
-
pywebexec-2.4.
|
74
|
-
pywebexec-2.4.
|
75
|
-
pywebexec-2.4.
|
76
|
-
pywebexec-2.4.
|
71
|
+
pywebexec-2.4.2.dist-info/licenses/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
|
72
|
+
pywebexec-2.4.2.dist-info/METADATA,sha256=28achxL0CmBFf2p6xtaV8FWL2l1KR6KwSsj2wefTnlc,13015
|
73
|
+
pywebexec-2.4.2.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
74
|
+
pywebexec-2.4.2.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
|
75
|
+
pywebexec-2.4.2.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
|
76
|
+
pywebexec-2.4.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|