Commit 58fce367 authored by Roque's avatar Roque

erp5_web_monitoring: truncate

parent ca12f168
......@@ -53,6 +53,9 @@
return date_string + "+0000";
}
function truncate(str, n) {
return (str.length > n) ? str.slice(0, n - 1) + '...' : str;
}
if (status_history && status_history.hasOwnProperty('data')) {
// the status history list is reversed ([old, ...., newest])
len = status_history.data.length;
......@@ -115,7 +118,7 @@
type: "DateTimeField"
}
},
message: status_history.data[i].message,
message: truncate(status_history.data[i].message, 100),
"listbox_uid:list": {
key: "listbox_uid:list",
value: 2713
......
......@@ -250,7 +250,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1015.43186.34401.32273</string> </value>
<value> <string>1016.16323.2199.4113</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -270,7 +270,7 @@
</tuple>
<state>
<tuple>
<float>1712168806.42</float>
<float>1714489175.63</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