[webui] move function to project helper

it's only used by maintenance_incidents page