Commit 9b8515be authored by Roque's avatar Roque

erp5_web_monitoring: fix landing page, tests & minor fixes

- setting configurator header link
- allow auto_sync when adding opml
- update form title
- fix landing page
- fix dispatch
- fix form naming
- fix form and fields naming (coding style tests)
parent f5dcc807
......@@ -75,7 +75,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Opml_viewForMonitoring</string> </value>
<value> <string>string:${object_url}/opml_viewForMonitoring</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -54,6 +54,16 @@
});
}
});
} else if (options.url && options.username && options.password) {
return gadget.redirect(
{"command": "display",
"options": {
"url": options.url,
"username": options.username,
"password": options.password,
"page": "ojsm_opml_add"
}
});
}
return new RSVP.Queue()
.push(function () {
......
......@@ -246,7 +246,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1014.43824.52459.5376</string> </value>
<value> <string>1016.49507.50003.17561</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -266,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>1708449003.36</float>
<float>1716393876.23</float>
<string>UTC</string>
</tuple>
</state>
......
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<title>ERP5 Page Monitoring Landing</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="gadget_erp5_page_ojsm_landing.js" type="text/javascript"></script>
</head>
<body>
</body>
</html>
\ No newline at end of file
/*global window, rJS, RSVP */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP) {
"use strict";
rJS(window)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("redirect", "redirect")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod("render", function (options) {
var gadget = this;
return new RSVP.Queue()
.push(function () {
options.page = 'ojsm_dispatch';
return gadget.redirect({command: 'display', options: options });
});
});
}(window, rJS, RSVP));
\ No newline at end of file
......@@ -98,7 +98,7 @@
})
.declareMethod("render", function (options) {
var gadget = this;
var gadget = this, auto_sync = !options.intra;
return RSVP.Queue()
.push(function () {
var button_no_pwd = gadget.element.getElementsByClassName("btn-nopasswd");
......@@ -230,6 +230,14 @@
save_action: true,
change_password: chg_pwd_url
});
})
.push(function () {
return gadget.checkSynchronize(auto_sync);
});
})
.declareJob("checkSynchronize", function (auto_sync) {
if (auto_sync) {
return this.element.querySelector('button[type="submit"]').click();
}
});
}(window, rJS, RSVP));
......@@ -260,7 +260,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1015.15648.56156.28518</string> </value>
<value> <string>1016.46878.65388.21691</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -280,7 +280,7 @@
</tuple>
<state>
<tuple>
<float>1710516573.13</float>
<float>1716236126.38</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -353,7 +353,7 @@
})
.push(function () {
return RSVP.all([
gadget.getUrlFor({command: "change", options: {"page": "ojsm_opml_add"}}),
gadget.getUrlFor({command: "change", options: {"page": "ojsm_opml_add", "intra": true}}),
gadget.getSetting('document_title')
]);
})
......
......@@ -246,7 +246,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1016.681.49439.24951</string> </value>
<value> <string>1016.27838.64215.37273</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -266,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>1713893527.2</float>
<float>1716236037.63</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -87,7 +87,7 @@
<item>
<key> <string>text_content</string> </key>
<value> <string>CONFIGURATION MANIFEST\n
# generated on Fri Apr 19 17:49:01 2024\n
# generated on Fri May 24 14:46:38 2024\n
CACHE:\n
\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL1NvZnR3YXJlIEluc3RhbmNl\n
......@@ -99,7 +99,7 @@ hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL1NvZnR3YXJlIEluc3RhbmNlL21vbml
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfd2ViX21vbml0b3JpbmcvU29mdHdhcmVJbnN0YW5jZV92aWV3Rm9yTW9uaXRvcmluZ1Byb2Nlc3Nlcw==\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL29wbWw=\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL29wbWwvbW9uaXRvcmluZ192aWV3\n
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfd2ViX21vbml0b3JpbmcvT3BtbF92aWV3Rm9yTW9uaXRvcmluZw==\n
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfd2ViX21vbml0b3Jpbmcvb3BtbF92aWV3Rm9yTW9uaXRvcmluZw==\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL0luc3RhbmNlIFRyZWU=\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL0luc3RhbmNlIFRyZWUvbW9uaXRvcmluZ192aWV3\n
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfd2ViX21vbml0b3JpbmcvSW5zdGFuY2VUcmVlX3ZpZXdGb3JNb25pdG9yaW5n\n
......
......@@ -544,7 +544,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1015.32811.16758.20599</string> </value>
<value> <string>1015.32811.46439.54528</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -564,7 +564,7 @@
</tuple>
<state>
<tuple>
<float>1711546302.51</float>
<float>1716562039.61</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -579,7 +579,7 @@ WebSection_getMonitorPrecacheManifestList</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1015.45943.10991.6587</string> </value>
<value> <string>1015.45944.11619.35208</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -599,7 +599,7 @@ WebSection_getMonitorPrecacheManifestList</string> </value>
</tuple>
<state>
<tuple>
<float>1712334250.63</float>
<float>1716562039.61</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -339,7 +339,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1014.3363.61933.30344</string> </value>
<value> <string>1014.3364.27014.64238</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -359,7 +359,7 @@
</tuple>
<state>
<tuple>
<float>1706020104.73</float>
<float>1716562039.61</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -134,7 +134,9 @@ url_list = [
"gadget_officejs_monitoring_submit.html",
"gadget_officejs_monitoring_submit.js",
"gadget_erp5_field_parent.html",
"gadget_erp5_field_parent.js"
"gadget_erp5_field_parent.js",
"gadget_erp5_page_ojsm_landing.html",
"gadget_erp5_page_ojsm_landing.js"
]
return url_list
......@@ -105,9 +105,9 @@
<string>my_url</string>
<string>my_username</string>
<string>my_password</string>
<string>my_state</string>
<string>my_active</string>
<string>verify</string>
<string>my_verify</string>
<string>my_translated_state</string>
</list>
</value>
</item>
......@@ -122,7 +122,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Opml_viewForMonitoring</string> </value>
<value> <string>opml_viewForMonitoring</string> </value>
</item>
<item>
<key> <string>method</string> </key>
......@@ -130,7 +130,7 @@
</item>
<item>
<key> <string>name</string> </key>
<value> <string>Promise_view</string> </value>
<value> <string>InstanceTree_view</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
......@@ -146,7 +146,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Promise</string> </value>
<value> <string>Opml</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
......
......@@ -37,6 +37,10 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>autocomplete</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
......@@ -116,6 +120,10 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>autocomplete</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_state</string> </value>
<value> <string>my_translated_state</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -37,6 +37,10 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>autocomplete</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
......@@ -116,6 +120,10 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>autocomplete</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
......
......@@ -37,6 +37,10 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>autocomplete</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
......@@ -116,6 +120,10 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>autocomplete</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
......
......@@ -37,6 +37,10 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>autocomplete</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
......@@ -116,6 +120,10 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>autocomplete</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
......@@ -221,7 +229,7 @@
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>verify</string> </value>
<value> <string>my_verify</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
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