Commit a2d23e1a authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Fixup Rewrite Editor

   We should use schema_url rather them json_url on validationJSON, since the json_url is the software.cfg.json while schema_url is the actual url for the schema.
parent 50215b31
...@@ -434,7 +434,6 @@ ...@@ -434,7 +434,6 @@
return ""; return "";
} }
/*
function getSchemaUrlFromForm(element) { function getSchemaUrlFromForm(element) {
var input = element.querySelector(".parameter_schema_url"); var input = element.querySelector(".parameter_schema_url");
...@@ -443,7 +442,6 @@ ...@@ -443,7 +442,6 @@
} }
return ""; return "";
} }
*/
function showParameterForm(g) { function showParameterForm(g) {
var e = g.element.getElementsByTagName('select')[0], var e = g.element.getElementsByTagName('select')[0],
...@@ -502,7 +500,7 @@ ...@@ -502,7 +500,7 @@
var json_url = g.state.json_url, var json_url = g.state.json_url,
software_type = getSoftwareTypeFromForm(g.element), software_type = getSoftwareTypeFromForm(g.element),
json_dict = getFormValuesAsJSONDict(g.element), json_dict = getFormValuesAsJSONDict(g.element),
// schema_url = getSchemaUrlFromForm(g.element), schema_url = getSchemaUrlFromForm(g.element),
serialisation_type = getSerialisationTypeFromForm(g.element); serialisation_type = getSerialisationTypeFromForm(g.element);
if (software_type === "") { if (software_type === "") {
...@@ -514,7 +512,7 @@ ...@@ -514,7 +512,7 @@
return g.getBaseUrl(json_url) return g.getBaseUrl(json_url)
.push(function (base_url) { .push(function (base_url) {
return g.validateJSON(base_url, json_url, json_dict); return g.validateJSON(base_url, schema_url, json_dict);
}) })
.push(function (validation) { .push(function (validation) {
var error_index, var error_index,
......
...@@ -280,7 +280,7 @@ ...@@ -280,7 +280,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>999.42820.18181.40192</string> </value> <value> <string>1000.2322.46712.16657</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -298,7 +298,7 @@ ...@@ -298,7 +298,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1650370742.0</float> <float>1651775757.92</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment