Improved/tested hosts/resources view in dashboard

Improved queries on DB
Improved array view
Tested sorting/filtering on hosts/resources arrays