pywebexec 2.1.17__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 -6
- pywebexec/static/js/schemaform.js +12 -3
- pywebexec/static/js/swagger-form.js +1 -1
- pywebexec/version.py +2 -2
- {pywebexec-2.1.17.dist-info → pywebexec-2.1.18.dist-info}/METADATA +1 -1
- {pywebexec-2.1.17.dist-info → pywebexec-2.1.18.dist-info}/RECORD +10 -10
- {pywebexec-2.1.17.dist-info → pywebexec-2.1.18.dist-info}/LICENSE +0 -0
- {pywebexec-2.1.17.dist-info → pywebexec-2.1.18.dist-info}/WHEEL +0 -0
- {pywebexec-2.1.17.dist-info → pywebexec-2.1.18.dist-info}/entry_points.txt +0 -0
- {pywebexec-2.1.17.dist-info → pywebexec-2.1.18.dist-info}/top_level.txt +0 -0
@@ -256,8 +256,6 @@ async function fetchExecutables() {
|
|
256
256
|
|
257
257
|
}
|
258
258
|
|
259
|
-
let schemaValues = {};
|
260
|
-
|
261
259
|
paramsInput.addEventListener('focus', () => {
|
262
260
|
const currentCmd = commandInput.value;
|
263
261
|
paramsInput.name = currentCmd;
|
@@ -267,8 +265,6 @@ paramsInput.addEventListener('focus', () => {
|
|
267
265
|
if (gExecutables[currentCmd] && gExecutables[currentCmd].schema && gExecutables[currentCmd].schema.properties && paramsContainer.style.display == 'none') {
|
268
266
|
createSchemaForm($('#schemaForm'), gExecutables[currentCmd].schema, async function (errors, values) {
|
269
267
|
if (errors) {
|
270
|
-
schemaValues[currentCmd] = values;
|
271
|
-
|
272
268
|
console.log(errors);
|
273
269
|
alert(errors[0].message);
|
274
270
|
return false;
|
@@ -276,7 +272,6 @@ paramsInput.addEventListener('focus', () => {
|
|
276
272
|
const commandName = commandInput.value;
|
277
273
|
fitAddon.fit();
|
278
274
|
terminal.clear();
|
279
|
-
schemaValues[currentCmd] = values;
|
280
275
|
payload = { params: values, rows: terminal.rows, cols: terminal.cols }
|
281
276
|
if ('parallel' in values) {
|
282
277
|
payload['parallel'] = values['parallel'];
|
@@ -306,7 +301,7 @@ paramsInput.addEventListener('focus', () => {
|
|
306
301
|
console.log('Error running command:', error);
|
307
302
|
}
|
308
303
|
}
|
309
|
-
},
|
304
|
+
}, currentCmd.toString());
|
310
305
|
setHelpDivPosition();
|
311
306
|
paramsContainer.style.display = 'block';
|
312
307
|
const input1 = schemaFormPW.querySelector('input, select, textarea');
|
@@ -52,8 +52,13 @@ function extractKeysAndPlaceholders(obj, formoptions, prefix = '') {
|
|
52
52
|
}
|
53
53
|
return result;
|
54
54
|
}
|
55
|
-
|
56
|
-
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
|
+
}
|
57
62
|
if (schema && schema.schema_options) {
|
58
63
|
schema_options = schema.schema_options;
|
59
64
|
} else {
|
@@ -162,7 +167,11 @@ function createSchemaForm(form, schema, onSubmit, value={}) {
|
|
162
167
|
txt.setAttribute("spellcheck", "false");
|
163
168
|
txt.addEventListener("input", () => adjustTxtHeight(txt));
|
164
169
|
});
|
165
|
-
|
170
|
+
form[0].addEventListener('input', () => {
|
171
|
+
schemaValues[schemaName] = jsform.root.getFormValues();
|
172
|
+
// localStorage.setItem('schemaValues', JSON.stringify(schemaValues));
|
173
|
+
});
|
174
|
+
|
166
175
|
return jsform;
|
167
176
|
}
|
168
177
|
function adjustTxtHeight(txt) {
|
@@ -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
|
File without changes
|