Commit bc7c68c9 authored by Alain Takoudjou's avatar Alain Takoudjou Committed by Alain Takoudjou

[erp5_web_monitoring] show desactivated instance in monitor opml list

parent c5656bdf
......@@ -19,7 +19,7 @@
function getMonitorSetting(gadget) {
return gadget.jio_allDocs({
select_list: ["basic_login", "url", "title", "active"],
select_list: ["basic_login", "url", "title", "active", "state"],
query: '(portal_type:"opml")'
})
.push(function (opml_result) {
......@@ -61,6 +61,11 @@
"description": "OPML active state",
"type": "boolean",
"default": true
},
"state": {
"description": "OPML requested state",
"type": "string",
"default": "Started"
}
},
"additionalProperties": false
......@@ -188,8 +193,11 @@
item = {
title: configuration_dict.opml_description[i].title,
url: configuration_dict.opml_description[i].href,
active: true,
portal_type: "opml"
active: configuration_dict.opml_description[i].active,
portal_type: "opml",
has_monitor: configuration_dict.opml_description[i]
.href.startsWith("https://"),
state: configuration_dict.opml_description[i].state || "Started"
};
for (j = 0; j < configuration_dict.monitor_url.length; j += 1) {
if (configuration_dict.monitor_url[j].parent_url ===
......@@ -216,6 +224,8 @@
cred_list = atob(item.basic_login).split(':');
item.username = cred_list[0];
item.password = cred_list[1];
item.has_monitor = item.url.startsWith("https://");
item.state = item.state || "Started";
pushSetting(item.url, item);
}
}
......
......@@ -250,7 +250,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>965.42096.47763.27016</string> </value>
<value> <string>965.42470.47064.30003</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -268,7 +268,7 @@
</tuple>
<state>
<tuple>
<float>1519210888.89</float>
<float>1519233144.55</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