1
0
Fork 0

Update placeholder for empty server

This commit is contained in:
Gregory Eremin 2015-01-26 20:40:55 +07:00
parent b03853d609
commit 188cc53f43
1 changed files with 4 additions and 2 deletions

View File

@ -128,7 +128,10 @@ function updateDashboard(queues) {
fatThreshold = 100, fatThreshold = 100,
hotThreshold = 1000; hotThreshold = 1000;
if (placeholder) { if (Object.keys(queues).length === 0) {
var td = placeholder.getElementsByTagName('td')[0];
td.innerHTML = 'Empty';
} else if (placeholder) {
queuesList.removeChild(placeholder); queuesList.removeChild(placeholder);
} }
@ -150,7 +153,6 @@ function updateDashboard(queues) {
queuesList.appendChild(tr); queuesList.appendChild(tr);
} }
var cols = tr.getElementsByTagName('td'), var cols = tr.getElementsByTagName('td'),
nameCol = cols[0], nameCol = cols[0],
messagesCol = cols[1], messagesCol = cols[1],