Commit 92f70f7d authored by Alain Takoudjou's avatar Alain Takoudjou

[rp5_web_monitoring] update to work with latest changes on renderjs

Fix changes after merge with erp5 master which contains latests changes on renderjs
parent 4cfc5e5d
...@@ -24,20 +24,22 @@ ...@@ -24,20 +24,22 @@
for (i = 0; i < len; i += 1) { for (i = 0; i < len; i += 1) {
if (result.data.rows[i].value.hasOwnProperty("status_date")) { if (result.data.rows[i].value.hasOwnProperty("status_date")) {
result.data.rows[i].value.status_date = { result.data.rows[i].value.status_date = {
allow_empty_time: 0, field_gadget_param: {
ampm_time_style: 0, allow_empty_time: 0,
css_class: "date_field", ampm_time_style: 0,
date_only: 0, css_class: "date_field",
description: "The Date", date_only: 0,
editable: 0, description: "The Date",
hidden: 0, editable: 0,
hidden_day_is_last_day: 0, hidden: 0,
"default": new Date(result.data.rows[i].value.status_date).toUTCString(), hidden_day_is_last_day: 0,
key: "date", "default": new Date(result.data.rows[i].value.status_date).toUTCString(),
required: 0, key: "date",
timezone_style: 0, required: 0,
title: "Status Date", timezone_style: 0,
type: "DateTimeField" title: "Status Date",
type: "DateTimeField"
}
}; };
result.data.rows[i].value["listbox_uid:list"] = { result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list", key: "listbox_uid:list",
...@@ -46,14 +48,16 @@ ...@@ -46,14 +48,16 @@
} }
if (result.data.rows[i].value.hasOwnProperty("status")) { if (result.data.rows[i].value.hasOwnProperty("status")) {
result.data.rows[i].value.status = { result.data.rows[i].value.status = {
css_class: "", field_gadget_param: {
description: "The Status", css_class: "",
hidden: 0, description: "The Status",
"default": result.data.rows[i].value.status, hidden: 0,
key: "status", "default": result.data.rows[i].value.status,
url: "gadget_erp5_field_status.html", key: "status",
title: "Status", url: "gadget_erp5_field_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",
...@@ -116,7 +120,8 @@ ...@@ -116,7 +120,8 @@
"Hosting Subscription" + "%22%29", "Hosting Subscription" + "%22%29",
"portal_type": [], "portal_type": [],
"search_column_list": [['status', 'Status'], ['title', 'Hosting Subscription']], "search_column_list": [['status', 'Status'], ['title', 'Hosting Subscription']],
"sort_column_list": [['status', 'Status'], ['title', 'Hosting Subscription'], ['instance_amount', 'Instance Amount']], "sort_column_list": [['status', 'Status'], ['title', 'Hosting Subscription'],
['instance_amount', 'Instance Amount'], ['status_date', 'Status Date']],
"sort": [['status', 'ascending'], ['title', 'ascending']], "sort": [['status', 'ascending'], ['title', 'ascending']],
"title": "Hosting Subscriptions", "title": "Hosting Subscriptions",
"command": "index", "command": "index",
......
...@@ -239,7 +239,7 @@ ...@@ -239,7 +239,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>971.13420.64097.35857</string> </value> <value> <string>971.13495.30840.12936</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -257,7 +257,7 @@ ...@@ -257,7 +257,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1540569088.19</float> <float>1541763899.25</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" /> <meta name="viewport" content="width=device-width, user-scalable=no" />
<title>ERP5 Page Monitoring Jump</title> <title>ERP5 Page Monitoring Jump</title>
<!-- renderjs --> <!-- renderjs -->
......
...@@ -18,20 +18,22 @@ ...@@ -18,20 +18,22 @@
if (result.data.rows[i].value.hasOwnProperty("date")) { if (result.data.rows[i].value.hasOwnProperty("date")) {
value = new Date(result.data.rows[i].value.date); value = new Date(result.data.rows[i].value.date);
result.data.rows[i].value.date = { result.data.rows[i].value.date = {
allow_empty_time: 0, field_gadget_param: {
ampm_time_style: 0, allow_empty_time: 0,
css_class: "date_field", ampm_time_style: 0,
date_only: 0, css_class: "date_field",
description: "The Date", date_only: 0,
editable: 0, description: "The Date",
hidden: 0, editable: 0,
hidden_day_is_last_day: 0, hidden: 0,
"default": value.toUTCString(), hidden_day_is_last_day: 0,
key: "date", "default": value.toUTCString(),
required: 0, key: "date",
timezone_style: 0, required: 0,
title: "Status Date", timezone_style: 0,
type: "DateTimeField" title: "Status Date",
type: "DateTimeField"
}
}; };
result.data.rows[i].value["listbox_uid:list"] = { result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list", key: "listbox_uid:list",
...@@ -41,14 +43,16 @@ ...@@ -41,14 +43,16 @@
if (result.data.rows[i].value.hasOwnProperty("status")) { if (result.data.rows[i].value.hasOwnProperty("status")) {
value = result.data.rows[i].value.status; value = result.data.rows[i].value.status;
result.data.rows[i].value.status = { result.data.rows[i].value.status = {
css_class: "", field_gadget_param: {
description: "The Status", css_class: "",
hidden: 0, description: "The Status",
"default": value, hidden: 0,
key: "status", "default": value,
url: "gadget_erp5_field_status.html", key: "status",
title: "Status", url: "gadget_erp5_field_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",
......
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>964.14467.38710.51797</string> </value> <value> <string>971.33301.63517.11571</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1514302362.58</float> <float>1541763469.75</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -19,20 +19,22 @@ ...@@ -19,20 +19,22 @@
if (result.data.rows[i].value.hasOwnProperty("lastBuildDate")) { if (result.data.rows[i].value.hasOwnProperty("lastBuildDate")) {
value = new Date(result.data.rows[i].value.lastBuildDate); value = new Date(result.data.rows[i].value.lastBuildDate);
result.data.rows[i].value.lastBuildDate = { result.data.rows[i].value.lastBuildDate = {
allow_empty_time: 0, field_gadget_param: {
ampm_time_style: 0, allow_empty_time: 0,
css_class: "date_field", ampm_time_style: 0,
date_only: 0, css_class: "date_field",
description: "The Date", date_only: 0,
editable: 0, description: "The Date",
hidden: 0, editable: 0,
hidden_day_is_last_day: 0, hidden: 0,
"default": value.toUTCString(), hidden_day_is_last_day: 0,
key: "lastBuildDate", "default": value.toUTCString(),
required: 0, key: "lastBuildDate",
timezone_style: 0, required: 0,
title: "Promise Date", timezone_style: 0,
type: "DateTimeField" title: "Promise Date",
type: "DateTimeField"
}
}; };
result.data.rows[i].value["listbox_uid:list"] = { result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list", key: "listbox_uid:list",
...@@ -45,8 +47,8 @@ ...@@ -45,8 +47,8 @@
for (j = 1; j < tmp.length; j += 1) { for (j = 1; j < tmp.length; j += 1) {
// first line of text is the date and status // first line of text is the date and status
if (!value && tmp[j].trim() !== "") { if (!value && tmp[j].trim() !== "") {
value += tmp[j].slice(0, 30); value += tmp[j].slice(0, 50);
if (tmp[j].length >= 30 || j + 1 < tmp.length) { if (tmp[j].length >= 50 || j + 1 < tmp.length) {
// a part of text is not shown // a part of text is not shown
value += "..."; value += "...";
} }
...@@ -57,14 +59,16 @@ ...@@ -57,14 +59,16 @@
if (result.data.rows[i].value.hasOwnProperty("category")) { if (result.data.rows[i].value.hasOwnProperty("category")) {
value = result.data.rows[i].value.category; value = result.data.rows[i].value.category;
result.data.rows[i].value.category = { result.data.rows[i].value.category = {
css_class: "", field_gadget_param: {
description: "The Status", css_class: "",
hidden: 0, description: "The Status",
"default": value, hidden: 0,
key: "category", "default": value,
url: "gadget_erp5_field_status.html", key: "category",
title: "Status", url: "gadget_erp5_field_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",
......
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>963.30987.13282.49732</string> </value> <value> <string>971.33406.11946.46694</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1513620461.9</float> <float>1541763839.91</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" /> <meta name="viewport" content="width=device-width, user-scalable=no" />
<title>ERP5 Page Monitoring Settings Configurator</title> <title>ERP5 Page Monitoring Settings Configurator</title>
<link href="gadget_officejs_monitoring_custom.css" rel="stylesheet" type="text/css"/> <link href="gadget_officejs_monitoring_custom.css" rel="stylesheet" type="text/css"/>
......
...@@ -35,14 +35,16 @@ ...@@ -35,14 +35,16 @@
for (i = 0; i < len; i += 1) { for (i = 0; i < len; i += 1) {
if (result.data.rows[i].value.hasOwnProperty("active")) { if (result.data.rows[i].value.hasOwnProperty("active")) {
result.data.rows[i].value.active = { result.data.rows[i].value.active = {
css_class: "", field_gadget_param: {
description: "Is Enabled", css_class: "",
hidden: 0, description: "Is Enabled",
"default": result.data.rows[i].value.active.toString(), hidden: 0,
key: "active", "default": result.data.rows[i].value.active.toString(),
url: "gadget_erp5_field_status.html", key: "active",
title: "Enabled", url: "gadget_erp5_field_status.html",
type: "GadgetField" title: "Enabled",
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",
...@@ -165,7 +167,7 @@ ...@@ -165,7 +167,7 @@
.push(function (form_doc) { .push(function (form_doc) {
doc = form_doc; doc = form_doc;
return gadget.setSetting('sync_check_offline', return gadget.setSetting('sync_check_offline',
doc.check_online_access === 1 ? 'true' : 'false'); doc.check_online_access === "on" ? 'true' : 'false');
}) })
.push(function () { .push(function () {
return gadget.setSetting('sync_data_interval', return gadget.setSetting('sync_data_interval',
...@@ -226,9 +228,9 @@ ...@@ -226,9 +228,9 @@
.push(function (sync_check_offline) { .push(function (sync_check_offline) {
if (sync_check_offline === "true" || sync_check_offline === true || if (sync_check_offline === "true" || sync_check_offline === true ||
sync_check_offline === undefined) { sync_check_offline === undefined) {
check_online_access = "true"; check_online_access = "on";
} else { } else {
check_online_access = "false"; check_online_access = "";
} }
return RSVP.all([ return RSVP.all([
gadget.getDeclaredGadget('form_view'), gadget.getDeclaredGadget('form_view'),
......
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>965.41349.16774.45977</string> </value> <value> <string>971.37880.29513.12492</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -256,7 +256,7 @@ ...@@ -256,7 +256,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1519166193.87</float> <float>1542032249.32</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -42,20 +42,22 @@ ...@@ -42,20 +42,22 @@
if (result.data.rows[i].value.hasOwnProperty("date")) { if (result.data.rows[i].value.hasOwnProperty("date")) {
value = new Date(result.data.rows[i].value.date); value = new Date(result.data.rows[i].value.date);
result.data.rows[i].value.date = { result.data.rows[i].value.date = {
allow_empty_time: 0, field_gadget_param: {
ampm_time_style: 0, allow_empty_time: 0,
css_class: "date_field", ampm_time_style: 0,
date_only: 0, css_class: "date_field",
description: "The Date", date_only: 0,
editable: 0, description: "The Date",
hidden: 0, editable: 0,
hidden_day_is_last_day: 0, hidden: 0,
"default": value.toUTCString(), hidden_day_is_last_day: 0,
key: "date", "default": value.toUTCString(),
required: 0, key: "date",
timezone_style: 0, required: 0,
title: "Status Date", timezone_style: 0,
type: "DateTimeField" title: "Status Date",
type: "DateTimeField"
}
}; };
result.data.rows[i].value["listbox_uid:list"] = { result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list", key: "listbox_uid:list",
...@@ -65,14 +67,16 @@ ...@@ -65,14 +67,16 @@
if (result.data.rows[i].value.hasOwnProperty("status")) { if (result.data.rows[i].value.hasOwnProperty("status")) {
value = result.data.rows[i].value.status; value = result.data.rows[i].value.status;
result.data.rows[i].value.status = { result.data.rows[i].value.status = {
css_class: "", field_gadget_param: {
description: "The Status", css_class: "",
hidden: 0, description: "The Status",
"default": value, hidden: 0,
key: "status", "default": value,
url: "gadget_erp5_field_status.html", key: "status",
title: "Status", url: "gadget_erp5_field_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",
......
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>971.13401.64783.28074</string> </value> <value> <string>971.13402.10882.46062</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1540563489.91</float> <float>1542032541.78</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -40,6 +40,8 @@ ...@@ -40,6 +40,8 @@
doc.confirm_new_password = doc.new_password; doc.confirm_new_password = doc.new_password;
doc.password = gadget.state.password; doc.password = gadget.state.password;
doc.verify_password = 1; doc.verify_password = 1;
} else {
doc.verify_password = (doc.verify_password === "on") ? 1 : 0;
} }
return opml_gadget.checkOPMLForm(doc); return opml_gadget.checkOPMLForm(doc);
}) })
...@@ -49,7 +51,7 @@ ...@@ -49,7 +51,7 @@
.push(function () { .push(function () {
var verify_opml = doc.title === "" || doc.title === undefined || var verify_opml = doc.title === "" || doc.title === undefined ||
doc.verify_password === 1; doc.verify_password === 1;
if (gadget.state.active === false && doc.active === 1) { if (gadget.state.active === false && doc.active === "on") {
verify_opml = true; verify_opml = true;
} }
doc.title = gadget.state.opml_title; doc.title = gadget.state.opml_title;
......
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>971.13427.58478.56115</string> </value> <value> <string>971.13430.32819.27989</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -268,7 +268,7 @@ ...@@ -268,7 +268,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1540565190.0</float> <float>1542036791.1</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -210,6 +210,9 @@ ...@@ -210,6 +210,9 @@
gadget.state.promise.source + ".history" gadget.state.promise.source + ".history"
) )
.push(undefined, function (error) { .push(undefined, function (error) {
if (error.name === "cancel") {
return undefined;
}
return gadget.notifySubmitted({ return gadget.notifySubmitted({
status: "error", status: "error",
message: "Failed to get promise history content! \n" + message: "Failed to get promise history content! \n" +
...@@ -238,60 +241,66 @@ ...@@ -238,60 +241,66 @@
// lines = len - start; // lines = len - start;
//} //}
for (i = start; i >= 0; i -= 1) { for (i = start; i >= 0; i -= 1) {
message = status_history.data[i].message.slice(0, 60); message = status_history.data[i].message.slice(0, 80);
if (message.length >= 60) { if (message.length >= 80) {
message += "..."; message += "...";
} }
result.data.total_rows += 1; result.data.total_rows += 1;
result.data.rows.push({ result.data.rows.push({
value: { value: {
status: { status: {
css_class: "", field_gadget_param: {
description: "The Status", css_class: "",
hidden: 0, description: "The Status",
"default": status_history.data[i].status, hidden: 0,
key: "status", "default": status_history.data[i].status,
url: "gadget_erp5_field_status.html", key: "status",
title: "Status", url: "gadget_erp5_field_status.html",
type: "GadgetField" title: "Status",
type: "GadgetField"
}
}, },
start_date: { start_date: {
allow_empty_time: 0, field_gadget_param: {
ampm_time_style: 0, allow_empty_time: 0,
css_class: "date_field", ampm_time_style: 0,
date_only: 0, css_class: "date_field",
description: "The Date", date_only: 0,
editable: 0, description: "The Date",
hidden: 0, editable: 0,
hidden_day_is_last_day: 0, hidden: 0,
"default": new Date( hidden_day_is_last_day: 0,
status_history.data[i].date || "default": new Date(
status_history.data[i]['start-date'] status_history.data[i].date ||
).toUTCString(), status_history.data[i]['start-date']
key: "start_date", ).toUTCString(),
required: 0, key: "start_date",
timezone_style: 0, required: 0,
title: "Date", timezone_style: 0,
type: "DateTimeField" title: "Date",
type: "DateTimeField"
}
}, },
change_date: { change_date: {
allow_empty_time: 0, field_gadget_param: {
ampm_time_style: 0, allow_empty_time: 0,
css_class: "date_field", ampm_time_style: 0,
date_only: 0, css_class: "date_field",
description: "The Date", date_only: 0,
editable: 0, description: "The Date",
hidden: 0, editable: 0,
hidden_day_is_last_day: 0, hidden: 0,
"default": new Date( hidden_day_is_last_day: 0,
status_history.data[i]['change-date'] || "default": new Date(
status_history.data[i]['change-time'] * 1000 status_history.data[i]['change-date'] ||
).toUTCString(), status_history.data[i]['change-time'] * 1000
key: "change_date", ).toUTCString(),
required: 0, key: "change_date",
timezone_style: 0, required: 0,
title: "Status Date", timezone_style: 0,
type: "DateTimeField" title: "Status Date",
type: "DateTimeField"
}
}, },
message: message, message: message,
"listbox_uid:list": { "listbox_uid:list": {
...@@ -318,10 +327,10 @@ ...@@ -318,10 +327,10 @@
}) })
.push(function (form_gadget) { .push(function (form_gadget) {
var column_list = [ var column_list = [
['status', 'Status'],
['start_date', 'Report Date'], ['start_date', 'Report Date'],
['change_date', 'Last Change'], ['change_date', 'Status Date'],
['message', 'Promise Output'], ['message', 'Promise Output']
['status', 'Status']
]; ];
return form_gadget.render({ return form_gadget.render({
erp5_document: { erp5_document: {
...@@ -451,7 +460,7 @@ ...@@ -451,7 +460,7 @@
"title": "Software Instance", "title": "Software Instance",
"default": [gadget.state.instance_title], "default": [gadget.state.instance_title],
"query": "urn:jio:allDocs?query=%28portal_type%3A%22" + "query": "urn:jio:allDocs?query=%28portal_type%3A%22" +
"opml-outline" + "%22%29AND%28reference%3A%22" + "Opml Outline" + "%22%29AND%28reference%3A%22" +
gadget.state.instance_reference + "%22%29", gadget.state.instance_reference + "%22%29",
"css_class": "", "css_class": "",
"required": 0, "required": 0,
...@@ -461,6 +470,7 @@ ...@@ -461,6 +470,7 @@
"view": "view", "view": "view",
"allow_jump": true, "allow_jump": true,
"allow_creation": false, "allow_creation": false,
"sort": [],
"relation_item_relative_url": [gadget.state.instance_reference], "relation_item_relative_url": [gadget.state.instance_reference],
"type": "RelationStringField" "type": "RelationStringField"
}, },
......
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>971.13514.36384.35805</string> </value> <value> <string>971.37851.10663.58692</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -268,7 +268,7 @@ ...@@ -268,7 +268,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1540570354.65</float> <float>1542030756.81</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -122,20 +122,22 @@ ...@@ -122,20 +122,22 @@
if (result.data.rows[i].value.hasOwnProperty("lastBuildDate")) { if (result.data.rows[i].value.hasOwnProperty("lastBuildDate")) {
value = new Date(result.data.rows[i].value.lastBuildDate); value = new Date(result.data.rows[i].value.lastBuildDate);
result.data.rows[i].value.lastBuildDate = { result.data.rows[i].value.lastBuildDate = {
allow_empty_time: 0, field_gadget_param: {
ampm_time_style: 0, allow_empty_time: 0,
css_class: "date_field", ampm_time_style: 0,
date_only: 0, css_class: "date_field",
description: "The Date", date_only: 0,
editable: 0, description: "The Date",
hidden: 0, editable: 0,
hidden_day_is_last_day: 0, hidden: 0,
"default": value.toUTCString(), hidden_day_is_last_day: 0,
key: "lastBuildDate", "default": value.toUTCString(),
required: 0, key: "lastBuildDate",
timezone_style: 0, required: 0,
title: "Promise Date", timezone_style: 0,
type: "DateTimeField" title: "Promise Date",
type: "DateTimeField"
}
}; };
result.data.rows[i].value["listbox_uid:list"] = { result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list", key: "listbox_uid:list",
...@@ -148,8 +150,8 @@ ...@@ -148,8 +150,8 @@
for (j = 1; j < tmp.length; j += 1) { for (j = 1; j < tmp.length; j += 1) {
// first line of text is the date and status // first line of text is the date and status
if (!value && tmp[j].trim() !== "") { if (!value && tmp[j].trim() !== "") {
value += tmp[j].slice(0, 50); value += tmp[j].slice(0, 80);
if (tmp[j].length >= 50 || j + 1 < tmp.length) { if (tmp[j].length >= 80 || j + 1 < tmp.length) {
// a part of text is not shown // a part of text is not shown
value += "..."; value += "...";
} }
...@@ -160,14 +162,16 @@ ...@@ -160,14 +162,16 @@
if (result.data.rows[i].value.hasOwnProperty("category")) { if (result.data.rows[i].value.hasOwnProperty("category")) {
value = result.data.rows[i].value.category; value = result.data.rows[i].value.category;
result.data.rows[i].value.category = { result.data.rows[i].value.category = {
css_class: "", field_gadget_param: {
description: "The Status", css_class: "",
hidden: 0, description: "The Status",
"default": value, hidden: 0,
key: "category", "default": value,
url: "gadget_erp5_field_status.html", key: "category",
title: "Status", url: "gadget_erp5_field_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",
......
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>966.64656.29215.3054</string> </value> <value> <string>971.33402.59013.32563</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -268,7 +268,7 @@ ...@@ -268,7 +268,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1524237317.01</float> <float>1541763622.66</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
data-i18n=Loading data-i18n=Loading
--> -->
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" /> <meta name="viewport" content="width=device-width, user-scalable=no" />
<title>ERP5 Header</title> <title>ERP5 Header</title>
<!-- renderjs --> <!-- renderjs -->
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" /> <meta name="viewport" content="width=device-width, user-scalable=no" />
<title>Jio Gadget</title> <title>Jio Gadget</title>
<!-- renderjs --> <!-- renderjs -->
......
...@@ -146,9 +146,9 @@ ...@@ -146,9 +146,9 @@
basic_login: btoa(doc.username + ':' + doc.password), basic_login: btoa(doc.username + ':' + doc.password),
username: doc.username, username: doc.username,
password: doc.password, password: doc.password,
active: (doc.active === 1) ? true : false, active: (doc.active === "on") ? true : false,
has_monitor: true, has_monitor: true,
state: doc.state || (doc.active ? "Started" : "Stopped") state: doc.state || (doc.active === "on" ? "Started" : "Stopped")
}, },
update_password_list = []; update_password_list = [];
gadget.state.message.textContent = ""; gadget.state.message.textContent = "";
......
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>965.42325.2049.64307</string> </value> <value> <string>965.42333.60944.62105</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1519224835.75</float> <float>1542033191.29</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" /> <meta name="viewport" content="width=device-width, user-scalable=no" />
<title>ERP5 Panel</title> <title>ERP5 Panel</title>
<!-- <!--
data-i18n=Editable data-i18n=Editable
......
...@@ -70,6 +70,9 @@ ...@@ -70,6 +70,9 @@
view_list = JSON.stringify(view_list); view_list = JSON.stringify(view_list);
} }
return context.getUrlParameter('editable') return context.getUrlParameter('editable')
.push(function () {
return context.registerSync();
})
.push(function (editable) { .push(function (editable) {
return context.changeState({ return context.changeState({
workflow_list: workflow_list, workflow_list: workflow_list,
...@@ -270,7 +273,7 @@ ...@@ -270,7 +273,7 @@
window.dispatchEvent(event); window.dispatchEvent(event);
return result; return result;
}) })
.declareService(function () { .declareJob('registerSync', function () {
return this.getDeclaredGadget("sync_gadget") return this.getDeclaredGadget("sync_gadget")
.push(function (sync_gadget) { .push(function (sync_gadget) {
return sync_gadget.register(); return sync_gadget.register();
......
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>963.33474.25813.19302</string> </value> <value> <string>971.37975.58604.24371</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1540896767.32</float> <float>1542039239.11</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" /> <meta name="viewport" content="width=device-width, user-scalable=no" />
<title>Monitoring Instance Parameters View Page</title> <title>Monitoring Instance Parameters View Page</title>
<!-- renderjs --> <!-- renderjs -->
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" /> <meta name="viewport" content="width=device-width, user-scalable=no" />
<title>OfficeJS Router Gadget</title> <title>OfficeJS Router Gadget</title>
<!-- renderjs --> <!-- renderjs -->
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" /> <meta name="viewport" content="width=device-width, user-scalable=no" />
<title>ERP5 Statusfield</title> <title>ERP5 Statusfield</title>
<!-- renderjs --> <!-- renderjs -->
......
...@@ -319,7 +319,7 @@ ...@@ -319,7 +319,7 @@
</item> </item>
<item> <item>
<key> <string>skin_selection_name</string> </key> <key> <string>skin_selection_name</string> </key>
<value> <string>Officejs</string> </value> <value> <string>RJS</string> </value>
</item> </item>
<item> <item>
<key> <string>static_language_selection</string> </key> <key> <string>static_language_selection</string> </key>
...@@ -512,7 +512,7 @@ ...@@ -512,7 +512,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>963.20929.61143.52155</string> </value> <value> <string>971.23483.52641.49749</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -530,7 +530,7 @@ ...@@ -530,7 +530,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1510234411.25</float> <float>1541168426.77</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -562,7 +562,7 @@ ...@@ -562,7 +562,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>963.20929.61143.52155</string> </value> <value> <string>963.27666.8050.30907</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -580,7 +580,7 @@ ...@@ -580,7 +580,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1510234379.6</float> <float>1541168426.77</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