Fix tests

Fix  && add test for json dashboard controller

Fix date formatting issue
Replace app.path by path in templates