mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-24 19:30:06 +01:00
25 lines
524 B
Plaintext
25 lines
524 B
Plaintext
|
{% stripspace %}
|
||
|
|
||
|
{% import (
|
||
|
"github.com/VictoriaMetrics/VictoriaMetrics/lib/querytracer"
|
||
|
) %}
|
||
|
|
||
|
TenantsResponse generates response for /admin/tenants .
|
||
|
{% func TenantsResponse(tenants []string, qt *querytracer.Tracer) %}
|
||
|
{
|
||
|
"status":"success",
|
||
|
"data":[
|
||
|
{% for i, tenant := range tenants %}
|
||
|
{%q= tenant %}
|
||
|
{% if i+1 < len(tenants) %},{% endif %}
|
||
|
{% endfor %}
|
||
|
]
|
||
|
{% code
|
||
|
qt.Printf("generate response for %d tenants", len(tenants))
|
||
|
qt.Done()
|
||
|
%}
|
||
|
{%= dumpQueryTrace(qt) %}
|
||
|
}
|
||
|
{% endfunc %}
|
||
|
{% endstripspace %}
|