admin-ui: Refactor html that is printed from js