Throw 504 where necessary

This commit is contained in:
Dane Everitt
2018-03-06 22:17:01 -06:00
parent d3f797bf2a
commit 4964d294f6
3 changed files with 12 additions and 2 deletions

View File

@@ -80,8 +80,11 @@
}
}
}).fail(function (jqXHR) {
console.error(jqXHR);
element.find('[data-action="status"]').html('<span class="label label-default">Error</span>');
if (jqXHR.status === 504) {
element.find('[data-action="status"]').html('<span class="label label-default">Gateway Timeout</span>');
} else {
element.find('[data-action="status"]').html('<span class="label label-default">Error</span>');
}
});
}).promise().done(function () {
setTimeout(updateServerStatus, 10000);