add macro and js to query mirror status

@tfoote Please review.