Moving dashboardOptions to controller so that there is no duplicate code