Commit e32e4988 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Dont display unset/non-editable fields

   .... unset require where it isn't needed.
parent 93977a36
...@@ -214,7 +214,7 @@ ...@@ -214,7 +214,7 @@
"title": results[2][4], "title": results[2][4],
"default": gadget.state.doc.title, "default": gadget.state.doc.title,
"css_class": "", "css_class": "",
"required": 1, "required": 0,
"editable": 0, "editable": 0,
"key": "title", "key": "title",
"hidden": 0, "hidden": 0,
...@@ -225,7 +225,7 @@ ...@@ -225,7 +225,7 @@
"title": results[2][5], "title": results[2][5],
"default": gadget.state.doc.reference, "default": gadget.state.doc.reference,
"css_class": "", "css_class": "",
"required": 1, "required": 0,
"editable": 0, "editable": 0,
"key": "reference", "key": "reference",
"hidden": 0, "hidden": 0,
...@@ -237,7 +237,7 @@ ...@@ -237,7 +237,7 @@
"default": gadget.state.doc.subordination, "default": gadget.state.doc.subordination,
"css_class": "", "css_class": "",
"items": computer_network_list, "items": computer_network_list,
"required": 1, "required": 0,
"editable": 1, "editable": 1,
"key": "subordination", "key": "subordination",
"hidden": 0, "hidden": 0,
...@@ -249,7 +249,7 @@ ...@@ -249,7 +249,7 @@
"default": gadget.state.doc.allocation_scope, "default": gadget.state.doc.allocation_scope,
"css_class": "", "css_class": "",
"items": allocation_scope_list, "items": allocation_scope_list,
"required": 1, "required": 0,
"editable": 1, "editable": 1,
"key": "allocation_scope", "key": "allocation_scope",
"hidden": 0, "hidden": 0,
...@@ -261,7 +261,7 @@ ...@@ -261,7 +261,7 @@
"default": gadget.state.doc.monitor_scope, "default": gadget.state.doc.monitor_scope,
"css_class": "", "css_class": "",
"items": monitor_scope_list, "items": monitor_scope_list,
"required": 1, "required": 0,
"editable": 1, "editable": 1,
"key": "monitor_scope", "key": "monitor_scope",
"hidden": 0, "hidden": 0,
...@@ -273,7 +273,7 @@ ...@@ -273,7 +273,7 @@
"default": gadget.state.doc.upgrade_scope, "default": gadget.state.doc.upgrade_scope,
"css_class": "", "css_class": "",
"items": upgrade_scope_list, "items": upgrade_scope_list,
"required": 1, "required": 0,
"editable": 1, "editable": 1,
"key": "upgrade_scope", "key": "upgrade_scope",
"hidden": 0, "hidden": 0,
...@@ -284,10 +284,10 @@ ...@@ -284,10 +284,10 @@
"title": results[2][27], "title": results[2][27],
"default": gadget.state.doc.source_title, "default": gadget.state.doc.source_title,
"css_class": "", "css_class": "",
"required": 1, "required": 0,
"editable": 0, "editable": 0,
"key": "", "key": "",
"hidden": 0, "hidden": gadget.state.doc.source_title ? 0 : 1,
"type": "StringField" "type": "StringField"
}, },
"my_source_project": { "my_source_project": {
...@@ -295,10 +295,10 @@ ...@@ -295,10 +295,10 @@
"title": results[2][28], "title": results[2][28],
"default": gadget.state.doc.source_project_title, "default": gadget.state.doc.source_project_title,
"css_class": "", "css_class": "",
"required": 1, "required": 0,
"editable": 0, "editable": 0,
"key": "", "key": "",
"hidden": 0, "hidden": gadget.state.doc.source_project_title ? 0 : 1,
"type": "StringField" "type": "StringField"
}, },
"my_monitoring_status": { "my_monitoring_status": {
...@@ -308,7 +308,7 @@ ...@@ -308,7 +308,7 @@
result: gadget.state.doc.news, result: gadget.state.doc.news,
portal_type: "Compute Node"}, portal_type: "Compute Node"},
"css_class": "", "css_class": "",
"required": 1, "required": 0,
"editable": 0, "editable": 0,
"url": "gadget_slapos_status.html", "url": "gadget_slapos_status.html",
"sandbox": "", "sandbox": "",
......
...@@ -267,7 +267,7 @@ ...@@ -267,7 +267,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>1006.58340.40727.23620</string> </value> <value> <string>1008.49947.49157.41540</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -287,7 +287,7 @@ ...@@ -287,7 +287,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1680014283.61</float> <float>1685554088.09</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
"title": result[1][1], "title": result[1][1],
"default": gadget.state.doc.title, "default": gadget.state.doc.title,
"css_class": "", "css_class": "",
"required": 1, "required": 0,
"editable": editable, "editable": editable,
"key": "title", "key": "title",
"hidden": 0, "hidden": 0,
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
"title": result[1][2], "title": result[1][2],
"default": gadget.state.doc.reference, "default": gadget.state.doc.reference,
"css_class": "", "css_class": "",
"required": 1, "required": 0,
"editable": 0, "editable": 0,
"key": "reference", "key": "reference",
"hidden": 0, "hidden": 0,
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
"default": {jio_key: gadget.state.jio_key, "default": {jio_key: gadget.state.jio_key,
result: gadget.state.doc.news}, result: gadget.state.doc.news},
"css_class": "", "css_class": "",
"required": 1, "required": 0,
"editable": 0, "editable": 0,
"url": "gadget_slapos_status.html", "url": "gadget_slapos_status.html",
"sandbox": "", "sandbox": "",
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
"required": 0, "required": 0,
"editable": 0, "editable": 0,
"key": "", "key": "",
"hidden": 0, "hidden": gadget.state.doc.source_project_title ? 0 : 1,
"type": "StringField" "type": "StringField"
}, },
"my_source_section": { "my_source_section": {
...@@ -178,10 +178,10 @@ ...@@ -178,10 +178,10 @@
"title": result[1][8], "title": result[1][8],
"default": gadget.state.doc.source_section_title, "default": gadget.state.doc.source_section_title,
"css_class": "", "css_class": "",
"required": 1, "required": 0,
"editable": 0, "editable": 0,
"key": "", "key": "",
"hidden": 0, "hidden": gadget.state.doc.source_section_title ? 0 : 1,
"type": "StringField" "type": "StringField"
}, },
"listbox": { "listbox": {
......
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>1001.44818.54264.13038</string> </value> <value> <string>1008.49948.50158.41267</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -258,7 +258,7 @@ ...@@ -258,7 +258,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1658167069.0</float> <float>1685554128.59</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
"title": result[1][3], "title": result[1][3],
"default": gadget.state.doc.title, "default": gadget.state.doc.title,
"css_class": "", "css_class": "",
"required": 1, "required": 0,
"editable": 0, "editable": 0,
"key": "title", "key": "title",
"hidden": 0, "hidden": 0,
...@@ -255,7 +255,7 @@ ...@@ -255,7 +255,7 @@
"title": result[1][15], "title": result[1][15],
"default": gadget.state.doc.short_title, "default": gadget.state.doc.short_title,
"css_class": "", "css_class": "",
"required": 1, "required": 0,
"editable": 1, "editable": 1,
"key": "short_title", "key": "short_title",
"hidden": 0, "hidden": 0,
...@@ -266,7 +266,7 @@ ...@@ -266,7 +266,7 @@
"title": result[1][16], "title": result[1][16],
"default": gadget.state.doc.description, "default": gadget.state.doc.description,
"css_class": "", "css_class": "",
"required": 1, "required": 0,
"editable": 1, "editable": 1,
"key": "description", "key": "description",
"hidden": 0, "hidden": 0,
...@@ -277,7 +277,7 @@ ...@@ -277,7 +277,7 @@
"title": result[1][4], "title": result[1][4],
"default": gadget.state.doc.reference, "default": gadget.state.doc.reference,
"css_class": "", "css_class": "",
"required": 1, "required": 0,
"editable": 0, "editable": 0,
"key": "reference", "key": "reference",
"hidden": 0, "hidden": 0,
...@@ -288,7 +288,7 @@ ...@@ -288,7 +288,7 @@
"title": result[1][11], "title": result[1][11],
"default": gadget.state.doc.slap_state_title, "default": gadget.state.doc.slap_state_title,
"css_class": "", "css_class": "",
"required": 1, "required": 0,
"editable": 0, "editable": 0,
"key": "slap_state_title", "key": "slap_state_title",
"hidden": 0, "hidden": 0,
...@@ -301,7 +301,7 @@ ...@@ -301,7 +301,7 @@
"<a target=_blank href=" + gadget.state.doc.url_string + ">" + "<a target=_blank href=" + gadget.state.doc.url_string + ">" +
gadget.state.doc.url_string + "</a>", gadget.state.doc.url_string + "</a>",
"css_class": "", "css_class": "",
"required": 1, "required": 0,
"editable": 0, "editable": 0,
"key": "url_string", "key": "url_string",
"hidden": 0, "hidden": 0,
...@@ -312,7 +312,7 @@ ...@@ -312,7 +312,7 @@
"title": result[1][19], "title": result[1][19],
"default": parameter_dict, "default": parameter_dict,
"css_class": "", "css_class": "",
"required": 1, "required": 0,
"editable": 1, "editable": 1,
"url": "gadget_erp5_page_slap_parameter_form.html", "url": "gadget_erp5_page_slap_parameter_form.html",
"sandbox": "", "sandbox": "",
...@@ -325,10 +325,10 @@ ...@@ -325,10 +325,10 @@
"title": result[1][21], "title": result[1][21],
"default": gadget.state.doc.source_project_title, "default": gadget.state.doc.source_project_title,
"css_class": "", "css_class": "",
"required": 1, "required": 0,
"editable": 0, "editable": 0,
"key": "source_project_title", "key": "source_project_title",
"hidden": 0, "hidden": gadget.state.doc.source_project_title ? 0 : 1,
"type": "StringField" "type": "StringField"
}, },
"my_source": { "my_source": {
...@@ -339,7 +339,7 @@ ...@@ -339,7 +339,7 @@
"required": 0, "required": 0,
"editable": 0, "editable": 0,
"key": "source_title", "key": "source_title",
"hidden": 0, "hidden": gadget.state.doc.source_title ? 0 : 1,
"type": "StringField" "type": "StringField"
}, },
"my_monitoring_status": { "my_monitoring_status": {
......
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>1008.19588.59182.15291</string> </value> <value> <string>1008.49946.40563.64597</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -258,7 +258,7 @@ ...@@ -258,7 +258,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1683727059.58</float> <float>1685554267.16</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
} }
for (i = 0; i < organisation_len; i += 1) { for (i = 0; i < organisation_len; i += 1) {
if (result[3].data.rows[i].value.title === doc.source_project_title) { if (result[3].data.rows[i].value.title === doc.source_section_title) {
default_organisation = result[3].data.rows[i].id; default_organisation = result[3].data.rows[i].id;
} }
organisation_list.push([ organisation_list.push([
......
...@@ -301,7 +301,7 @@ ...@@ -301,7 +301,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1683828480.9</float> <float>1685555627.73</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