Commit c588db14 authored by Romain Courteaud's avatar Romain Courteaud

slapos_jio: jslint

parent cef33f12
...@@ -200,20 +200,20 @@ ...@@ -200,20 +200,20 @@
function getStatus(gadget, result) { function getStatus(gadget, result) {
console.log('status getStatus', result); console.log('status getStatus', result);
var i, status_class = 'ui-btn-no-data', var status_class = 'ui-btn-no-data',
right_class = 'ui-btn-no-data', right_class = 'ui-btn-no-data',
main_status_div = gadget.element.querySelector(".main-status"), main_status_div = gadget.element.querySelector(".main-status"),
sub_status_div = gadget.element.querySelector(".sub-status"), sub_status_div = gadget.element.querySelector(".sub-status"),
monitor_url = '', monitor_url = '',
main_link_configuration_dict = { main_link_configuration_dict = {
class: "ui-btn ui-btn-icon-left ui-icon-desktop" "class": "ui-btn ui-btn-icon-left ui-icon-desktop"
}, },
sub_link_configuration_dict = { sub_link_configuration_dict = {
class: "ui-btn ui-btn-icon-left ui-icon-desktop" "class": "ui-btn ui-btn-icon-left ui-icon-desktop"
}; };
if (result && result.monitor_url) { if (result && result.monitor_url) {
monitor_url = result.monitor_url monitor_url = result.monitor_url;
} }
if (result && result.portal_type && result.portal_type === "Compute Node") { if (result && result.portal_type && result.portal_type === "Compute Node") {
...@@ -315,13 +315,13 @@ ...@@ -315,13 +315,13 @@
sub_link_configuration_dict.text = ' ' + sub_link_configuration_dict.text; sub_link_configuration_dict.text = ' ' + sub_link_configuration_dict.text;
domsugar(main_status_div.querySelector('div'), domsugar(main_status_div.querySelector('div'),
{ {
class: "ui-bar ui-corner-all first-child " + status_class "class": "ui-bar ui-corner-all first-child " + status_class
}, [ }, [
domsugar("a", main_link_configuration_dict) domsugar("a", main_link_configuration_dict)
]); ]);
domsugar(sub_status_div.querySelector('div'), domsugar(sub_status_div.querySelector('div'),
{ {
class: "ui-bar ui-corner-all last-child " + right_class "class": "ui-bar ui-corner-all last-child " + right_class
}, [ }, [
domsugar("a", sub_link_configuration_dict) domsugar("a", sub_link_configuration_dict)
]); ]);
...@@ -341,7 +341,8 @@ ...@@ -341,7 +341,8 @@
.onLoop(function () { .onLoop(function () {
console.log('status onloop'); console.log('status onloop');
var gadget = this; var gadget = this;
if (typeof gadget.state.jio_key === 'string' && gadget.state.jio_key !== '') { if (typeof gadget.state.jio_key === 'string' &&
gadget.state.jio_key !== '') {
return gadget.jio_get(gadget.state.jio_key) return gadget.jio_get(gadget.state.jio_key)
.push(function (result) { .push(function (result) {
console.log('status after get', result); console.log('status after get', result);
...@@ -369,7 +370,7 @@ ...@@ -369,7 +370,7 @@
if (!(options.hasOwnProperty('jio_key') && if (!(options.hasOwnProperty('jio_key') &&
options.hasOwnProperty('result'))) { options.hasOwnProperty('result'))) {
throw new Error( throw new Error(
'status gadget did not receive jio_key, portal_type and result values' 'status gadget did not receive jio_key, portal_type and result values'
); );
} }
......
...@@ -278,7 +278,7 @@ ...@@ -278,7 +278,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>1010.24668.23554.60979</string> </value> <value> <string>1010.24757.4921.60774</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -298,7 +298,7 @@ ...@@ -298,7 +298,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1691745492.55</float> <float>1691747841.61</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