[IMP]planner: clean some js code and make 'prepare_backend_url' method in planner model to handle backend url.