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 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>
@@ -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: 10px;
266
- margin-top: 10px;
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
+
@@ -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';
@@ -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
- /*const title = extractTitle(data.output);
203
+ const title = extractTitle(data.output);
202
204
  if (title) {
203
- document.title = title;
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
@@ -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>
@@ -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
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.5.9'
16
- __version_tuple__ = version_tuple = (1, 5, 9)
15
+ __version__ = version = '1.5.11'
16
+ __version_tuple__ = version_tuple = (1, 5, 11)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 1.5.9
3
+ Version: 1.5.11
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Home-page: https://github.com/joknarf/pywebexec
6
6
  Author: Franck Jouvanceau
@@ -1,8 +1,8 @@
1
1
  pywebexec/__init__.py,sha256=4spIsVaF8RJt8S58AG_wWoORRNkws9Iwqprj27C3ljM,99
2
- pywebexec/pywebexec.py,sha256=NmetF1ZQ7LsgmXDZwlwa2q05oXduVfh1AiOkKOu5HN8,28893
3
- pywebexec/version.py,sha256=ylpxiWr4jebA2etznQR3gR_O42Lb5dOzM-BrUXQTJRA,411
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=OM-gJPLw0DcJwMgMXHDKc_9C87LYNu3bHssx_UtXi1Y,7273
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=8ttMa_aeH0yzTWiM1kzEfPwIR0YqlfesddaccJ1_5Fo,7838
22
- pywebexec/static/js/script.js,sha256=hgQsO-U0WoiFJdSPb5TyBJxePC-CxYyMmQGZJ0e7PmA,15472
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=XaT2IU7GcRj3iV-GmDPo8aghsYiUGxSH3kvPFzhaM2Y,2695
34
- pywebexec/templates/popup.html,sha256=CSNAVc4_aATG5oHX91BCOl30htMZpMxV4MJAwKXQ7i8,1302
35
- pywebexec-1.5.9.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
36
- pywebexec-1.5.9.dist-info/METADATA,sha256=53KDtj1as-Es3mPnbAKJ4_iXRYqhra7xZ6CN9AKlSqU,7801
37
- pywebexec-1.5.9.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
38
- pywebexec-1.5.9.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
39
- pywebexec-1.5.9.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
40
- pywebexec-1.5.9.dist-info/RECORD,,
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,,