Commit a506499c authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Minor fixes for Instance Status Gadget

parent a995c7f6
...@@ -21,16 +21,16 @@ ...@@ -21,16 +21,16 @@
if (options.news.text.startsWith("#access")) { if (options.news.text.startsWith("#access")) {
return 'ui-btn-ok'; return 'ui-btn-ok';
} else { } else {
if (options.no_data) { if (options.news.no_data) {
return 'ui-btn-no-data'; return 'ui-btn-no-data';
} }
else if (options.is_slave) { else if (options.news.is_slave) {
return 'ui-btn-is-slave'; return 'ui-btn-is-slave';
} }
else if (options.is_stopped) { else if (options.news.is_stopped) {
return 'ui-btn-is-stopped'; return 'ui-btn-is-stopped';
} }
else if (options.is_destroyed) { else if (options.news.is_destroyed) {
return 'ui-btn-is-destroyed'; return 'ui-btn-is-destroyed';
} }
return 'ui-btn-error'; return 'ui-btn-error';
...@@ -46,19 +46,19 @@ ...@@ -46,19 +46,19 @@
monitor_url = 'https://monitor.app.officejs.com/#/?page=ojsm_dispatch&query=portal_type%3A%22Software%20Instance%22%20AND%20reference%3A%22' + result.reference + '%22'; monitor_url = 'https://monitor.app.officejs.com/#/?page=ojsm_dispatch&query=portal_type%3A%22Software%20Instance%22%20AND%20reference%3A%22' + result.reference + '%22';
status_class = checkInstanceStatus(result); status_class = checkInstanceStatus(result);
if (status_class === 'ui-btn-no-data') { if (status_class === 'ui-btn-is-slave') {
status_style = "color: transparent !important;";
}
else if (status_class === 'ui-btn-is-slave') {
status_class = 'ui-btn-no-data'; status_class = 'ui-btn-no-data';
status_style = "color: white !important;";
status_title = 'Slave'; status_title = 'Slave';
} }
else if (status_class === 'ui-btn-is-stopped') { else if (status_class === 'ui-btn-is-stopped') {
status_class = 'ui-btn-no-data'; status_class = 'ui-btn-no-data';
status_style = "color: white !important;";
status_title = 'Stopped'; status_title = 'Stopped';
} }
else if (status_class === 'ui-btn-is-destroyed') { else if (status_class === 'ui-btn-is-destroyed') {
status_class = 'ui-btn-no-data'; status_class = 'ui-btn-no-data';
status_style = "color: white !important;";
status_title = 'Destroyed'; status_title = 'Destroyed';
} }
......
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