Commit 72193d06 authored by Boxiang Sun's avatar Boxiang Sun

slapos_jio: Force user to login if they don't have a correct setting

parent 0be2065d
......@@ -9,6 +9,7 @@
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script src="gadget_slapos_utils.js" type="text/javascript"></script>
<script src="gadget_erp5_page_slap_add_related_ticket.js"></script>
</head>
......
......@@ -245,6 +245,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -277,7 +278,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.64746.4978.20753</string> </value>
<value> <string>980.6873.14525.36027</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -295,7 +296,7 @@
</tuple>
<state>
<tuple>
<float>1508859502.98</float>
<float>1575974033.34</float>
<string>UTC</string>
</tuple>
</state>
......@@ -304,6 +305,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -361,6 +363,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......
......@@ -74,7 +74,7 @@
gadget.getDeclaredGadget('form_view'),
gadget.jio_getAttachment("ticket_resource_list",
hateoas_url + "Ticket_getResourceItemListAsJSON"),
gadget.getSetting("me")
window.getSettingMe(gadget)
]);
})
.push(function (result) {
......
......@@ -241,6 +241,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -273,7 +274,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>972.32024.53732.34406</string> </value>
<value> <string>980.6873.14525.36027</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -291,7 +292,7 @@
</tuple>
<state>
<tuple>
<float>1545996475.08</float>
<float>1575020732.67</float>
<string>UTC</string>
</tuple>
</state>
......@@ -300,6 +301,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -357,6 +359,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......
......@@ -9,6 +9,7 @@
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script src="gadget_slapos_utils.js" type="text/javascript"></script>
<script src="gadget_erp5_page_slap_add_ticket.js"></script>
</head>
......
......@@ -245,6 +245,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -277,7 +278,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.58969.5978.58811</string> </value>
<value> <string>980.6931.21812.22596</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -295,7 +296,7 @@
</tuple>
<state>
<tuple>
<float>1508512913.95</float>
<float>1574960470.43</float>
<string>UTC</string>
</tuple>
</state>
......@@ -304,6 +305,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -361,6 +363,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......
......@@ -13,6 +13,7 @@
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("jio_post", "jio_post")
.declareAcquiredMethod("jio_get", "jio_get")
.declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", 'notifySubmitted')
......@@ -71,7 +72,7 @@
gadget.getDeclaredGadget('form_view'),
gadget.jio_getAttachment("ticket_resource_list",
hateoas_url + "Ticket_getResourceItemListAsJSON"),
gadget.getSetting("me")
window.getSettingMe(gadget)
]);
})
.push(function (result) {
......
......@@ -241,6 +241,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -273,7 +274,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.7798.59652.54613</string> </value>
<value> <string>980.7928.37162.44441</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -291,7 +292,7 @@
</tuple>
<state>
<tuple>
<float>1509374910.39</float>
<float>1576228705.95</float>
<string>UTC</string>
</tuple>
</state>
......@@ -300,6 +301,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -357,6 +359,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......
......@@ -13,6 +13,7 @@
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_slapos_utils.js" type="text/javascript"></script>
<script src="gadget_erp5_page_slap_person_view.js" type="text/javascript"></script>
</head>
......
......@@ -202,6 +202,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -234,7 +235,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.58641.23625.32170</string> </value>
<value> <string>980.6873.14525.36027</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +253,7 @@
</tuple>
<state>
<tuple>
<float>1508500260.41</float>
<float>1574960455.23</float>
<string>UTC</string>
</tuple>
</state>
......@@ -261,6 +262,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -318,6 +320,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......
......@@ -10,6 +10,7 @@
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("getUrlParameter", "getUrlParameter")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("jio_get", "jio_get")
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("updateDocument", "updateDocument")
......@@ -45,7 +46,7 @@
return new RSVP.Queue()
.push(function () {
return gadget.getSetting("me");
return window.getSettingMe(gadget);
})
.push(function (me) {
jio_key = me;
......@@ -206,7 +207,7 @@
});
})
.push(function () {
return gadget.getSetting("me");
return window.getSettingMe(gadget);
})
.push(function (me) {
return RSVP.all([
......
......@@ -209,6 +209,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -241,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>976.40553.2729.56763</string> </value>
<value> <string>980.7943.45013.43144</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -259,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1561422636.38</float>
<float>1575023357.88</float>
<string>UTC</string>
</tuple>
</state>
......@@ -268,6 +269,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -325,6 +327,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......
......@@ -13,6 +13,7 @@
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_slapos_utils.js" type="text/javascript"></script>
<script src="gadget_erp5_page_slap_project_list.js" type="text/javascript"></script>
</head>
......
......@@ -202,6 +202,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -234,7 +235,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.57392.25775.12868</string> </value>
<value> <string>980.25270.11198.51746</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +253,7 @@
</tuple>
<state>
<tuple>
<float>1508418276.01</float>
<float>1575973846.43</float>
<string>UTC</string>
</tuple>
</state>
......@@ -261,6 +262,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -318,6 +320,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......
......@@ -12,6 +12,7 @@
.declareAcquiredMethod("jio_get", "jio_get")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
.allowPublicAcquisition("jio_allDocs", function (param_list) {
var gadget = this;
......@@ -62,7 +63,7 @@
.push(function () {
return RSVP.all([
gadget.getSetting("listbox_lines_limit", 20),
gadget.getSetting("me")
window.getSettingMe(gadget)
]);
})
.push(function (settings) {
......
......@@ -198,6 +198,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -216,7 +217,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>superrafael</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -230,7 +231,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>974.61500.28585.34065</string> </value>
<value> <string>980.7946.28171.30583</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +249,7 @@
</tuple>
<state>
<tuple>
<float>1554901016.21</float>
<float>1575020906.65</float>
<string>UTC</string>
</tuple>
</state>
......@@ -257,6 +258,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -314,6 +316,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......
......@@ -13,6 +13,7 @@
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_slapos_utils.js" type="text/javascript"></script>
<script src="gadget_erp5_page_slap_site_list.js" type="text/javascript"></script>
</head>
......
......@@ -202,6 +202,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -234,7 +235,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.56743.21060.60706</string> </value>
<value> <string>980.6873.14525.36027</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +253,7 @@
</tuple>
<state>
<tuple>
<float>1508379341.42</float>
<float>1575974102.28</float>
<string>UTC</string>
</tuple>
</state>
......@@ -261,6 +262,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -318,6 +320,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......
......@@ -12,6 +12,7 @@
.declareAcquiredMethod("jio_get", "jio_get")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
.allowPublicAcquisition("jio_allDocs", function (param_list) {
var gadget = this;
......@@ -62,7 +63,7 @@
.push(function () {
return RSVP.all([
gadget.getSetting("listbox_lines_limit", 20),
gadget.getSetting("me")
window.getSettingMe(gadget)
]);
})
.push(function (settings) {
......
......@@ -198,6 +198,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -230,7 +231,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>974.61497.27931.35481</string> </value>
<value> <string>980.6873.14525.36027</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +249,7 @@
</tuple>
<state>
<tuple>
<float>1554900905.51</float>
<float>1575020879.49</float>
<string>UTC</string>
</tuple>
</state>
......@@ -257,6 +258,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -314,6 +316,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......
......@@ -13,6 +13,7 @@
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_slapos_utils.js" type="text/javascript"></script>
<script src="gadget_erp5_page_slap_ticket_list.js" type="text/javascript"></script>
</head>
......
......@@ -202,6 +202,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -234,7 +235,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.57056.15979.37768</string> </value>
<value> <string>980.6925.1989.65006</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +253,7 @@
</tuple>
<state>
<tuple>
<float>1508400946.22</float>
<float>1574960436.86</float>
<string>UTC</string>
</tuple>
</state>
......@@ -261,6 +262,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -318,6 +320,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......
......@@ -13,6 +13,7 @@
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("jio_get", "jio_get")
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
/////////////////////////////////////////////////////////////////
......@@ -33,7 +34,7 @@
.push(function () {
return RSVP.all([
gadget.getSetting("listbox_lines_limit", 20),
gadget.getSetting("me")
window.getSettingMe(gadget)
]);
})
.push(function (setting) {
......
......@@ -198,6 +198,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -230,7 +231,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>974.61510.55768.19899</string> </value>
<value> <string>980.7933.50073.58436</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +249,7 @@
</tuple>
<state>
<tuple>
<float>1554901834.87</float>
<float>1575023625.93</float>
<string>UTC</string>
</tuple>
</state>
......@@ -257,6 +258,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -314,6 +316,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......
......@@ -9,6 +9,7 @@
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script src="gadget_slapos_utils.js" type="text/javascript"></script>
<script src="gadget_erp5_page_slap_transfer_computer.js"></script>
</head>
......
......@@ -245,6 +245,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -277,7 +278,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.5710.48275.44561</string> </value>
<value> <string>980.6873.14525.36027</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -295,7 +296,7 @@
</tuple>
<state>
<tuple>
<float>1513095296.49</float>
<float>1575974170.76</float>
<string>UTC</string>
</tuple>
</state>
......@@ -304,6 +305,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -361,6 +363,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......
......@@ -16,6 +16,7 @@
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", 'notifySubmitted')
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
/////////////////////////////////////////////////////////////////
// declared methods
......@@ -59,10 +60,10 @@
var gadget = this;
return RSVP.Queue()
.push(function () {
return gadget.getSetting("me");
return window.getSettingMe(gadget);
})
.push(function (setting) {
return gadget.jio_get(setting);
.push(function (me) {
return gadget.jio_get(me);
})
.push(function (me) {
var i, destination_list = '"NULL",', destination_project_list = '"NULL",';
......
......@@ -241,6 +241,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -273,7 +274,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>976.63583.16434.8499</string> </value>
<value> <string>980.7936.26366.2440</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -291,7 +292,7 @@
</tuple>
<state>
<tuple>
<float>1562716830.3</float>
<float>1575021037.87</float>
<string>UTC</string>
</tuple>
</state>
......@@ -300,6 +301,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -357,6 +359,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......
......@@ -9,6 +9,7 @@
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script src="gadget_slapos_utils.js" type="text/javascript"></script>
<script src="gadget_erp5_page_slap_transfer_computer_network.js"></script>
</head>
......
......@@ -243,6 +243,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -275,7 +276,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>976.54364.6278.50414</string> </value>
<value> <string>980.6873.14525.36027</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -293,7 +294,7 @@
</tuple>
<state>
<tuple>
<float>1562163619.43</float>
<float>1575974198.14</float>
<string>UTC</string>
</tuple>
</state>
......@@ -302,6 +303,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -359,6 +361,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......
......@@ -16,6 +16,7 @@
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", 'notifySubmitted')
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
/////////////////////////////////////////////////////////////////
// declared methods
......@@ -60,10 +61,10 @@
var gadget = this;
return RSVP.Queue()
.push(function () {
return gadget.getSetting("me");
return window.getSettingMe(gadget);
})
.push(function (setting) {
return gadget.jio_get(setting);
.push(function (me) {
return gadget.jio_get(me);
})
.push(function (me) {
var i, destination_list = '"NULL",', destination_project_list = '"NULL",';
......
......@@ -239,6 +239,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -271,7 +272,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>976.63058.9497.29047</string> </value>
<value> <string>980.7950.22451.65331</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -289,7 +290,7 @@
</tuple>
<state>
<tuple>
<float>1562685363.87</float>
<float>1575023514.97</float>
<string>UTC</string>
</tuple>
</state>
......@@ -298,6 +299,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -355,6 +357,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......
......@@ -9,6 +9,7 @@
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script src="gadget_slapos_utils.js" type="text/javascript"></script>
<script src="gadget_erp5_page_slap_transfer_hosting_subscription.js"></script>
</head>
......
......@@ -243,6 +243,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -275,7 +276,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>976.53573.50917.64870</string> </value>
<value> <string>980.6873.14525.36027</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -293,7 +294,7 @@
</tuple>
<state>
<tuple>
<float>1562116200.02</float>
<float>1575974222.39</float>
<string>UTC</string>
</tuple>
</state>
......@@ -302,6 +303,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -359,6 +361,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......
......@@ -16,6 +16,7 @@
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", 'notifySubmitted')
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
/////////////////////////////////////////////////////////////////
// declared methods
......@@ -59,10 +60,10 @@
var gadget = this;
return new RSVP.Queue()
.push(function () {
return gadget.getSetting("me");
return window.getSettingMe(gadget);
})
.push(function (setting) {
return gadget.jio_get(setting);
.push(function (me) {
return gadget.jio_get(me);
})
.push(function (me) {
var i, destination_list = '"NULL",', destination_project_list = '"NULL",';
......
......@@ -239,6 +239,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -271,7 +272,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>976.63257.63038.55210</string> </value>
<value> <string>980.7935.13175.8686</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -289,7 +290,7 @@
</tuple>
<state>
<tuple>
<float>1562697293.25</float>
<float>1575021005.08</float>
<string>UTC</string>
</tuple>
</state>
......@@ -298,6 +299,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -355,6 +357,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......
......@@ -14,6 +14,7 @@
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_slapos_utils.js" type="text/javascript"></script>
<script src="gadget_erp5_page_slapos.js" type="text/javascript"></script>
<link href="gadget_erp5_page_slapos.css" rel="stylesheet" type="text/css"/>
......
......@@ -213,6 +213,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -245,7 +246,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>975.8047.34187.33979</string> </value>
<value> <string>980.6873.14525.36027</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -263,7 +264,7 @@
</tuple>
<state>
<tuple>
<float>1555625336.18</float>
<float>1575974254.82</float>
<string>UTC</string>
</tuple>
</state>
......@@ -272,6 +273,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -329,6 +331,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......
......@@ -30,6 +30,7 @@
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("jio_get", "jio_get")
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
.allowPublicAcquisition("jio_allDocs", function (param_list) {
var gadget = this;
......@@ -119,7 +120,7 @@
.push(function () {
return RSVP.all([
gadget.getSetting("listbox_lines_limit", 100),
gadget.getSetting("me"),
window.getSettingMe(gadget),
gadget.jio_getAttachment('acl_users', 'links')
]);
})
......@@ -317,7 +318,7 @@
})
.declareService(function () {
var destination_list, gadget = this;
return gadget.getSetting("me")
return window.getSettingMe(gadget)
.push(function (me) {
return gadget.jio_get(me);
})
......
......@@ -209,6 +209,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -241,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>975.8014.50969.47940</string> </value>
<value> <string>980.6873.14525.36027</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -259,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1555624052.83</float>
<float>1575021126.08</float>
<string>UTC</string>
</tuple>
</state>
......@@ -268,6 +269,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -325,6 +327,7 @@
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......
......@@ -435,6 +435,7 @@ gadget_slapos_project_status.html\n
gadget_slapos_project_status.js\n
gadget_slapos_site_status.html\n
gadget_slapos_site_status.js\n
gadget_slapos_utils.js\n
gadget_trial_panel.html\n
gadget_trial_panel.js\n
leaflet.css\n
......@@ -547,6 +548,7 @@ NETWORK:\n
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -579,7 +581,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>977.18251.18616.53179</string> </value>
<value> <string>980.6847.33689.14199</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -597,7 +599,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1563930501.84</float>
<float>1575034735.39</float>
<string>UTC</string>
</tuple>
</state>
......@@ -606,6 +608,7 @@ NETWORK:\n
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......@@ -663,6 +666,7 @@ NETWORK:\n
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
......
/*global window, rJS, RSVP, UriTemplate */
/*jslint indent: 2, maxerr: 3, nomen: true */
(function (window, RSVP, UriTemplate) {
"use strict";
function redirectToLoginPage(gadget) {
var logout_url_template;
return gadget.jio_getAttachment('acl_users', 'links')
.push(function (links) {
logout_url_template = links._links.logout.href;
return gadget.getUrlFor({
command: 'display',
absolute_url: true,
options: {}
});
})
.push(function (came_from) {
return gadget.redirect({
command: 'raw',
options: {
url: UriTemplate.parse(logout_url_template).expand({came_from: came_from})
}
});
});
}
window.getSettingMe = function getSettingMe(gadget) {
return new RSVP.Queue()
.push(function () {
return gadget.getSetting("me");
})
.push(function (me) {
return RSVP.all([me, gadget.jio_get(me)]);
})
.push(function (list) {
if (list[0] === undefined) {
return redirectToLoginPage(gadget);
}
return list[0];
})
.push(undefined, function (error) {
return redirectToLoginPage(gadget);
});
};
}(window, RSVP, UriTemplate));
\ No newline at end of file
......@@ -193,6 +193,7 @@ web_page_module/rjs_gadget_slapos_site_status_js
web_page_module/rjs_gadget_translation_data_js
web_page_module/rjs_gadget_trial_panel_html
web_page_module/rjs_gadget_trial_panel_js
web_page_module/rjs_gadget_slapos_utils_js
web_page_module/rjs_leaflet_css
web_page_module/rjs_leaflet_js
web_page_module/rjs_tv4_min_js
......
......@@ -190,6 +190,7 @@ web_page_module/rjs_gadget_slapos_project_status_html
web_page_module/rjs_gadget_slapos_project_status_js
web_page_module/rjs_gadget_slapos_site_status_html
web_page_module/rjs_gadget_slapos_site_status_js
web_page_module/rjs_gadget_slapos_utils_js
web_page_module/rjs_gadget_translation_data_js
web_page_module/rjs_gadget_trial_panel_html
web_page_module/rjs_gadget_trial_panel_js
......
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