VictoriaMetrics/app/vlselect/logsql/field_values_response.qtpl

18 lines
319 B
Plaintext
Raw Normal View History

2024-05-20 04:08:30 +02:00
{% stripspace %}
// FieldValuesResponse formats /select/logsql/field_values response
{% func FieldValuesResponse(values []string) %}
{
"values":[
{% if len(values) > 0 %}
{%q= values[0] %}
{% for _, v := range values[1:] %}
,{%q= v %}
{% endfor %}
{% endif %}
]
}
{% endfunc %}
{% endstripspace %}