[webui] move common code into mixins