pywebexec 2.1.16__py3-none-any.whl → 2.1.18__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/js/executables.js +1 -2
- pywebexec/static/js/schemaform.js +25 -11
- pywebexec/static/js/swagger-form.js +1 -1
- pywebexec/version.py +2 -2
- {pywebexec-2.1.16.dist-info → pywebexec-2.1.18.dist-info}/METADATA +1 -1
- {pywebexec-2.1.16.dist-info → pywebexec-2.1.18.dist-info}/RECORD +10 -10
- {pywebexec-2.1.16.dist-info → pywebexec-2.1.18.dist-info}/WHEEL +1 -1
- {pywebexec-2.1.16.dist-info → pywebexec-2.1.18.dist-info}/LICENSE +0 -0
- {pywebexec-2.1.16.dist-info → pywebexec-2.1.18.dist-info}/entry_points.txt +0 -0
- {pywebexec-2.1.16.dist-info → pywebexec-2.1.18.dist-info}/top_level.txt +0 -0
@@ -256,7 +256,6 @@ async function fetchExecutables() {
|
|
256
256
|
|
257
257
|
}
|
258
258
|
|
259
|
-
|
260
259
|
paramsInput.addEventListener('focus', () => {
|
261
260
|
const currentCmd = commandInput.value;
|
262
261
|
paramsInput.name = currentCmd;
|
@@ -302,7 +301,7 @@ paramsInput.addEventListener('focus', () => {
|
|
302
301
|
console.log('Error running command:', error);
|
303
302
|
}
|
304
303
|
}
|
305
|
-
});
|
304
|
+
}, currentCmd.toString());
|
306
305
|
setHelpDivPosition();
|
307
306
|
paramsContainer.style.display = 'block';
|
308
307
|
const input1 = schemaFormPW.querySelector('input, select, textarea');
|
@@ -20,7 +20,11 @@ function formInputHandle() {
|
|
20
20
|
} else {
|
21
21
|
size = 12;
|
22
22
|
}
|
23
|
+
if (input.value) {
|
24
|
+
size = 2;
|
25
|
+
}
|
23
26
|
input.setAttribute('size', size);
|
27
|
+
setTimeout(() => adjustInputWidth(input), 1);
|
24
28
|
input.addEventListener('input', () => adjustInputWidth(input));
|
25
29
|
inputHandlers.push(input);
|
26
30
|
}
|
@@ -48,8 +52,13 @@ function extractKeysAndPlaceholders(obj, formoptions, prefix = '') {
|
|
48
52
|
}
|
49
53
|
return result;
|
50
54
|
}
|
51
|
-
|
52
|
-
function createSchemaForm(form, schema, onSubmit) {
|
55
|
+
let schemaValues = {};
|
56
|
+
function createSchemaForm(form, schema, onSubmit, schemaName) {
|
57
|
+
if (schemaValues[schemaName]) {
|
58
|
+
value = schemaValues[schemaName];
|
59
|
+
} else {
|
60
|
+
value = {};
|
61
|
+
}
|
53
62
|
if (schema && schema.schema_options) {
|
54
63
|
schema_options = schema.schema_options;
|
55
64
|
} else {
|
@@ -141,6 +150,7 @@ function createSchemaForm(form, schema, onSubmit) {
|
|
141
150
|
schema: schema,
|
142
151
|
onSubmit: onSubmit,
|
143
152
|
form: formDesc,
|
153
|
+
value: value,
|
144
154
|
// params: {
|
145
155
|
// fieldHtmlClass: "input-small",
|
146
156
|
// }
|
@@ -152,18 +162,22 @@ function createSchemaForm(form, schema, onSubmit) {
|
|
152
162
|
formInputHandle();
|
153
163
|
|
154
164
|
form[0].querySelectorAll('textarea').forEach(txt => {
|
155
|
-
txt.style.height = "0";
|
156
|
-
|
157
|
-
txt.setAttribute("spellcheck", "false")
|
158
|
-
txt.addEventListener("input", (
|
159
|
-
e.target.style.height = "0";
|
160
|
-
e.target.style.height = (e.target.scrollHeight+2) + "px";
|
161
|
-
});
|
165
|
+
txt.style.height = "0";
|
166
|
+
setTimeout(() => adjustTxtHeight(txt), 1);
|
167
|
+
txt.setAttribute("spellcheck", "false");
|
168
|
+
txt.addEventListener("input", () => adjustTxtHeight(txt));
|
162
169
|
});
|
163
|
-
|
170
|
+
form[0].addEventListener('input', () => {
|
171
|
+
schemaValues[schemaName] = jsform.root.getFormValues();
|
172
|
+
// localStorage.setItem('schemaValues', JSON.stringify(schemaValues));
|
173
|
+
});
|
174
|
+
|
164
175
|
return jsform;
|
165
176
|
}
|
166
|
-
|
177
|
+
function adjustTxtHeight(txt) {
|
178
|
+
txt.style.height = "0";
|
179
|
+
txt.style.height = txt.scrollHeight + "px";
|
180
|
+
}
|
167
181
|
async function getSwaggerSpec() {
|
168
182
|
const response = await fetch('/swagger.yaml');
|
169
183
|
if (!response.ok) {
|
@@ -88,7 +88,7 @@ window.onload = function() {
|
|
88
88
|
const form = document.createElement("form");
|
89
89
|
form.id = routePathId;
|
90
90
|
form.classList.add("schema-form");
|
91
|
-
jsform = createSchemaForm($(form), swaggerSchemas[routePath], null);
|
91
|
+
jsform = createSchemaForm($(form), swaggerSchemas[routePath], null, routePath);
|
92
92
|
// form.addEventListener("input", formInput(node, jsform));
|
93
93
|
form.addEventListener("input", addFormInputListener(node, jsform));
|
94
94
|
node.parentNode.insertBefore(form, node.nextSibling);
|
pywebexec/version.py
CHANGED
@@ -2,7 +2,7 @@ pywebexec/__init__.py,sha256=197fHJy0UDBwTTpGCGortZRr-w2kTaD7MxqdbVmTEi0,61
|
|
2
2
|
pywebexec/host_ip.py,sha256=Ud_HTflWVQ8789aoQ2RZdT1wGI-ccvrwSWGz_c7T3TI,1241
|
3
3
|
pywebexec/pywebexec.py,sha256=kufip6m7MWjCIjtheUYuFUZgnNS5_W3kC5gVFVSUVX8,45662
|
4
4
|
pywebexec/swagger.yaml,sha256=zP_Nz69vZx0iwbKTwiQgSs8rJRUTiGKRyIkWzMPANOE,6688
|
5
|
-
pywebexec/version.py,sha256=
|
5
|
+
pywebexec/version.py,sha256=jKhjDDPkXCuEk44GYAoeIIRStFXiStBmbDX_bJM8XTI,513
|
6
6
|
pywebexec/static/css/form.css,sha256=eApJskeJ3MCzC7_p4gXgoIbvbG5s8m4bP1O4KHHqeiA,5293
|
7
7
|
pywebexec/static/css/markdown.css,sha256=3RzUnpVBdF6cQuB_NXV7hMTc0quYU8sfyuZcpsREj6A,1939
|
8
8
|
pywebexec/static/css/style.css,sha256=ynccbEDzK07rurLm-UirUs5j_hVfXlIgaHeUIq9WvA0,9969
|
@@ -33,11 +33,11 @@ pywebexec/static/images/resume.svg,sha256=99LP1Ya2JXakRCO9kW8JMuT_4a_CannF65Eiuw
|
|
33
33
|
pywebexec/static/images/running.svg,sha256=fBCYwYb2O9K4N3waC2nURP25NRwZlqR4PbDZy6JQMww,610
|
34
34
|
pywebexec/static/images/success.svg,sha256=NVwezvVMplt46ElW798vqGfrL21Mw_DWHUp_qiD_FU8,489
|
35
35
|
pywebexec/static/images/swagger-ui.svg,sha256=FR0yeOVwe4zCYKZAjCGcT_m0Mf25NexIVaSXifIkoU0,2117
|
36
|
-
pywebexec/static/js/executables.js,sha256=
|
36
|
+
pywebexec/static/js/executables.js,sha256=V9SUmRQP9M69jYbahNrsV4_oI0ASZv_F6Ax9wj0S0Ww,12171
|
37
37
|
pywebexec/static/js/popup.js,sha256=0fr3pp4j9D2fXEVnHyQrx2bPWFHfgbb336dbewgH1d8,9023
|
38
|
-
pywebexec/static/js/schemaform.js,sha256=
|
38
|
+
pywebexec/static/js/schemaform.js,sha256=Kt5E7ic6PMY3lBrxMJZ5-KHHBgaQGDs8hWvWLO-Ei8g,6406
|
39
39
|
pywebexec/static/js/script.js,sha256=KrtLF77vKvKomKAIy0rix-T1hx4VTgjkQunHvgs-jaA,17631
|
40
|
-
pywebexec/static/js/swagger-form.js,sha256=
|
40
|
+
pywebexec/static/js/swagger-form.js,sha256=o2ovbTpqwy6H2yubV1NIi7VBQfAqW7seZWQ6O78ACb8,3837
|
41
41
|
pywebexec/static/js/js-yaml/LICENSE,sha256=oHvCRGi5ZUznalR9R6LbKC0HcztxXbTHOpi9Y5YflVA,1084
|
42
42
|
pywebexec/static/js/js-yaml/js-yaml.min.js,sha256=Rdw90D3AegZwWiwpibjH9wkBPwS9U4bjJ51ORH8H69c,39430
|
43
43
|
pywebexec/static/js/marked/LICENSE.md,sha256=jjo_gvWaYJWPVsoI9EVkfDKkcz3HymwsRvbriYRxq5w,2942
|
@@ -67,9 +67,9 @@ pywebexec/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
|
|
67
67
|
pywebexec/templates/index.html,sha256=w18O2plH_yS8bqlPsu5hwFFmCj9H2hWLSV8B6ADcSwU,3900
|
68
68
|
pywebexec/templates/popup.html,sha256=3kpMccKD_OLLhJ4Y9KRw6Ny8wQWjVaRrUfV9y5-bDiQ,1580
|
69
69
|
pywebexec/templates/swagger_ui.html,sha256=9ngyldkyEdLonBjl97mbIZUlVk-jxwcHrvFzMSrveyU,1067
|
70
|
-
pywebexec-2.1.
|
71
|
-
pywebexec-2.1.
|
72
|
-
pywebexec-2.1.
|
73
|
-
pywebexec-2.1.
|
74
|
-
pywebexec-2.1.
|
75
|
-
pywebexec-2.1.
|
70
|
+
pywebexec-2.1.18.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
|
71
|
+
pywebexec-2.1.18.dist-info/METADATA,sha256=upqvKlbMXuOQ-yC3reYNyrS9eufIXXonIxmlTVGBLnQ,12811
|
72
|
+
pywebexec-2.1.18.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
|
73
|
+
pywebexec-2.1.18.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
|
74
|
+
pywebexec-2.1.18.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
|
75
|
+
pywebexec-2.1.18.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|