condition change buttons on resource page on presence of agent