Commit 4a67b651 authored by Alain Takoudjou's avatar Alain Takoudjou Committed by Rafael Monnerat

[erp5_web_monitoring] do not loop on asking to import setting from slapos master

parent 1b71ec24
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
.declareAcquiredMethod("getSetting", "getSetting") .declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("setSetting", "setSetting") .declareAcquiredMethod("setSetting", "setSetting")
.declareMethod("render", function () { .declareMethod("render", function (options) {
var gadget = this; var gadget = this;
return this.updateHeader({ return this.updateHeader({
page_title: "Monitoring Synchronization" page_title: "Monitoring Synchronization"
...@@ -26,6 +26,16 @@ ...@@ -26,6 +26,16 @@
}) })
.push(function () { .push(function () {
var redirect_options = {"page": "ojsm_status_list"}; var redirect_options = {"page": "ojsm_status_list"};
if (options.reset === "1") {
// reset redirections
return gadget.setSetting("sync_redirect_options", undefined)
.push(function () {
return gadget.redirect({
"command": "display",
"options": redirect_options
});
});
}
return gadget.getSetting('sync_redirect_options') return gadget.getSetting('sync_redirect_options')
.push(function (redirect_dict) { .push(function (redirect_dict) {
if (redirect_options) { if (redirect_options) {
......
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>963.37808.2626.47837</string> </value> <value> <string>971.18960.44200.52138</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -268,7 +268,7 @@ ...@@ -268,7 +268,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1511175451.34</float> <float>1540897197.53</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
context.getUrlFor({command: 'display', options: {page: "ojsm_hosting_subscription_list"}}), context.getUrlFor({command: 'display', options: {page: "ojsm_hosting_subscription_list"}}),
context.getUrlFor({command: 'display', options: {page: "settings_configurator"}}), context.getUrlFor({command: 'display', options: {page: "settings_configurator"}}),
context.getUrlFor({command: 'display', options: {page: "ojsm_import_export"}}), context.getUrlFor({command: 'display', options: {page: "ojsm_import_export"}}),
context.getUrlFor({command: 'display', options: {page: "ojsm_synchronize"}}) context.getUrlFor({command: 'display', options: {page: "ojsm_synchronize", reset: 1}})
]); ]);
}) })
.push(function (result_list) { .push(function (result_list) {
......
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>963.33473.65379.28757</string> </value> <value> <string>963.33474.25813.19302</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1510915343.58</float> <float>1540896767.32</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </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