Refacotr html template for ip endpoint