Commit 6b254e69 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Fix GadgetField definition at the listbox

parent 3d48837c
...@@ -30,14 +30,16 @@ ...@@ -30,14 +30,16 @@
if (1 || (result.data.rows[i].hasOwnProperty("id"))) { if (1 || (result.data.rows[i].hasOwnProperty("id"))) {
value = result.data.rows[i].id; value = result.data.rows[i].id;
result.data.rows[i].value.computer_monitoring_status = { result.data.rows[i].value.computer_monitoring_status = {
css_class: "", field_gadget_param : {
description: "The Status", css_class: "",
hidden: 0, description: "The Status",
"default": {jio_key: value}, hidden: 0,
key: "status", "default": {jio_key: value},
url: "gadget_slapos_computer_status.html", key: "status",
title: "Status", url: "gadget_slapos_computer_status.html",
type: "GadgetField" title: "Status",
type: "GadgetField"
}
}; };
result.data.rows[i].value["listbox_uid:list"] = { result.data.rows[i].value["listbox_uid:list"] = {
//key: "listbox_uid:list", //key: "listbox_uid:list",
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>972.32024.53732.34406</string> </value> <value> <string>972.34309.59418.7099</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1545663714.39</float> <float>1552959507.85</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -30,14 +30,16 @@ ...@@ -30,14 +30,16 @@
if (1 || (result.data.rows[i].hasOwnProperty("id"))) { if (1 || (result.data.rows[i].hasOwnProperty("id"))) {
value = result.data.rows[i].id; value = result.data.rows[i].id;
result.data.rows[i].value.computer_monitoring_status = { result.data.rows[i].value.computer_monitoring_status = {
css_class: "", field_gadget_param : {
description: "The Status", css_class: "",
hidden: result.data.rows[i].value.portal_type === "Slave Instance", description: "The Status",
"default": {jio_key: value}, hidden: result.data.rows[i].value.portal_type === "Slave Instance",
key: "status", "default": {jio_key: value},
url: "gadget_slapos_instance_status.html", key: "status",
title: "Status", url: "gadget_slapos_instance_status.html",
type: "GadgetField" title: "Status",
type: "GadgetField"
}
}; };
result.data.rows[i].value["listbox_uid:list"] = { result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list", key: "listbox_uid:list",
...@@ -47,23 +49,27 @@ ...@@ -47,23 +49,27 @@
if (1 || (result.data.rows[i].value.hasOwnProperty("connection_key"))) { if (1 || (result.data.rows[i].value.hasOwnProperty("connection_key"))) {
value = result.data.rows[i].value.connection_key; value = result.data.rows[i].value.connection_key;
result.data.rows[i].value.connection_key = { result.data.rows[i].value.connection_key = {
css_class: "", field_gadget_param : {
"default": value, css_class: "",
key: "status", "default": value,
editable: 1, key: "status",
url: "gadget_slapos_label_listbox_field.html", editable: 1,
title: "Status", url: "gadget_slapos_label_listbox_field.html",
type: "GadgetField" title: "Status",
type: "GadgetField"
}
}; };
value = result.data.rows[i].value.connection_value; value = result.data.rows[i].value.connection_value;
result.data.rows[i].value.connection_value = { result.data.rows[i].value.connection_value = {
css_class: "", field_gadget_param : {
"default": value, css_class: "",
key: "status", "default": value,
editable: 1, key: "status",
url: "gadget_slapos_label_listbox_field.html", editable: 1,
title: "Status", url: "gadget_slapos_label_listbox_field.html",
type: "GadgetField" title: "Status",
type: "GadgetField"
}
}; };
result.data.rows[i].value["listbox_uid:list"] = { result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list", key: "listbox_uid:list",
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>972.32024.53732.34406</string> </value> <value> <string>974.29153.39901.20360</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1545663910.89</float> <float>1552959641.55</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -48,24 +48,28 @@ ...@@ -48,24 +48,28 @@
if (1 || (result.data.rows[i].hasOwnProperty("id"))) { if (1 || (result.data.rows[i].hasOwnProperty("id"))) {
value = result.data.rows[i].id; value = result.data.rows[i].id;
result.data.rows[i].value.translated_simulation_state_title = { result.data.rows[i].value.translated_simulation_state_title = {
css_class: "", field_gadget_param : {
description: "Payment State", css_class: "",
hidden: 0, description: "Payment State",
"default": {jio_key: value}, hidden: 0,
key: "translated_simulation_state_title", "default": {jio_key: value},
url: "gadget_slapos_invoice_state.html", key: "translated_simulation_state_title",
title: "Payment State", url: "gadget_slapos_invoice_state.html",
type: "GadgetField" title: "Payment State",
type: "GadgetField"
}
}; };
result.data.rows[i].value.download = { result.data.rows[i].value.download = {
css_class: "", field_gadget_param : {
description: "Download Invoice", css_class: "",
hidden: 0, description: "Download Invoice",
"default": {jio_key: value}, hidden: 0,
key: "download", "default": {jio_key: value},
url: "gadget_slapos_invoice_printout.html", key: "download",
title: "Download", url: "gadget_slapos_invoice_printout.html",
type: "GadgetField" title: "Download",
type: "GadgetField"
}
}; };
result.data.rows[i].value["listbox_uid:list"] = { result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list", key: "listbox_uid:list",
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>965.32073.32.37376</string> </value> <value> <string>972.32024.53732.34406</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1522772820.15</float> <float>1552960106.68</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -31,14 +31,16 @@ ...@@ -31,14 +31,16 @@
if (1 || (result.data.rows[i].hasOwnProperty("id"))) { if (1 || (result.data.rows[i].hasOwnProperty("id"))) {
value = result.data.rows[i].id; value = result.data.rows[i].id;
result.data.rows[i].value.computer_monitoring_status = { result.data.rows[i].value.computer_monitoring_status = {
css_class: "", field_gadget_param : {
description: "The Status", css_class: "",
hidden: 0, description: "The Status",
"default": {jio_key: value}, hidden: 0,
key: "status", "default": {jio_key: value},
url: "gadget_slapos_computer_status.html", key: "status",
title: "Status", url: "gadget_slapos_computer_status.html",
type: "GadgetField" title: "Status",
type: "GadgetField"
}
}; };
result.data.rows[i].value["listbox_uid:list"] = { result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list", key: "listbox_uid:list",
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>972.32024.53732.34406</string> </value> <value> <string>972.34312.53410.25173</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1545663888.89</float> <float>1552958334.09</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -22,15 +22,17 @@ ...@@ -22,15 +22,17 @@
value = result.data.rows[i].id; value = result.data.rows[i].id;
news = result.data.rows[i].Project_getNewsDict; news = result.data.rows[i].Project_getNewsDict;
result.data.rows[i].value.Project_getNewsDict = { result.data.rows[i].value.Project_getNewsDict = {
css_class: "", field_gadget_param : {
description: "The Status", css_class: "",
hidden: 0, description: "The Status",
"default": {jio_key: value, hidden: 0,
result: news}, "default": {jio_key: value,
key: "status", result: news},
url: "gadget_slapos_project_status.html", key: "status",
title: "Status", url: "gadget_slapos_project_status.html",
type: "GadgetField" title: "Status",
type: "GadgetField"
}
}; };
result.data.rows[i].value["listbox_uid:list"] = { result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list", key: "listbox_uid:list",
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>972.32024.53732.34406</string> </value> <value> <string>972.38850.13428.56541</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1545936132.29</float> <float>1552958933.45</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -31,14 +31,16 @@ ...@@ -31,14 +31,16 @@
if (1 || (result.data.rows[i].hasOwnProperty("id"))) { if (1 || (result.data.rows[i].hasOwnProperty("id"))) {
value = result.data.rows[i].id; value = result.data.rows[i].id;
result.data.rows[i].value.computer_monitoring_status = { result.data.rows[i].value.computer_monitoring_status = {
css_class: "", field_gadget_param : {
description: "The Status", css_class: "",
hidden: 0, description: "The Status",
"default": {jio_key: value}, hidden: 0,
key: "status", "default": {jio_key: value},
url: "gadget_slapos_computer_status.html", key: "status",
title: "Status", url: "gadget_slapos_computer_status.html",
type: "GadgetField" title: "Status",
type: "GadgetField"
}
}; };
result.data.rows[i].value["listbox_uid:list"] = { result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list", key: "listbox_uid:list",
......
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>972.32024.53732.34406</string> </value> <value> <string>972.34312.19568.358</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -259,7 +259,7 @@ ...@@ -259,7 +259,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1545663857.91</float> <float>1552959405.91</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -35,19 +35,21 @@ ...@@ -35,19 +35,21 @@
for (i = 0; i < len; i += 1) { for (i = 0; i < len; i += 1) {
if (1 || (result.data.rows[i].value.hasOwnProperty("text_content"))) { if (1 || (result.data.rows[i].value.hasOwnProperty("text_content"))) {
result.data.rows[i].value.text_content = { result.data.rows[i].value.text_content = {
css_class: "", field_gadget_param : {
description: "The Status", css_class: "",
hidden: 0, description: "The Status",
"default": {doc: {title: result.data.rows[i].value.title, hidden: 0,
source: result.data.rows[i].value.source_title, "default": {doc: {title: result.data.rows[i].value.title,
modification_date: result.data.rows[i].value.modification_date, source: result.data.rows[i].value.source_title,
content_type: result.data.rows[i].value.content_type, modification_date: result.data.rows[i].value.modification_date,
text_content: result.data.rows[i].value.text_content}}, content_type: result.data.rows[i].value.content_type,
key: "status", text_content: result.data.rows[i].value.text_content}},
url: "gadget_slapos_event_discussion_entry.html", key: "status",
editable: 1, url: "gadget_slapos_event_discussion_entry.html",
title: "Status", editable: 1,
type: "GadgetField" title: "Status",
type: "GadgetField"
}
}; };
result.data.rows[i].value["listbox_uid:list"] = { result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list", key: "listbox_uid:list",
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>972.32024.53732.34406</string> </value> <value> <string>972.34312.5102.14574</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1545663844.66</float> <float>1552958730.67</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -21,14 +21,16 @@ ...@@ -21,14 +21,16 @@
if (1 || (result.data.rows[i].hasOwnProperty("id"))) { if (1 || (result.data.rows[i].hasOwnProperty("id"))) {
value = result.data.rows[i].id; value = result.data.rows[i].id;
result.data.rows[i].value.monitoring_status = { result.data.rows[i].value.monitoring_status = {
css_class: "", field_gadget_param : {
description: "The Status", css_class: "",
hidden: 0, description: "The Status",
"default": {jio_key: value}, hidden: 0,
key: "status", "default": {jio_key: value},
url: "gadget_slapos_site_status.html", key: "status",
title: "Status", url: "gadget_slapos_site_status.html",
type: "GadgetField" title: "Status",
type: "GadgetField"
}
}; };
result.data.rows[i].value["listbox_uid:list"] = { result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list", key: "listbox_uid:list",
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>972.32024.53732.34406</string> </value> <value> <string>972.34170.7223.58060</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1545655326.6</float> <float>1552959192.5</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -31,23 +31,27 @@ ...@@ -31,23 +31,27 @@
if (1 || (result.data.rows[i].value.hasOwnProperty("connection_key"))) { if (1 || (result.data.rows[i].value.hasOwnProperty("connection_key"))) {
value = result.data.rows[i].value.connection_key; value = result.data.rows[i].value.connection_key;
result.data.rows[i].value.connection_key = { result.data.rows[i].value.connection_key = {
css_class: "", field_gadget_param : {
"default": value, css_class: "",
key: "status", "default": value,
editable: 1, key: "status",
url: "gadget_slapos_label_listbox_field.html", editable: 1,
title: "Status", url: "gadget_slapos_label_listbox_field.html",
type: "GadgetField" title: "Status",
type: "GadgetField"
}
}; };
value = result.data.rows[i].value.connection_value; value = result.data.rows[i].value.connection_value;
result.data.rows[i].value.connection_value = { result.data.rows[i].value.connection_value = {
css_class: "", field_gadget_param : {
"default": value, css_class: "",
key: "status", "default": value,
editable: 1, key: "status",
url: "gadget_slapos_label_listbox_field.html", editable: 1,
title: "Status", url: "gadget_slapos_label_listbox_field.html",
type: "GadgetField" title: "Status",
type: "GadgetField"
}
}; };
result.data.rows[i].value["listbox_uid:list"] = { result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list", key: "listbox_uid:list",
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>972.32024.53732.34406</string> </value> <value> <string>972.34311.9684.42598</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1545663788.86</float> <float>1552958464.97</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -39,14 +39,16 @@ ...@@ -39,14 +39,16 @@
if (1 || (result.data.rows[i].hasOwnProperty("id"))) { if (1 || (result.data.rows[i].hasOwnProperty("id"))) {
value = result.data.rows[i].id; value = result.data.rows[i].id;
result.data.rows[i].value.monitoring_status = { result.data.rows[i].value.monitoring_status = {
css_class: "", field_gadget_param : {
description: "The Status", css_class: "",
hidden: 0, description: "The Status",
"default": {jio_key: value}, hidden: 0,
key: "status", "default": {jio_key: value},
url: "gadget_slapos_site_status.html", key: "status",
title: "Status", url: "gadget_slapos_site_status.html",
type: "GadgetField" title: "Status",
type: "GadgetField"
}
}; };
result.data.rows[i].value["listbox_uid:list"] = { result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list", key: "listbox_uid:list",
......
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>966.41526.6603.40089</string> </value> <value> <string>974.29127.37243.30225</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -259,7 +259,7 @@ ...@@ -259,7 +259,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1522849395.6</float> <float>1552958273.58</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