[webui] initial porting to rails4