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,6 +24,7 @@
for (i = 0; i < len; i += 1) {
if (result.data.rows[i].value.hasOwnProperty("status_date")) {
result.data.rows[i].value.status_date = {
field_gadget_param: {
allow_empty_time: 0,
ampm_time_style: 0,
css_class: "date_field",
......@@ -38,6 +39,7 @@
timezone_style: 0,
title: "Status Date",
type: "DateTimeField"
}
};
result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list",
......@@ -46,6 +48,7 @@
}
if (result.data.rows[i].value.hasOwnProperty("status")) {
result.data.rows[i].value.status = {
field_gadget_param: {
css_class: "",
description: "The Status",
hidden: 0,
......@@ -54,6 +57,7 @@
url: "gadget_erp5_field_status.html",
title: "Status",
type: "GadgetField"
}
};
result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list",
......@@ -116,7 +120,8 @@
"Hosting Subscription" + "%22%29",
"portal_type": [],
"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']],
"title": "Hosting Subscriptions",
"command": "index",
......
......@@ -239,7 +239,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>971.13420.64097.35857</string> </value>
<value> <string>971.13495.30840.12936</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -257,7 +257,7 @@
</tuple>
<state>
<tuple>
<float>1540569088.19</float>
<float>1541763899.25</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -2,7 +2,7 @@
<html>
<head>
<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>
<!-- renderjs -->
......
......@@ -18,6 +18,7 @@
if (result.data.rows[i].value.hasOwnProperty("date")) {
value = new Date(result.data.rows[i].value.date);
result.data.rows[i].value.date = {
field_gadget_param: {
allow_empty_time: 0,
ampm_time_style: 0,
css_class: "date_field",
......@@ -32,6 +33,7 @@
timezone_style: 0,
title: "Status Date",
type: "DateTimeField"
}
};
result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list",
......@@ -41,6 +43,7 @@
if (result.data.rows[i].value.hasOwnProperty("status")) {
value = result.data.rows[i].value.status;
result.data.rows[i].value.status = {
field_gadget_param: {
css_class: "",
description: "The Status",
hidden: 0,
......@@ -49,6 +52,7 @@
url: "gadget_erp5_field_status.html",
title: "Status",
type: "GadgetField"
}
};
result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list",
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.14467.38710.51797</string> </value>
<value> <string>971.33301.63517.11571</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1514302362.58</float>
<float>1541763469.75</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -19,6 +19,7 @@
if (result.data.rows[i].value.hasOwnProperty("lastBuildDate")) {
value = new Date(result.data.rows[i].value.lastBuildDate);
result.data.rows[i].value.lastBuildDate = {
field_gadget_param: {
allow_empty_time: 0,
ampm_time_style: 0,
css_class: "date_field",
......@@ -33,6 +34,7 @@
timezone_style: 0,
title: "Promise Date",
type: "DateTimeField"
}
};
result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list",
......@@ -45,8 +47,8 @@
for (j = 1; j < tmp.length; j += 1) {
// first line of text is the date and status
if (!value && tmp[j].trim() !== "") {
value += tmp[j].slice(0, 30);
if (tmp[j].length >= 30 || j + 1 < tmp.length) {
value += tmp[j].slice(0, 50);
if (tmp[j].length >= 50 || j + 1 < tmp.length) {
// a part of text is not shown
value += "...";
}
......@@ -57,6 +59,7 @@
if (result.data.rows[i].value.hasOwnProperty("category")) {
value = result.data.rows[i].value.category;
result.data.rows[i].value.category = {
field_gadget_param: {
css_class: "",
description: "The Status",
hidden: 0,
......@@ -65,6 +68,7 @@
url: "gadget_erp5_field_status.html",
title: "Status",
type: "GadgetField"
}
};
result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list",
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.30987.13282.49732</string> </value>
<value> <string>971.33406.11946.46694</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1513620461.9</float>
<float>1541763839.91</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -2,7 +2,7 @@
<html>
<head>
<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>
<link href="gadget_officejs_monitoring_custom.css" rel="stylesheet" type="text/css"/>
......
......@@ -35,6 +35,7 @@
for (i = 0; i < len; i += 1) {
if (result.data.rows[i].value.hasOwnProperty("active")) {
result.data.rows[i].value.active = {
field_gadget_param: {
css_class: "",
description: "Is Enabled",
hidden: 0,
......@@ -43,6 +44,7 @@
url: "gadget_erp5_field_status.html",
title: "Enabled",
type: "GadgetField"
}
};
result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list",
......@@ -165,7 +167,7 @@
.push(function (form_doc) {
doc = form_doc;
return gadget.setSetting('sync_check_offline',
doc.check_online_access === 1 ? 'true' : 'false');
doc.check_online_access === "on" ? 'true' : 'false');
})
.push(function () {
return gadget.setSetting('sync_data_interval',
......@@ -226,9 +228,9 @@
.push(function (sync_check_offline) {
if (sync_check_offline === "true" || sync_check_offline === true ||
sync_check_offline === undefined) {
check_online_access = "true";
check_online_access = "on";
} else {
check_online_access = "false";
check_online_access = "";
}
return RSVP.all([
gadget.getDeclaredGadget('form_view'),
......
......@@ -238,7 +238,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>965.41349.16774.45977</string> </value>
<value> <string>971.37880.29513.12492</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>1519166193.87</float>
<float>1542032249.32</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -42,6 +42,7 @@
if (result.data.rows[i].value.hasOwnProperty("date")) {
value = new Date(result.data.rows[i].value.date);
result.data.rows[i].value.date = {
field_gadget_param: {
allow_empty_time: 0,
ampm_time_style: 0,
css_class: "date_field",
......@@ -56,6 +57,7 @@
timezone_style: 0,
title: "Status Date",
type: "DateTimeField"
}
};
result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list",
......@@ -65,6 +67,7 @@
if (result.data.rows[i].value.hasOwnProperty("status")) {
value = result.data.rows[i].value.status;
result.data.rows[i].value.status = {
field_gadget_param: {
css_class: "",
description: "The Status",
hidden: 0,
......@@ -73,6 +76,7 @@
url: "gadget_erp5_field_status.html",
title: "Status",
type: "GadgetField"
}
};
result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list",
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>971.13401.64783.28074</string> </value>
<value> <string>971.13402.10882.46062</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1540563489.91</float>
<float>1542032541.78</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -40,6 +40,8 @@
doc.confirm_new_password = doc.new_password;
doc.password = gadget.state.password;
doc.verify_password = 1;
} else {
doc.verify_password = (doc.verify_password === "on") ? 1 : 0;
}
return opml_gadget.checkOPMLForm(doc);
})
......@@ -49,7 +51,7 @@
.push(function () {
var verify_opml = doc.title === "" || doc.title === undefined ||
doc.verify_password === 1;
if (gadget.state.active === false && doc.active === 1) {
if (gadget.state.active === false && doc.active === "on") {
verify_opml = true;
}
doc.title = gadget.state.opml_title;
......
......@@ -250,7 +250,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>971.13427.58478.56115</string> </value>
<value> <string>971.13430.32819.27989</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -268,7 +268,7 @@
</tuple>
<state>
<tuple>
<float>1540565190.0</float>
<float>1542036791.1</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -210,6 +210,9 @@
gadget.state.promise.source + ".history"
)
.push(undefined, function (error) {
if (error.name === "cancel") {
return undefined;
}
return gadget.notifySubmitted({
status: "error",
message: "Failed to get promise history content! \n" +
......@@ -238,14 +241,15 @@
// lines = len - start;
//}
for (i = start; i >= 0; i -= 1) {
message = status_history.data[i].message.slice(0, 60);
if (message.length >= 60) {
message = status_history.data[i].message.slice(0, 80);
if (message.length >= 80) {
message += "...";
}
result.data.total_rows += 1;
result.data.rows.push({
value: {
status: {
field_gadget_param: {
css_class: "",
description: "The Status",
hidden: 0,
......@@ -254,8 +258,10 @@
url: "gadget_erp5_field_status.html",
title: "Status",
type: "GadgetField"
}
},
start_date: {
field_gadget_param: {
allow_empty_time: 0,
ampm_time_style: 0,
css_class: "date_field",
......@@ -273,8 +279,10 @@
timezone_style: 0,
title: "Date",
type: "DateTimeField"
}
},
change_date: {
field_gadget_param: {
allow_empty_time: 0,
ampm_time_style: 0,
css_class: "date_field",
......@@ -292,6 +300,7 @@
timezone_style: 0,
title: "Status Date",
type: "DateTimeField"
}
},
message: message,
"listbox_uid:list": {
......@@ -318,10 +327,10 @@
})
.push(function (form_gadget) {
var column_list = [
['status', 'Status'],
['start_date', 'Report Date'],
['change_date', 'Last Change'],
['message', 'Promise Output'],
['status', 'Status']
['change_date', 'Status Date'],
['message', 'Promise Output']
];
return form_gadget.render({
erp5_document: {
......@@ -451,7 +460,7 @@
"title": "Software Instance",
"default": [gadget.state.instance_title],
"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",
"css_class": "",
"required": 0,
......@@ -461,6 +470,7 @@
"view": "view",
"allow_jump": true,
"allow_creation": false,
"sort": [],
"relation_item_relative_url": [gadget.state.instance_reference],
"type": "RelationStringField"
},
......
......@@ -250,7 +250,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>971.13514.36384.35805</string> </value>
<value> <string>971.37851.10663.58692</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -268,7 +268,7 @@
</tuple>
<state>
<tuple>
<float>1540570354.65</float>
<float>1542030756.81</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -122,6 +122,7 @@
if (result.data.rows[i].value.hasOwnProperty("lastBuildDate")) {
value = new Date(result.data.rows[i].value.lastBuildDate);
result.data.rows[i].value.lastBuildDate = {
field_gadget_param: {
allow_empty_time: 0,
ampm_time_style: 0,
css_class: "date_field",
......@@ -136,6 +137,7 @@
timezone_style: 0,
title: "Promise Date",
type: "DateTimeField"
}
};
result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list",
......@@ -148,8 +150,8 @@
for (j = 1; j < tmp.length; j += 1) {
// first line of text is the date and status
if (!value && tmp[j].trim() !== "") {
value += tmp[j].slice(0, 50);
if (tmp[j].length >= 50 || j + 1 < tmp.length) {
value += tmp[j].slice(0, 80);
if (tmp[j].length >= 80 || j + 1 < tmp.length) {
// a part of text is not shown
value += "...";
}
......@@ -160,6 +162,7 @@
if (result.data.rows[i].value.hasOwnProperty("category")) {
value = result.data.rows[i].value.category;
result.data.rows[i].value.category = {
field_gadget_param: {
css_class: "",
description: "The Status",
hidden: 0,
......@@ -168,6 +171,7 @@
url: "gadget_erp5_field_status.html",
title: "Status",
type: "GadgetField"
}
};
result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list",
......
......@@ -250,7 +250,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>966.64656.29215.3054</string> </value>
<value> <string>971.33402.59013.32563</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -268,7 +268,7 @@
</tuple>
<state>
<tuple>
<float>1524237317.01</float>
<float>1541763622.66</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -25,7 +25,7 @@
data-i18n=Loading
-->
<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>
<!-- renderjs -->
......
......@@ -2,7 +2,7 @@
<html>
<head>
<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>
<!-- renderjs -->
......
......@@ -146,9 +146,9 @@
basic_login: btoa(doc.username + ':' + doc.password),
username: doc.username,
password: doc.password,
active: (doc.active === 1) ? true : false,
active: (doc.active === "on") ? true : false,
has_monitor: true,
state: doc.state || (doc.active ? "Started" : "Stopped")
state: doc.state || (doc.active === "on" ? "Started" : "Stopped")
},
update_password_list = [];
gadget.state.message.textContent = "";
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>965.42325.2049.64307</string> </value>
<value> <string>965.42333.60944.62105</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1519224835.75</float>
<float>1542033191.29</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -2,7 +2,7 @@
<html>
<head>
<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>
<!--
data-i18n=Editable
......
......@@ -70,6 +70,9 @@
view_list = JSON.stringify(view_list);
}
return context.getUrlParameter('editable')
.push(function () {
return context.registerSync();
})
.push(function (editable) {
return context.changeState({
workflow_list: workflow_list,
......@@ -270,7 +273,7 @@
window.dispatchEvent(event);
return result;
})
.declareService(function () {
.declareJob('registerSync', function () {
return this.getDeclaredGadget("sync_gadget")
.push(function (sync_gadget) {
return sync_gadget.register();
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.33474.25813.19302</string> </value>
<value> <string>971.37975.58604.24371</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1540896767.32</float>
<float>1542039239.11</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -2,7 +2,7 @@
<html>
<head>
<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>
<!-- renderjs -->
......
......@@ -2,7 +2,7 @@
<html>
<head>
<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>
<!-- renderjs -->
......
......@@ -2,7 +2,7 @@
<html>
<head>
<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>
<!-- renderjs -->
......
......@@ -319,7 +319,7 @@
</item>
<item>
<key> <string>skin_selection_name</string> </key>
<value> <string>Officejs</string> </value>
<value> <string>RJS</string> </value>
</item>
<item>
<key> <string>static_language_selection</string> </key>
......@@ -512,7 +512,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.20929.61143.52155</string> </value>
<value> <string>971.23483.52641.49749</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -530,7 +530,7 @@
</tuple>
<state>
<tuple>
<float>1510234411.25</float>
<float>1541168426.77</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -562,7 +562,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.20929.61143.52155</string> </value>
<value> <string>963.27666.8050.30907</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -580,7 +580,7 @@
</tuple>
<state>
<tuple>
<float>1510234379.6</float>
<float>1541168426.77</float>
<string>UTC</string>
</tuple>
</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