Commit 34ce56e9 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Failover to key if title isnt defined (parameter editor)

parent 165542b2
...@@ -326,9 +326,13 @@ ...@@ -326,9 +326,13 @@
for (key in json_field.properties) { for (key in json_field.properties) {
if (json_field.properties.hasOwnProperty(key)) { if (json_field.properties.hasOwnProperty(key)) {
if (editable || default_dict[key] !== undefined) { if (editable || default_dict[key] !== undefined) {
label = domsugar("label", { if (json_field.properties[key].title !== undefined) {
'text': json_field.properties[key].title label = domsugar("label", {
}); 'text': json_field.properties[key].title
});
} else {
label = domsugar("label", {'text': key });
}
is_required = false; is_required = false;
if ((Array.isArray(json_field.required)) && (json_field.required.includes(key))) { if ((Array.isArray(json_field.required)) && (json_field.required.includes(key))) {
is_required = true; is_required = true;
......
...@@ -282,7 +282,7 @@ ...@@ -282,7 +282,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>1008.44146.47863.60757</string> </value> <value> <string>1008.48224.2250.61030</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -302,7 +302,7 @@ ...@@ -302,7 +302,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1685377921.85</float> <float>1687544274.5</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