Commit fd3918c6 authored by Romain Courteaud's avatar Romain Courteaud

slapos_jio: jslint

parent 7cfa0b6e
......@@ -129,12 +129,15 @@
function getStatus(gadget, result) {
var i, status_class = 'ui-btn-no-data',
var status_class = 'ui-btn-no-data',
right_class = 'ui-btn-no-data',
main_status_div = gadget.element.querySelector(".main-status"),
monitor_url = '',
main_link_configuration_dict = {
"class": "ui-btn ui-btn-icon-left ui-icon-desktop"
},
sub_link_configuration_dict = {
"class": "ui-btn ui-btn-icon-left ui-icon-desktop"
};
if (result && result.monitor_url) {
......@@ -215,6 +218,19 @@
domsugar(main_link_configuration_dict.href ? "a" : "span",
main_link_configuration_dict)
]);
<<<<<<< HEAD
=======
domsugar(sub_status_div.querySelector('div'),
{
"class": "ui-bar ui-corner-all last-child " + right_class
}, [
domsugar("a", sub_link_configuration_dict)
]);
if (right_class === 'ui-btn-hide') {
// expand main button to use the space
main_status_div.className = "ui-block-a ui-block main-status";
}
>>>>>>> c588db144 (slapos_jio: jslint)
return gadget;
}
......@@ -229,7 +245,8 @@
.onLoop(function () {
console.log('status onloop');
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)
.push(function (result) {
console.log('status after get', result);
......@@ -267,7 +284,7 @@
if (!(options.hasOwnProperty('jio_key') &&
options.hasOwnProperty('result'))) {
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 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1010.24668.23554.60979</string> </value>
<value> <string>1010.24757.4921.60774</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -298,7 +298,7 @@
</tuple>
<state>
<tuple>
<float>1691745492.55</float>
<float>1691747841.61</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