Fix  && add test for json dashboard controller