HUE-1125 [pig] Reduce the amount of ajax calls to the dashboard service

Calls are now made just when there are running scripts