update template port->port_range
fix JS