Commit 4cfc5e5d authored by Alain Takoudjou's avatar Alain Takoudjou Committed by Alain Takoudjou

do not loop on asking to import setting from slapos master

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