Skip to content

Commit

Permalink
add an alert to nav on server fail
Browse files Browse the repository at this point in the history
  • Loading branch information
Jrc356 committed Sep 2, 2020
1 parent 23b0d9c commit 74ba708
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions blastradius/server/static/js/blast-radius.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ blastradius = function (selector, svg_url, json_url, br_state) {
svg_nodes.push(node);
});
} else {
let div = document.createElement("div")
div.setAttribute("role", "alert")
div.classList = ["alert alert-danger"]
div.textContent = "A server exception has occurred. The graph is still usable but without all features enabled such as filtering content"
document.getElementsByClassName("navbar")[0].appendChild(div)

edges = []
}

Expand Down

0 comments on commit 74ba708

Please sign in to comment.