mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-01 14:47:38 +00:00
17 lines
319 B
Text
17 lines
319 B
Text
{% 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 %}
|