Wondering about your opinion on whether it's worth refactoring this switch (with its contents) to a reusable directive to avoid repetition and getting out of sync with the same code in `dashboards/show.html`? Not sure, and doesn't have to be in this PR, in any case.