VictoriaMetrics
VictoriaMetrics copied to clipboard
vmui: add select of Tenant ID
Add select of Tenant ID to Settings
You can either enter a custom value or choose from a list of options.
The selected tenantID
value is saved in the URL params. Upon page load, the tenantID
value from the URL params is applied if it exists.
The default value is 0

Codecov Report
Base: 57.55% // Head: 57.57% // Increases project coverage by +0.01%
:tada:
Coverage data is based on head (
f291758
) compared to base (465a285
). Patch has no changes to coverable lines.
Additional details and impacted files
@@ Coverage Diff @@
## master #3673 +/- ##
==========================================
+ Coverage 57.55% 57.57% +0.01%
==========================================
Files 310 310
Lines 52158 52158
==========================================
+ Hits 30018 30028 +10
+ Misses 20251 20245 -6
+ Partials 1889 1885 -4
Impacted Files | Coverage Δ | |
---|---|---|
lib/fasttime/fasttime.go | 50.00% <0.00%> (-21.43%) |
:arrow_down: |
lib/mergeset/table.go | 63.76% <0.00%> (-0.09%) |
:arrow_down: |
lib/storage/storage.go | 71.26% <0.00%> (+0.11%) |
:arrow_up: |
lib/storage/partition.go | 61.76% <0.00%> (+0.26%) |
:arrow_up: |
app/vmselect/promql/aggr_incremental.go | 87.72% <0.00%> (+2.39%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
@Loori-R , is there a feature request linked to this pull request?
@valyala, there is no feature request
@Loori-R , could you update the following aspects of this feature?
- To move the tenantID selector to the top header of vmui.
- To show the tenantID selector only if the following conditions are met simulatenously:
- vmui is loaded from the url containing tenantID, e.g. from
/select/<tenantID>/[prometheus/]{vmui,graph}/
url . The url can differ ifvmui
is loaded via a proxy such as vmauth, which can use arbitrary different url. In this case the tenantID selector isn't needed. - vmui is able to successfully query the list of tenantIDs by requesting the
/admin/tenants?start=...&end=...
url on the selected time range according to https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#url-format . The/admin/tenants
url can be unavailable for querying ifvmselect
is hidden behind a proxy such as vmauth. - The returned list of tenantIDs contains more than a single entry. There is no sense in showing the selector if only a single tenantID is available.
- vmui is loaded from the url containing tenantID, e.g. from
- The tenantID selector should provide auto-completion support from the list of tenantIDs obtained from
/admin/tenants
- When user selects the tenantID, then the server url (aka datasource url) should be updated accordingly and all the information displayed on the currently opened page should be re-loaded from the updated server url. The selected tenantID should be stored in the page url, so the url could be copy-n-pasted to another browser window and display the same page for the selected tenant.
@valyala updated
@Loori-R , could you resolve merge conflicts?
resolved merge conflicts
@Loori-R , thanks for implementing this feature!
FYI, this pull request has been included in v1.87.0.