fix layout for all front end, added domain&device layout