Commit f1070df6 authored by Romain Courteaud's avatar Romain Courteaud

Revert "slapos_jio: gadget_slapos_compute_node_status cleanup"

This reverts commit 85e6e268.
parent 0c2c5d82
...@@ -19,8 +19,21 @@ ...@@ -19,8 +19,21 @@
<a class="ui-btn ui-btn-icon-left ui-icon-desktop" href="{{monitor_url}}" target=_blank> {{right_title}} </a></div></div> <a class="ui-btn ui-btn-icon-left ui-icon-desktop" href="{{monitor_url}}" target=_blank> {{right_title}} </a></div></div>
</script> </script>
<script id="loading-template" type="text/x-handlebars-template">
<button data-i18n="loading" type="submit" class="responsive ui-btn ui-icon-spinner ui-icon-spin ui-btn-icon-center ui-disabled" style="border:none;">loading</button>
</script>
</head> </head>
<body> <body>
<div class="ui-block-a" style="width:50%">
<div class="ui-bar ui-corner-all first-child ui-btn-no-data">
<a class="ui-btn ui-btn-icon-left ui-icon-spinner" style="color: white !important;"> Compute Node </a>
</div>
</div>
<div class="ui-block-c" style="width:50%">
<div class="ui-bar ui-corner-all first-child ui-btn-no-data">
<a class="ui-btn ui-btn-icon-left ui-icon-spinner" style="color: white !important;"> Partitions </a>
</div>
</div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -193,183 +193,174 @@ ...@@ -193,183 +193,174 @@
</record> </record>
<record id="3" aka="AAAAAAAAAAM="> <record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/> <global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <tuple>
<item> <none/>
<key> <string>_log</string> </key> <list>
<value> <dictionary>
<list> <item>
<dictionary> <key> <string>action</string> </key>
<item> <value> <string>publish_alive</string> </value>
<key> <string>action</string> </key> </item>
<value> <string>publish_alive</string> </value> <item>
</item> <key> <string>actor</string> </key>
<item> <value> <string>zope</string> </value>
<key> <string>actor</string> </key> </item>
<value> <string>zope</string> </value> <item>
</item> <key> <string>comment</string> </key>
<item> <value> <string></string> </value>
<key> <string>comment</string> </key> </item>
<value> <string></string> </value> <item>
</item> <key> <string>error_message</string> </key>
<item> <value> <string></string> </value>
<key> <string>error_message</string> </key> </item>
<value> <string></string> </value> <item>
</item> <key> <string>time</string> </key>
<item> <value>
<key> <string>time</string> </key> <object>
<value> <klass>
<object> <global name="DateTime" module="DateTime.DateTime"/>
<klass> </klass>
<global name="DateTime" module="DateTime.DateTime"/> <tuple>
</klass> <none/>
<tuple> </tuple>
<none/> <state>
</tuple> <tuple>
<state> <float>1502472194.78</float>
<tuple> <string>UTC</string>
<float>1502472194.78</float> </tuple>
<string>UTC</string> </state>
</tuple> </object>
</state> </value>
</object> </item>
</value> <item>
</item> <key> <string>validation_state</string> </key>
<item> <value> <string>published_alive</string> </value>
<key> <string>validation_state</string> </key> </item>
<value> <string>published_alive</string> </value> </dictionary>
</item> </list>
</dictionary> <none/>
</list> </tuple>
</value>
</item>
</dictionary>
</pickle> </pickle>
</record> </record>
<record id="4" aka="AAAAAAAAAAQ="> <record id="4" aka="AAAAAAAAAAQ=">
<pickle> <pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/> <global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <tuple>
<item> <none/>
<key> <string>_log</string> </key> <list>
<value> <dictionary>
<list> <item>
<dictionary> <key> <string>action</string> </key>
<item> <value> <string>edit</string> </value>
<key> <string>action</string> </key> </item>
<value> <string>edit</string> </value> <item>
</item> <key> <string>actor</string> </key>
<item> <value> <string>zope</string> </value>
<key> <string>actor</string> </key> </item>
<value> <string>zope</string> </value> <item>
</item> <key> <string>comment</string> </key>
<item> <value>
<key> <string>comment</string> </key> <none/>
<value> </value>
<none/> </item>
</value> <item>
</item> <key> <string>error_message</string> </key>
<item> <value> <string></string> </value>
<key> <string>error_message</string> </key> </item>
<value> <string></string> </value> <item>
</item> <key> <string>serial</string> </key>
<item> <value> <string>966.58781.43824.3635</string> </value>
<key> <string>serial</string> </key> </item>
<value> <string>995.20349.59441.46318</string> </value> <item>
</item> <key> <string>state</string> </key>
<item> <value> <string>current</string> </value>
<key> <string>state</string> </key> </item>
<value> <string>current</string> </value> <item>
</item> <key> <string>time</string> </key>
<item> <value>
<key> <string>time</string> </key> <object>
<value> <klass>
<object> <global name="DateTime" module="DateTime.DateTime"/>
<klass> </klass>
<global name="DateTime" module="DateTime.DateTime"/> <tuple>
</klass> <none/>
<tuple> </tuple>
<none/> <state>
</tuple> <tuple>
<state> <float>1530120172.2</float>
<tuple> <string>UTC</string>
<float>1633624275.32</float> </tuple>
<string>UTC</string> </state>
</tuple> </object>
</state> </value>
</object> </item>
</value> </dictionary>
</item> </list>
</dictionary> <none/>
</list> </tuple>
</value>
</item>
</dictionary>
</pickle> </pickle>
</record> </record>
<record id="5" aka="AAAAAAAAAAU="> <record id="5" aka="AAAAAAAAAAU=">
<pickle> <pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/> <global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <tuple>
<item> <none/>
<key> <string>_log</string> </key> <list>
<value> <dictionary>
<list> <item>
<dictionary> <key> <string>action</string> </key>
<item> <value> <string>detect_converted_file</string> </value>
<key> <string>action</string> </key> </item>
<value> <string>detect_converted_file</string> </value> <item>
</item> <key> <string>actor</string> </key>
<item> <value> <string>zope</string> </value>
<key> <string>actor</string> </key> </item>
<value> <string>zope</string> </value> <item>
</item> <key> <string>comment</string> </key>
<item> <value> <string></string> </value>
<key> <string>comment</string> </key> </item>
<value> <string></string> </value> <item>
</item> <key> <string>error_message</string> </key>
<item> <value> <string></string> </value>
<key> <string>error_message</string> </key> </item>
<value> <string></string> </value> <item>
</item> <key> <string>external_processing_state</string> </key>
<item> <value> <string>converted</string> </value>
<key> <string>external_processing_state</string> </key> </item>
<value> <string>converted</string> </value> <item>
</item> <key> <string>serial</string> </key>
<item> <value> <string>0.0.0.0</string> </value>
<key> <string>serial</string> </key> </item>
<value> <string>0.0.0.0</string> </value> <item>
</item> <key> <string>time</string> </key>
<item> <value>
<key> <string>time</string> </key> <object>
<value> <klass>
<object> <global name="DateTime" module="DateTime.DateTime"/>
<klass> </klass>
<global name="DateTime" module="DateTime.DateTime"/> <tuple>
</klass> <none/>
<tuple> </tuple>
<none/> <state>
</tuple> <tuple>
<state> <float>1502472099.8</float>
<tuple> <string>UTC</string>
<float>1502472099.8</float> </tuple>
<string>UTC</string> </state>
</tuple> </object>
</state> </value>
</object> </item>
</value> </dictionary>
</item> </list>
</dictionary> <none/>
</list> </tuple>
</value>
</item>
</dictionary>
</pickle> </pickle>
</record> </record>
</ZopeData> </ZopeData>
/*globals window, rJS, Handlebars*/ /*globals console, window, rJS, RSVP, loopEventListener, i18n, Handlebars, $*/
/*jslint indent: 2, nomen: true, maxlen: 80*/ /*jslint indent: 2, nomen: true, maxlen: 80*/
(function (window, rJS, Handlebars) { (function (window, rJS, RSVP, Handlebars) {
"use strict"; "use strict";
var gadget_klass = rJS(window), var gadget_klass = rJS(window),
inline_status_source = gadget_klass.__template_element inline_status_source = gadget_klass.__template_element
...@@ -105,22 +105,39 @@ ...@@ -105,22 +105,39 @@
return gadget; return gadget;
} }
function getStatusLoop(gadget) {
return new RSVP.Queue()
.push(function () {
return gadget.jio_get(gadget.options.value.jio_key);
})
.push(function (result) {
return getStatus(gadget, result);
});
}
gadget_klass gadget_klass
.ready(function (gadget) {
gadget.props = {};
return gadget.getSetting("hateoas_url")
.push(function (url) {
gadget.props.hateoas_url = url;
});
})
.declareAcquiredMethod("jio_get", "jio_get") .declareAcquiredMethod("jio_get", "jio_get")
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("translateHtml", "translateHtml")
.declareMethod("getContent", function () { .declareMethod("getContent", function () {
return {}; return {};
}) })
.declareJob("getStatus", function (result) { .declareJob("getStatus", function (result) {
return getStatus(this, {news: result}); var gadget = this;
return getStatus(gadget, {news: result});
}) })
.onLoop(function () { .onLoop(function () {
var gadget = this; var gadget = this;
return gadget.jio_get(gadget.options.value.jio_key) return getStatusLoop(gadget);
.push(function (result) {
return getStatus(gadget, result);
});
}, 300000) }, 300000)
.declareMethod("render", function (options) { .declareMethod("render", function (options) {
...@@ -129,4 +146,4 @@ ...@@ -129,4 +146,4 @@
gadget.flag = options.value.jio_key; gadget.flag = options.value.jio_key;
return gadget.getStatus(options.value.result); return gadget.getStatus(options.value.result);
}); });
}(window, rJS, Handlebars)); }(window, rJS, RSVP, Handlebars));
\ No newline at end of file \ No newline at end of file
...@@ -189,183 +189,174 @@ ...@@ -189,183 +189,174 @@
</record> </record>
<record id="3" aka="AAAAAAAAAAM="> <record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/> <global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <tuple>
<item> <none/>
<key> <string>_log</string> </key> <list>
<value> <dictionary>
<list> <item>
<dictionary> <key> <string>action</string> </key>
<item> <value> <string>publish_alive</string> </value>
<key> <string>action</string> </key> </item>
<value> <string>publish_alive</string> </value> <item>
</item> <key> <string>actor</string> </key>
<item> <value> <string>zope</string> </value>
<key> <string>actor</string> </key> </item>
<value> <string>zope</string> </value> <item>
</item> <key> <string>comment</string> </key>
<item> <value> <string></string> </value>
<key> <string>comment</string> </key> </item>
<value> <string></string> </value> <item>
</item> <key> <string>error_message</string> </key>
<item> <value> <string></string> </value>
<key> <string>error_message</string> </key> </item>
<value> <string></string> </value> <item>
</item> <key> <string>time</string> </key>
<item> <value>
<key> <string>time</string> </key> <object>
<value> <klass>
<object> <global name="DateTime" module="DateTime.DateTime"/>
<klass> </klass>
<global name="DateTime" module="DateTime.DateTime"/> <tuple>
</klass> <none/>
<tuple> </tuple>
<none/> <state>
</tuple> <tuple>
<state> <float>1503589584.61</float>
<tuple> <string>UTC</string>
<float>1503589584.61</float> </tuple>
<string>UTC</string> </state>
</tuple> </object>
</state> </value>
</object> </item>
</value> <item>
</item> <key> <string>validation_state</string> </key>
<item> <value> <string>published_alive</string> </value>
<key> <string>validation_state</string> </key> </item>
<value> <string>published_alive</string> </value> </dictionary>
</item> </list>
</dictionary> <none/>
</list> </tuple>
</value>
</item>
</dictionary>
</pickle> </pickle>
</record> </record>
<record id="4" aka="AAAAAAAAAAQ="> <record id="4" aka="AAAAAAAAAAQ=">
<pickle> <pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/> <global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <tuple>
<item> <none/>
<key> <string>_log</string> </key> <list>
<value> <dictionary>
<list> <item>
<dictionary> <key> <string>action</string> </key>
<item> <value> <string>edit</string> </value>
<key> <string>action</string> </key> </item>
<value> <string>edit</string> </value> <item>
</item> <key> <string>actor</string> </key>
<item> <value> <string>zope</string> </value>
<key> <string>actor</string> </key> </item>
<value> <string>zope</string> </value> <item>
</item> <key> <string>comment</string> </key>
<item> <value>
<key> <string>comment</string> </key> <none/>
<value> </value>
<none/> </item>
</value> <item>
</item> <key> <string>error_message</string> </key>
<item> <value> <string></string> </value>
<key> <string>error_message</string> </key> </item>
<value> <string></string> </value> <item>
</item> <key> <string>serial</string> </key>
<item> <value> <string>978.25610.31873.42666</string> </value>
<key> <string>serial</string> </key> </item>
<value> <string>995.20344.18918.62105</string> </value> <item>
</item> <key> <string>state</string> </key>
<item> <value> <string>current</string> </value>
<key> <string>state</string> </key> </item>
<value> <string>current</string> </value> <item>
</item> <key> <string>time</string> </key>
<item> <value>
<key> <string>time</string> </key> <object>
<value> <klass>
<object> <global name="DateTime" module="DateTime.DateTime"/>
<klass> </klass>
<global name="DateTime" module="DateTime.DateTime"/> <tuple>
</klass> <none/>
<tuple> </tuple>
<none/> <state>
</tuple> <tuple>
<state> <float>1568302726.92</float>
<tuple> <string>UTC</string>
<float>1633623919.82</float> </tuple>
<string>UTC</string> </state>
</tuple> </object>
</state> </value>
</object> </item>
</value> </dictionary>
</item> </list>
</dictionary> <none/>
</list> </tuple>
</value>
</item>
</dictionary>
</pickle> </pickle>
</record> </record>
<record id="5" aka="AAAAAAAAAAU="> <record id="5" aka="AAAAAAAAAAU=">
<pickle> <pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/> <global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <tuple>
<item> <none/>
<key> <string>_log</string> </key> <list>
<value> <dictionary>
<list> <item>
<dictionary> <key> <string>action</string> </key>
<item> <value> <string>detect_converted_file</string> </value>
<key> <string>action</string> </key> </item>
<value> <string>detect_converted_file</string> </value> <item>
</item> <key> <string>actor</string> </key>
<item> <value> <string>zope</string> </value>
<key> <string>actor</string> </key> </item>
<value> <string>zope</string> </value> <item>
</item> <key> <string>comment</string> </key>
<item> <value> <string></string> </value>
<key> <string>comment</string> </key> </item>
<value> <string></string> </value> <item>
</item> <key> <string>error_message</string> </key>
<item> <value> <string></string> </value>
<key> <string>error_message</string> </key> </item>
<value> <string></string> </value> <item>
</item> <key> <string>external_processing_state</string> </key>
<item> <value> <string>converted</string> </value>
<key> <string>external_processing_state</string> </key> </item>
<value> <string>converted</string> </value> <item>
</item> <key> <string>serial</string> </key>
<item> <value> <string>0.0.0.0</string> </value>
<key> <string>serial</string> </key> </item>
<value> <string>0.0.0.0</string> </value> <item>
</item> <key> <string>time</string> </key>
<item> <value>
<key> <string>time</string> </key> <object>
<value> <klass>
<object> <global name="DateTime" module="DateTime.DateTime"/>
<klass> </klass>
<global name="DateTime" module="DateTime.DateTime"/> <tuple>
</klass> <none/>
<tuple> </tuple>
<none/> <state>
</tuple> <tuple>
<state> <float>1503589449.87</float>
<tuple> <string>UTC</string>
<float>1503589449.87</float> </tuple>
<string>UTC</string> </state>
</tuple> </object>
</state> </value>
</object> </item>
</value> </dictionary>
</item> </list>
</dictionary> <none/>
</list> </tuple>
</value>
</item>
</dictionary>
</pickle> </pickle>
</record> </record>
</ZopeData> </ZopeData>
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