[client][dashboard] Extract JavaScript code to dashboard_view.js
[client] Fix indent