cgi/html: Generate data field legends for service views
templates: Fix legend formatting in service views