Format a ProfilingQuery entry for a ProfilingRequest detail field

    Parameters
    ----------
    query_document : model.ProfilingQuery

def profiling_query_formatter(view, context, query_document, name):
    """Format a ProfilingQuery entry for a ProfilingRequest detail field

    Parameters
    ----------
    query_document : model.ProfilingQuery
    """
    return Markup(
        ''.join(
            [
                '<div class="pymongo-query row">',
                '<div class="col-md-1">',
                '<a href="{}">'.format(query_document.get_admin_url(_external=True)),
                mongo_command_name_formatter(
                    view, context, query_document, 'command_name'
                ),
                # '<span class="label {}">{}</span>'.format(
                #     command_name_map.get(query_document.command_name, 'label-default'),
                #     query_document.command_name,
                # ),
                '</div>',
                '<div class="col-md-10">',
                profiling_pure_query_formatter(
                    None, None, query_document, 'command', tag='pre'
                ),
                '</div>',
                '<div class="col-md-1">',
                '<small>{} ms</small>'.format(query_document.duration),
                '</a>',
                '</div>',
                '</div>',
            ]
        )
    )