pywebexec 1.4.11__tar.gz → 1.4.12__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.4.11/pywebexec.egg-info → pywebexec-1.4.12}/PKG-INFO +1 -1
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/pywebexec.py +3 -1
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/static/js/popup.js +2 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/templates/popup.html +3 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/version.py +2 -2
- {pywebexec-1.4.11 → pywebexec-1.4.12/pywebexec.egg-info}/PKG-INFO +1 -1
- {pywebexec-1.4.11 → pywebexec-1.4.12}/.github/workflows/python-publish.yml +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/.gitignore +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/LICENSE +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/README.md +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pyproject.toml +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/__init__.py +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/static/css/Consolas NF.ttf +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/static/css/style.css +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/static/css/xterm.css +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/static/images/aborted.svg +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/static/images/copy.svg +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/static/images/copy_ok.svg +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/static/images/down-arrow.svg +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/static/images/failed.svg +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/static/images/favicon.svg +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/static/images/popup.svg +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/static/images/running.gif +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/static/images/success.svg +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/static/js/commands.js +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/static/js/script.js +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/static/js/xterm/LICENSE +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/static/js/xterm/ansi_up.min.js +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/static/js/xterm/xterm-addon-fit.js +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/static/js/xterm/xterm.js +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/templates/__init__.py +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec/templates/index.html +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec.egg-info/SOURCES.txt +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec.egg-info/dependency_links.txt +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec.egg-info/entry_points.txt +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec.egg-info/requires.txt +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/pywebexec.egg-info/top_level.txt +0 -0
- {pywebexec-1.4.11 → pywebexec-1.4.12}/setup.cfg +0 -0
@@ -9,6 +9,7 @@ import argparse
|
|
9
9
|
import random
|
10
10
|
import string
|
11
11
|
from datetime import datetime, timezone, timedelta
|
12
|
+
import time
|
12
13
|
import shlex
|
13
14
|
from gunicorn.app.base import Application
|
14
15
|
import ipaddress
|
@@ -285,6 +286,7 @@ def daemon_d(action, pidfilepath, silent=False, hostname=None, args=None):
|
|
285
286
|
print(e)
|
286
287
|
|
287
288
|
def start_term():
|
289
|
+
os.environ["PYWEBEXEC"] = " (shared)"
|
288
290
|
os.chdir(CWD)
|
289
291
|
command_id = str(uuid.uuid4())
|
290
292
|
start_time = datetime.now().isoformat()
|
@@ -454,7 +456,6 @@ def script(output_file):
|
|
454
456
|
sigwinch_passthrough(None, None)
|
455
457
|
signal.signal(signal.SIGWINCH, sigwinch_passthrough)
|
456
458
|
p.interact()
|
457
|
-
|
458
459
|
|
459
460
|
|
460
461
|
def run_command(command, params, command_id, user):
|
@@ -703,6 +704,7 @@ def main():
|
|
703
704
|
with open(basef + ".log", "ab+") as log:
|
704
705
|
pywebexec = subprocess.Popen([sys.executable] + sys.argv[:-1], stdout=log, stderr=log)
|
705
706
|
start_term()
|
707
|
+
time.sleep(1)
|
706
708
|
pywebexec.terminate()
|
707
709
|
sys.exit()
|
708
710
|
|
@@ -47,6 +47,7 @@ async function fetchOutput(url) {
|
|
47
47
|
try {
|
48
48
|
const response = await fetch(url);
|
49
49
|
if (!response.ok) {
|
50
|
+
document.getElementById('dimmer').style.display = 'none';
|
50
51
|
return;
|
51
52
|
}
|
52
53
|
const data = await response.json();
|
@@ -72,6 +73,7 @@ async function fetchOutput(url) {
|
|
72
73
|
}
|
73
74
|
}
|
74
75
|
} catch (error) {
|
76
|
+
document.getElementById('dimmer').style.display = 'block';
|
75
77
|
console.log('Error fetching output:', error);
|
76
78
|
}
|
77
79
|
}
|
@@ -8,6 +8,9 @@
|
|
8
8
|
<link rel="stylesheet" href="/static/css/xterm.css">
|
9
9
|
</head>
|
10
10
|
<body>
|
11
|
+
<div id="dimmer" class="dimmer">
|
12
|
+
<div class="dimmer-text">Server not available</div>
|
13
|
+
</div>
|
11
14
|
<div id="output" class="output"></div>
|
12
15
|
<div class="slider-container">
|
13
16
|
<input type="range" id="outputSlider" min="0" max="100" value="100">
|
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
|
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
|