Commit 9c605b9c authored by StreatCodes's avatar StreatCodes
Browse files

If no dashboards display "no dashboards found" instead of spinning forever

parent 84a10485
......@@ -21,7 +21,12 @@ export async function getIcingaCheckState(checkId, checkType) {
export async function getAllDashboards() {
const res = await fetch('/dashboard')
return res.json();
const data = await res.json();
console.log(data);
if(data === null) {
return [];
}
return data;
}
export async function getDashboard(slug) {
......
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