dashboard.js rewrite