Commit 07fcb8d5 authored by Roque's avatar Roque

erp5_web_monitoring: update opml portal type (and app impact)

parent fc9ca479
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/opml_viewForMonitoring</string> </value> <value> <string>string:${object_url}/Opml_viewForMonitoring</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
URLSearchParams) { URLSearchParams) {
"use strict"; "use strict";
var OPML_PORTAL_TYPE = "Opml";
var gadget_klass = rJS(window), var gadget_klass = rJS(window),
templater = gadget_klass.__template_element, templater = gadget_klass.__template_element,
notify_msg_template = Handlebars.compile( notify_msg_template = Handlebars.compile(
...@@ -19,8 +20,9 @@ ...@@ -19,8 +20,9 @@
function getMonitorSetting(gadget) { function getMonitorSetting(gadget) {
return gadget.jio_allDocs({ return gadget.jio_allDocs({
select_list: ["basic_login", "url", "title", "active", "state"], select_list: ["basic_login", "url", "title", "active", "state",
query: '(portal_type:"opml")' "slapos_master_url"],
query: '(portal_type:"' + OPML_PORTAL_TYPE + '")'
}) })
.push(function (opml_result) { .push(function (opml_result) {
var i, var i,
...@@ -194,7 +196,7 @@ ...@@ -194,7 +196,7 @@
title: configuration_dict.opml_description[i].title, title: configuration_dict.opml_description[i].title,
url: configuration_dict.opml_description[i].href, url: configuration_dict.opml_description[i].href,
active: configuration_dict.opml_description[i].active, active: configuration_dict.opml_description[i].active,
portal_type: "opml", portal_type: OPML_PORTAL_TYPE,
has_monitor: configuration_dict.opml_description[i] has_monitor: configuration_dict.opml_description[i]
.href.startsWith("https://"), .href.startsWith("https://"),
state: configuration_dict.opml_description[i].state || "Started" state: configuration_dict.opml_description[i].state || "Started"
...@@ -220,7 +222,7 @@ ...@@ -220,7 +222,7 @@
} else { } else {
for (i = 0; i < configuration_dict.opml_description_list.length; i += 1) { for (i = 0; i < configuration_dict.opml_description_list.length; i += 1) {
item = configuration_dict.opml_description_list[i]; item = configuration_dict.opml_description_list[i];
item.portal_type = "opml"; item.portal_type = OPML_PORTAL_TYPE;
cred_list = atob(item.basic_login).split(':'); cred_list = atob(item.basic_login).split(':');
item.username = cred_list[0]; item.username = cred_list[0];
item.password = cred_list[1]; item.password = cred_list[1];
...@@ -381,7 +383,7 @@ ...@@ -381,7 +383,7 @@
} }
if (instance_tree_list[uid_dict[tmp_uid]]) { if (instance_tree_list[uid_dict[tmp_uid]]) {
opml_list.push({ opml_list.push({
portal_type: "opml", portal_type: OPML_PORTAL_TYPE,
title: instance_tree_list[uid_dict[tmp_uid]] title: instance_tree_list[uid_dict[tmp_uid]]
.title, .title,
relative_url: instance_tree_list[uid_dict[tmp_uid]] relative_url: instance_tree_list[uid_dict[tmp_uid]]
...@@ -613,8 +615,7 @@ ...@@ -613,8 +615,7 @@
return []; return [];
}) })
.push(function (opml_list) { .push(function (opml_list) {
var i, var i, push_queue = new RSVP.Queue();
push_queue = new RSVP.Queue();
function pushOPML(opml_dict) { function pushOPML(opml_dict) {
push_queue push_queue
......
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>1014.43844.29599.43673</string> </value> <value> <string>1017.21736.40219.1843</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -280,7 +280,7 @@ ...@@ -280,7 +280,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1708448979.03</float> <float>1718659745.0</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
(function (window, rJS, RSVP, Handlebars) { (function (window, rJS, RSVP, Handlebars) {
"use strict"; "use strict";
var OPML_PORTAL_TYPE = "Opml";
var gadget_klass = rJS(window), var gadget_klass = rJS(window),
templater = gadget_klass.__template_element, templater = gadget_klass.__template_element,
...@@ -101,7 +102,7 @@ ...@@ -101,7 +102,7 @@
.push(function () { .push(function () {
element.setAttribute("disabled", "disabled"); element.setAttribute("disabled", "disabled");
return gadget.jio_allDocs({ return gadget.jio_allDocs({
query: 'portal_type: "opml"', query: 'portal_type: "' + OPML_PORTAL_TYPE + '"',
select_list: ['title'] select_list: ['title']
}) })
.push(function (result) { .push(function (result) {
...@@ -317,7 +318,7 @@ ...@@ -317,7 +318,7 @@
"key": "monitoring_setting_listbox", "key": "monitoring_setting_listbox",
"lines": 20, "lines": 20,
"list_method": "portal_catalog", "list_method": "portal_catalog",
"query": "urn:jio:allDocs?query=portal_type%3A%22opml%22", "query": "urn:jio:allDocs?query=portal_type%3A%22" + OPML_PORTAL_TYPE + "%22",
"portal_type": [], "portal_type": [],
"search_column_list": column_list, "search_column_list": column_list,
"sort_column_list": column_list, "sort_column_list": column_list,
......
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>OfficeJS Jio Web Page View</title>
<link href="gadget_officejs_monitoring_custom.css" rel="stylesheet" type="text/css"/>
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script src="gadget_officejs_jio_opml_view.js"></script>
</head>
<body>
<div class="template-view"></div>
<form class="save_form ui-body-c" novalidate>
<button type="submit" class="ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right ui-screen-hidden"></button>
<div data-gadget-url="gadget_officejs_monitoring_opml_edit.html"
data-gadget-scope="opml_gadget" data-gadget-sandbox="public"></div>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="form_view"
data-gadget-sandbox="public">
</div>
</form>
</body>
</html>
\ No newline at end of file
/*global window, rJS, RSVP, Handlebars */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, Rusha) {
"use strict";
var rusha = new Rusha();
rJS(window)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", 'notifySubmitted')
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.onEvent('submit', function () {
var gadget = this,
doc,
opml_gadget;
return new RSVP.Queue()
.push(function () {
return gadget.getDeclaredGadget('opml_gadget');
})
.push(function (g) {
opml_gadget = g;
return gadget.getDeclaredGadget('form_view');
})
.push(function (form_gadget) {
return form_gadget.getContent();
})
.push(function (form_doc) {
doc = form_doc;
if (doc.password !== gadget.state.password) {
// password was modified, update on backend
doc.new_password = doc.password;
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);
})
.push(function (state) {
if (state) {
return gadget.notifySubmitting()
.push(function () {
var verify_opml = doc.title === "" || doc.title === undefined ||
doc.verify_password === 1;
if (gadget.state.active === false && doc.active === "on") {
verify_opml = true;
}
doc.title = gadget.state.opml_title;
return opml_gadget.saveOPML(doc, verify_opml);
})
.push(function (state) {
var msg = {message: 'Document Updated', status: 'success'};
if (!state.status) {
msg = {message: 'Document update failed', status: "error"};
}
return RSVP.all([
gadget.notifySubmitted(msg),
state
]);
})
.push(function (result) {
if (result[1].status) {
return gadget.changeState({
"password": doc.password
});
}
});
}
});
})
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
.declareMethod("render", function (options) {
var gadget = this,
doc = options.doc;
return RSVP.Queue()
.push(function () {
return gadget.changeState({
"opml_title": doc.title || "",
"opml_key": options.jio_key,
"password": doc.password,
"active": doc.active
});
})
.push(function () {
return RSVP.all([
gadget.getDeclaredGadget('form_view')
]);
})
.push(function (result) {
return result[0].render({
erp5_document: {
"_embedded": {"_view": {
"my_title": {
"description": "The name of OPML",
"title": "Title",
"default": doc.title || "",
"css_class": "",
"required": 0,
"editable": 0,
"key": "title",
"hidden": doc.title === undefined ? 1 : 0,
"type": "StringField"
},
"my_url": {
"description": "",
"title": "OPML URL",
"default": doc.url || options.url || "",
"css_class": "",
"required": 1,
"editable": 1,
"key": "url",
"hidden": 0,
"type": "StringField"
},
"my_username": {
"description": "Username for access private URLs",
"title": "Username",
"default": doc.username || "",
"css_class": "",
"required": 1,
"editable": 0,
"key": "username",
"hidden": 0,
"type": "StringField"
},
"my_password": {
"description": "Password for access private URLs",
"title": "Password",
"default": doc.password || "",
"css_class": "",
"required": 1,
"editable": 1,
"key": "password",
"hidden": 0,
"type": "PasswordField"
},
"my_requested_state": {
"description": "Instance tree state",
"title": "Requested State",
"default": doc.state || (doc.active ? "Started" : "Stopped"),
"css_class": "",
"required": 1,
"editable": 0,
"key": "state",
"hidden": 0,
"type": "StringField"
},
"my_active": {
"description": "Sync this opml or not",
"title": "Active (Enable Sync)",
"default": doc.active || doc.active === undefined ? 1 : 0,
"css_class": "",
"required": 1,
"editable": 1,
"key": "active",
"hidden": 0,
"type": "CheckBoxField"
},
"my_new_password": {
"description": "Change current OPML password",
"title": "New Password",
"default": "",
"css_class": "",
"required": 1,
"editable": 1,
"key": "new_password",
"hidden": 1,
"type": "PasswordField"
},
"my_verify_password": {
"description": "Check if this OPML is valid, and also verify that password match",
"title": "Verify OPML & Password",
"default": 0,
"css_class": "",
"required": 1,
"editable": 1,
"key": "verify_password",
"hidden": 0,
"type": "CheckBoxField"
}
}},
"_links": {
"type": {
// form_list display portal_type in header
name: ""
}
}
},
form_definition: {
group_list: [[
"left",
[["my_title"], ["my_url"], ["my_username"], ["my_password"],
["my_requested_state"], ["my_active"], ["my_verify_password"],
["my_new_password"]]
]]
}
});
})
.push(function () {
return new RSVP.Queue()
.push(function () {
var hosting_key = rusha.digestFromString(gadget.state.opml_key);
return RSVP.all([
gadget.getUrlFor({command: 'history_previous'}),
gadget.getUrlFor({command: 'selection_previous'}),
gadget.getUrlFor({command: 'selection_next'}),
gadget.getUrlFor({command: 'push_history', options: {
page: "ojsm_jump",
jio_key: hosting_key,
title: gadget.state.opml_title,
view_title: "Related Instance Tree"
}}),
gadget.getUrlFor({command: 'change', options: {
page: 'ojsm_opml_delete',
jio_key: gadget.state.opml_key,
return_url: 'settings_configurator'
}})
]);
})
.push(function (url_list) {
return gadget.updateHeader({
page_title: options.doc.title || "OPML View",
selection_url: url_list[0],
previous_url: url_list[1],
next_url: url_list[2],
jump_url: url_list[3],
delete_url: url_list[4],
save_action: true
});
});
});
});
}(window, rJS, RSVP, Rusha));
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
<item> <item>
<key> <string>text_content</string> </key> <key> <string>text_content</string> </key>
<value> <string>CONFIGURATION MANIFEST\n <value> <string>CONFIGURATION MANIFEST\n
# generated on Fri May 24 14:46:38 2024\n # generated on Mon Jun 3 13:55:24 2024\n
CACHE:\n CACHE:\n
\n \n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL1NvZnR3YXJlIEluc3RhbmNl\n hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL1NvZnR3YXJlIEluc3RhbmNl\n
...@@ -97,9 +97,9 @@ hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL1NvZnR3YXJlIEluc3RhbmNlL21vbml ...@@ -97,9 +97,9 @@ hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL1NvZnR3YXJlIEluc3RhbmNlL21vbml
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfd2ViX21vbml0b3JpbmcvU29mdHdhcmVJbnN0YW5jZV92aWV3Rm9yTW9uaXRvcmluZ1Jlc291cmNlcw==\n hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfd2ViX21vbml0b3JpbmcvU29mdHdhcmVJbnN0YW5jZV92aWV3Rm9yTW9uaXRvcmluZ1Jlc291cmNlcw==\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL1NvZnR3YXJlIEluc3RhbmNlL21vbml0b3JpbmdfcHJvY2Vzc2VzX3ZpZXc=\n hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL1NvZnR3YXJlIEluc3RhbmNlL21vbml0b3JpbmdfcHJvY2Vzc2VzX3ZpZXc=\n
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfd2ViX21vbml0b3JpbmcvU29mdHdhcmVJbnN0YW5jZV92aWV3Rm9yTW9uaXRvcmluZ1Byb2Nlc3Nlcw==\n hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfd2ViX21vbml0b3JpbmcvU29mdHdhcmVJbnN0YW5jZV92aWV3Rm9yTW9uaXRvcmluZ1Byb2Nlc3Nlcw==\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL29wbWw=\n hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL09wbWw=\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL29wbWwvbW9uaXRvcmluZ192aWV3\n hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL09wbWwvbW9uaXRvcmluZ192aWV3\n
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfd2ViX21vbml0b3Jpbmcvb3BtbF92aWV3Rm9yTW9uaXRvcmluZw==\n hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfd2ViX21vbml0b3JpbmcvT3BtbF92aWV3Rm9yTW9uaXRvcmluZw==\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL0luc3RhbmNlIFRyZWU=\n hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL0luc3RhbmNlIFRyZWU=\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL0luc3RhbmNlIFRyZWUvbW9uaXRvcmluZ192aWV3\n hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL0luc3RhbmNlIFRyZWUvbW9uaXRvcmluZ192aWV3\n
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfd2ViX21vbml0b3JpbmcvSW5zdGFuY2VUcmVlX3ZpZXdGb3JNb25pdG9yaW5n\n hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfd2ViX21vbml0b3JpbmcvSW5zdGFuY2VUcmVlX3ZpZXdGb3JNb25pdG9yaW5n\n
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
(function (window, rJS, RSVP, btoa, XMLHttpRequest, Handlebars, jIO) { (function (window, rJS, RSVP, btoa, XMLHttpRequest, Handlebars, jIO) {
"use strict"; "use strict";
var OPML_PORTAL_TYPE = "Opml";
var gadget_klass = rJS(window), var gadget_klass = rJS(window),
templater = gadget_klass.__template_element, templater = gadget_klass.__template_element,
notify_msg_template = Handlebars.compile( notify_msg_template = Handlebars.compile(
...@@ -139,9 +140,9 @@ ...@@ -139,9 +140,9 @@
function saveOPML(gadget, doc, verify_password) { function saveOPML(gadget, doc, verify_password) {
var opml_dict = { var opml_dict = {
type: "opml", type: OPML_PORTAL_TYPE,
title: doc.title, title: doc.title,
portal_type: "opml", portal_type: OPML_PORTAL_TYPE,
url: doc.url, url: doc.url,
basic_login: btoa(doc.username + ':' + doc.password), basic_login: btoa(doc.username + ':' + doc.password),
username: doc.username, username: doc.username,
...@@ -151,7 +152,12 @@ ...@@ -151,7 +152,12 @@
state: doc.state || (doc.active === "on" ? "Started" : "Stopped") state: doc.state || (doc.active === "on" ? "Started" : "Stopped")
}, },
update_password_list = [], update_password_list = [],
allow_force = false; allow_force = false,
return_dict;
if (doc.slapos_master_url && doc.slapos_master_url !== undefined &&
doc.slapos_master_url !== "") {
opml_dict.slapos_master_url = doc.slapos_master_url;
}
gadget.state.message.textContent = ""; gadget.state.message.textContent = "";
function validateOPML() { function validateOPML() {
...@@ -328,6 +334,13 @@ ...@@ -328,6 +334,13 @@
}); });
} }
return {status: status, can_force: allow_force}; return {status: status, can_force: allow_force};
})
.push(function (dict) {
return_dict = dict;
return gadget.setSetting("latest_import_date", new Date().getTime());
})
.push(function (dict) {
return return_dict;
}); });
} }
...@@ -359,6 +372,7 @@ ...@@ -359,6 +372,7 @@
// Acquired methods // Acquired methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
.declareAcquiredMethod("getSetting", "getSetting") .declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("setSetting", "setSetting")
.declareAcquiredMethod("redirect", "redirect") .declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("jio_put", "jio_put") .declareAcquiredMethod("jio_put", "jio_put")
......
...@@ -79,7 +79,9 @@ ...@@ -79,7 +79,9 @@
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
<value> <string>text/javascript</string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>default_reference</string> </key> <key> <string>default_reference</string> </key>
...@@ -236,7 +238,7 @@ ...@@ -236,7 +238,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>zope</string> </value> <value> <unicode>zope</unicode> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -250,7 +252,7 @@ ...@@ -250,7 +252,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>971.63860.22689.21760</string> </value> <value> <string>1016.62588.18488.24661</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -270,7 +272,7 @@ ...@@ -270,7 +272,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1543593317.26</float> <float>1717178789.09</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<!-- new router --> <!-- new router -->
<script data-renderjs-configuration="portal_skin_folder" type="text/x-renderjs-configuration">erp5_web_monitoring</script> <script data-renderjs-configuration="portal_skin_folder" type="text/x-renderjs-configuration">erp5_web_monitoring</script>
<script data-renderjs-configuration="app_view_reference" type="text/x-renderjs-configuration">monitoring_view</script> <script data-renderjs-configuration="app_view_reference" type="text/x-renderjs-configuration">monitoring_view</script>
<script data-renderjs-configuration="app_actions" type="text/x-renderjs-configuration">('Software Instance | monitoring_view', 'Software Instance | monitoring_resources_view', 'Software Instance | monitoring_processes_view', 'Software Instance Module | monitoring_view', 'Instance Tree | monitoring_view', 'Instance Tree Module | monitoring_view', 'Promise Module | monitoring_view', 'Promise | monitoring_view', 'opml | monitoring_view')</script> <script data-renderjs-configuration="app_actions" type="text/x-renderjs-configuration">('Software Instance | monitoring_view', 'Software Instance | monitoring_resources_view', 'Software Instance | monitoring_processes_view', 'Software Instance Module | monitoring_view', 'Instance Tree | monitoring_view', 'Instance Tree Module | monitoring_view', 'Promise Module | monitoring_view', 'Promise | monitoring_view', 'Opml | monitoring_view')</script>
<script data-renderjs-configuration="app_allowed_sub_types" type="text/x-renderjs-configuration">('Software Instance Module | Software Instance', 'Instance Tree Module | Instance Tree', 'Software Instance | Promise')</script> <script data-renderjs-configuration="app_allowed_sub_types" type="text/x-renderjs-configuration">('Software Instance Module | Software Instance', 'Instance Tree Module | Instance Tree', 'Software Instance | Promise')</script>
<script data-renderjs-configuration="app_configurator" type="text/x-renderjs-configuration">ojsm_import_export</script> <script data-renderjs-configuration="app_configurator" type="text/x-renderjs-configuration">ojsm_import_export</script>
<script data-renderjs-configuration="software_instance_module_dict" type="text/x-renderjs-configuration">{"front_page": 1, "upload_button": 0, "download_button": 0, "editable": 0, "hide_add_button": 1, "jump_button": 0, "fast_input_button": 0, "export_button": 0, "filter_action": 1, "panel_action": 1, "previous_next_button": 0, "history_previous_link": 0, "title": "Software Instances Status", "hide_listbox_buttons": 1, "blob_type": "", "blob_create_object_url": 0}</script> <script data-renderjs-configuration="software_instance_module_dict" type="text/x-renderjs-configuration">{"front_page": 1, "upload_button": 0, "download_button": 0, "editable": 0, "hide_add_button": 1, "jump_button": 0, "fast_input_button": 0, "export_button": 0, "filter_action": 1, "panel_action": 1, "previous_next_button": 0, "history_previous_link": 0, "title": "Software Instances Status", "hide_listbox_buttons": 1, "blob_type": "", "blob_create_object_url": 0}</script>
...@@ -34,6 +34,6 @@ ...@@ -34,6 +34,6 @@
<script data-renderjs-configuration="instance_tree_dict" type="text/x-renderjs-configuration"> {"front_page": 0, "upload_button": 0, "download_button": 0, "editable": 0, "hide_add_button": 1, "jump_button": 0, "fast_input_button": 0, "export_button": 0, "filter_action": 0, "panel_action": 1, "previous_next_button": 1, "history_previous_link": 1, "title": "Instance Tree: ", "hide_listbox_buttons": 1, "blob_type": "", "blob_create_object_url": 0, "custom_header": "gadget_officejs_monitoring_options_header.html", "view": "instance_tree", "custom_submit": "gadget_officejs_monitoring_submit.html" }</script> <script data-renderjs-configuration="instance_tree_dict" type="text/x-renderjs-configuration"> {"front_page": 0, "upload_button": 0, "download_button": 0, "editable": 0, "hide_add_button": 1, "jump_button": 0, "fast_input_button": 0, "export_button": 0, "filter_action": 0, "panel_action": 1, "previous_next_button": 1, "history_previous_link": 1, "title": "Instance Tree: ", "hide_listbox_buttons": 1, "blob_type": "", "blob_create_object_url": 0, "custom_header": "gadget_officejs_monitoring_options_header.html", "view": "instance_tree", "custom_submit": "gadget_officejs_monitoring_submit.html" }</script>
<script data-renderjs-configuration="promise_module_dict" type="text/x-renderjs-configuration">{"front_page": 1, "upload_button": 0, "download_button": 0, "editable": 0, "hide_add_button": 1, "jump_button": 0, "fast_input_button": 0, "export_button": 0, "filter_action": 1, "panel_action": 1, "previous_next_button": 0, "history_previous_link": 0, "title": "Monitoring Promises Status", "hide_listbox_buttons": 1, "blob_type": "", "blob_create_object_url": 0}</script> <script data-renderjs-configuration="promise_module_dict" type="text/x-renderjs-configuration">{"front_page": 1, "upload_button": 0, "download_button": 0, "editable": 0, "hide_add_button": 1, "jump_button": 0, "fast_input_button": 0, "export_button": 0, "filter_action": 1, "panel_action": 1, "previous_next_button": 0, "history_previous_link": 0, "title": "Monitoring Promises Status", "hide_listbox_buttons": 1, "blob_type": "", "blob_create_object_url": 0}</script>
<script data-renderjs-configuration="promise_dict" type="text/x-renderjs-configuration"> {"front_page": 0, "upload_button": 0, "download_button": 0, "editable": 0, "hide_add_button": 1, "jump_button": 0, "fast_input_button": 0, "export_button": 0, "filter_action": 0, "panel_action": 1, "previous_next_button": 1, "history_previous_link": 1, "title": "Promise: ", "hide_listbox_buttons": 1, "blob_type": "", "blob_create_object_url": 0, "custom_header": "gadget_officejs_monitoring_options_header.html", "view": "promise", "custom_submit": "gadget_officejs_monitoring_submit.html" }</script> <script data-renderjs-configuration="promise_dict" type="text/x-renderjs-configuration"> {"front_page": 0, "upload_button": 0, "download_button": 0, "editable": 0, "hide_add_button": 1, "jump_button": 0, "fast_input_button": 0, "export_button": 0, "filter_action": 0, "panel_action": 1, "previous_next_button": 1, "history_previous_link": 1, "title": "Promise: ", "hide_listbox_buttons": 1, "blob_type": "", "blob_create_object_url": 0, "custom_header": "gadget_officejs_monitoring_options_header.html", "view": "promise", "custom_submit": "gadget_officejs_monitoring_submit.html" }</script>
<script data-renderjs-configuration="opml_dict" type="text/x-renderjs-configuration"> {"front_page": 0, "upload_button": 0, "download_button": 0, "editable": 0, "hide_add_button": 1, "jump_button": 0, "fast_input_button": 0, "export_button": 0, "filter_action": 0, "panel_action": 1, "previous_next_button": 1, "history_previous_link": 1, "hide_listbox_buttons": 1, "blob_type": "", "blob_create_object_url": 0, "custom_header": "gadget_officejs_monitoring_options_header.html", "view": "opml" }</script> <script data-renderjs-configuration="opml_dict" type="text/x-renderjs-configuration"> {"front_page": 0, "upload_button": 0, "download_button": 0, "editable": 0, "hide_add_button": 1, "jump_button": 0, "fast_input_button": 0, "export_button": 0, "filter_action": 0, "panel_action": 1, "previous_next_button": 1, "history_previous_link": 1, "hide_listbox_buttons": 1, "blob_type": "", "blob_create_object_url": 0, "custom_header": "gadget_officejs_monitoring_options_header.html", "view": "opml", "custom_submit": "gadget_officejs_monitoring_submit.html" }</script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -265,7 +265,7 @@ ...@@ -265,7 +265,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>1016.14833.52348.59392</string> </value> <value> <string>1016.62603.53500.56064</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -285,7 +285,7 @@ ...@@ -285,7 +285,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1714498936.34</float> <float>1717428289.21</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
/** /**
* *
* Sample OPML Tree Replicated Storage spec * Sample OPML Tree Replicated Storage spec
* *
* { * {
* "type": "replicatedopml", * "type": "replicatedopml",
* "remote_storage_unreachable_status": "WARNING", * "remote_storage_unreachable_status": "WARNING",
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
* } * }
* } * }
* } * }
* *
*/ */
var rusha = new Rusha(), var rusha = new Rusha(),
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
PROMISE_TYPE = "Promise", PROMISE_TYPE = "Promise",
SOFTWARE_INSTANCE_TYPE = "Software Instance", SOFTWARE_INSTANCE_TYPE = "Software Instance",
INSTANCE_TREE_TYPE = "Instance Tree", INSTANCE_TREE_TYPE = "Instance Tree",
OPML_PORTAL_TYPE = "Opml",
ZONE_LIST = [ ZONE_LIST = [
"-1200", "-1200",
"-1100", "-1100",
...@@ -154,7 +155,7 @@ ...@@ -154,7 +155,7 @@
var storage = this._local_sub_storage; var storage = this._local_sub_storage;
return storage.get(id) return storage.get(id)
.push(function (doc) { .push(function (doc) {
if (doc.portal_type !== 'opml') { if (doc.portal_type !== OPML_PORTAL_TYPE) {
return storage.remove(id); return storage.remove(id);
} }
function removeOPMLTree(url) { function removeOPMLTree(url) {
...@@ -809,7 +810,7 @@ ...@@ -809,7 +810,7 @@
function syncOpmlStorage(context) { function syncOpmlStorage(context) {
return context._local_sub_storage.allDocs({ return context._local_sub_storage.allDocs({
query: '(portal_type:"opml") AND (active:true) AND (url:"https://%")', query: '(portal_type:"' + OPML_PORTAL_TYPE + '") AND (active:true) AND (url:"https://%")',
select_list: ["title", "url", "basic_login"] select_list: ["title", "url", "basic_login"]
}) })
.push(function (storage_result) { .push(function (storage_result) {
......
...@@ -249,7 +249,7 @@ ...@@ -249,7 +249,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>1015.32774.1126.37956</string> </value> <value> <string>1017.22812.19597.42137</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1712157668.63</float> <float>1718724260.35</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>opml</string> </value> <value> <string>Opml</string> </value>
</item> </item>
<item> <item>
<key> <string>init_script</string> </key> <key> <string>init_script</string> </key>
......
...@@ -105,6 +105,7 @@ ...@@ -105,6 +105,7 @@
<string>my_url</string> <string>my_url</string>
<string>my_username</string> <string>my_username</string>
<string>my_password</string> <string>my_password</string>
<string>my_slapos_master_url</string>
<string>my_active</string> <string>my_active</string>
<string>my_verify</string> <string>my_verify</string>
<string>my_translated_state</string> <string>my_translated_state</string>
...@@ -122,7 +123,7 @@ ...@@ -122,7 +123,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>opml_viewForMonitoring</string> </value> <value> <string>Opml_viewForMonitoring</string> </value>
</item> </item>
<item> <item>
<key> <string>method</string> </key> <key> <string>method</string> </key>
......
image_module/gadget_officejs_appstore_rapid_spage image_module/gadget_officejs_appstore_rapid_spage
portal_types/Instance Tree Module/monitoring_view portal_types/Instance Tree Module/monitoring_view
portal_types/Instance Tree/monitoring_view portal_types/Instance Tree/monitoring_view
portal_types/Opml/monitoring_view
portal_types/Promise Module/monitoring_view portal_types/Promise Module/monitoring_view
portal_types/Promise/monitoring_view portal_types/Promise/monitoring_view
portal_types/Software Instance Module/monitoring_view portal_types/Software Instance Module/monitoring_view
portal_types/Software Instance/monitoring_processes_view portal_types/Software Instance/monitoring_processes_view
portal_types/Software Instance/monitoring_resources_view portal_types/Software Instance/monitoring_resources_view
portal_types/Software Instance/monitoring_view portal_types/Software Instance/monitoring_view
portal_types/opml/monitoring_view
web_page_module/gadget_erp5_field_status_* web_page_module/gadget_erp5_field_status_*
web_page_module/gadget_erp5_page_ojsm_* web_page_module/gadget_erp5_page_ojsm_*
web_page_module/gadget_erp5_page_settings_configurator_* web_page_module/gadget_erp5_page_settings_configurator_*
web_page_module/gadget_officejs_jio_opml_view_html
web_page_module/gadget_officejs_jio_opml_view_js
web_page_module/gadget_officejs_monitoring.configuration web_page_module/gadget_officejs_monitoring.configuration
web_page_module/gadget_officejs_monitoring_* web_page_module/gadget_officejs_monitoring_*
web_page_module/gadget_ojsm_* web_page_module/gadget_ojsm_*
......
portal_types/Instance Tree Module/monitoring_view portal_types/Instance Tree Module/monitoring_view
portal_types/Instance Tree/monitoring_view portal_types/Instance Tree/monitoring_view
portal_types/Opml/monitoring_view
portal_types/Promise Module/monitoring_view portal_types/Promise Module/monitoring_view
portal_types/Promise/monitoring_view portal_types/Promise/monitoring_view
portal_types/Software Instance Module/monitoring_view portal_types/Software Instance Module/monitoring_view
portal_types/Software Instance/monitoring_processes_view portal_types/Software Instance/monitoring_processes_view
portal_types/Software Instance/monitoring_resources_view portal_types/Software Instance/monitoring_resources_view
portal_types/Software Instance/monitoring_view portal_types/Software Instance/monitoring_view
portal_types/opml/monitoring_view \ No newline at end of file
\ No newline at end of file
image_module/gadget_officejs_appstore_rapid_spage image_module/gadget_officejs_appstore_rapid_spage
portal_types/Instance Tree Module/monitoring_view portal_types/Instance Tree Module/monitoring_view
portal_types/Instance Tree/monitoring_view portal_types/Instance Tree/monitoring_view
portal_types/Opml/monitoring_view
portal_types/Promise Module/monitoring_view portal_types/Promise Module/monitoring_view
portal_types/Promise/monitoring_view portal_types/Promise/monitoring_view
portal_types/Software Instance Module/monitoring_view portal_types/Software Instance Module/monitoring_view
portal_types/Software Instance/monitoring_processes_view portal_types/Software Instance/monitoring_processes_view
portal_types/Software Instance/monitoring_resources_view portal_types/Software Instance/monitoring_resources_view
portal_types/Software Instance/monitoring_view portal_types/Software Instance/monitoring_view
portal_types/opml/monitoring_view
web_page_module/gadget_erp5_field_status_* web_page_module/gadget_erp5_field_status_*
web_page_module/gadget_erp5_page_ojsm_* web_page_module/gadget_erp5_page_ojsm_*
web_page_module/gadget_erp5_page_settings_configurator_* web_page_module/gadget_erp5_page_settings_configurator_*
web_page_module/gadget_officejs_jio_opml_view_html
web_page_module/gadget_officejs_jio_opml_view_js
web_page_module/gadget_officejs_monitoring.configuration web_page_module/gadget_officejs_monitoring.configuration
web_page_module/gadget_officejs_monitoring_* web_page_module/gadget_officejs_monitoring_*
web_page_module/gadget_ojsm_* web_page_module/gadget_ojsm_*
......
image_module/gadget_officejs_appstore_rapid_spage image_module/gadget_officejs_appstore_rapid_spage
portal_types/Instance Tree Module/monitoring_view portal_types/Instance Tree Module/monitoring_view
portal_types/Instance Tree/monitoring_view portal_types/Instance Tree/monitoring_view
portal_types/Opml/monitoring_view
portal_types/Promise Module/monitoring_view portal_types/Promise Module/monitoring_view
portal_types/Promise/monitoring_view portal_types/Promise/monitoring_view
portal_types/Software Instance Module/monitoring_view portal_types/Software Instance Module/monitoring_view
portal_types/Software Instance/monitoring_processes_view portal_types/Software Instance/monitoring_processes_view
portal_types/Software Instance/monitoring_resources_view portal_types/Software Instance/monitoring_resources_view
portal_types/Software Instance/monitoring_view portal_types/Software Instance/monitoring_view
portal_types/opml/monitoring_view
web_page_module/gadget_erp5_field_status_* web_page_module/gadget_erp5_field_status_*
web_page_module/gadget_erp5_page_ojsm_* web_page_module/gadget_erp5_page_ojsm_*
web_page_module/gadget_erp5_page_settings_configurator_* web_page_module/gadget_erp5_page_settings_configurator_*
web_page_module/gadget_officejs_jio_opml_view_html
web_page_module/gadget_officejs_jio_opml_view_js
web_page_module/gadget_officejs_monitoring.configuration web_page_module/gadget_officejs_monitoring.configuration
web_page_module/gadget_officejs_monitoring_* web_page_module/gadget_officejs_monitoring_*
web_page_module/gadget_ojsm_* web_page_module/gadget_ojsm_*
......
Instance Tree Instance Tree
Instance Tree Module Instance Tree Module
Opml
Promise Promise
Promise Module Promise Module
Software Instance Software Instance
Software Instance Module Software Instance Module
opml \ No newline at end of file
\ No newline at end of file
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