base code for instances status view