mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-23 12:31:07 +01:00
api prometheus/api/v1/label/../values time not specified, (#3052)
modify default start values
This commit is contained in:
parent
7dc632719d
commit
50e2524bc2
@ -1072,12 +1072,13 @@ func getExportParams(r *http.Request, startTime time.Time) (*commonParams, error
|
|||||||
// - extra_filters[]
|
// - extra_filters[]
|
||||||
func getCommonParams(r *http.Request, startTime time.Time, requireNonEmptyMatch bool) (*commonParams, error) {
|
func getCommonParams(r *http.Request, startTime time.Time, requireNonEmptyMatch bool) (*commonParams, error) {
|
||||||
deadline := searchutils.GetDeadlineForQuery(r, startTime)
|
deadline := searchutils.GetDeadlineForQuery(r, startTime)
|
||||||
start, err := searchutils.GetTime(r, "start", 0)
|
ct := startTime.UnixNano() / 1e6
|
||||||
|
start, err := searchutils.GetTime(r, "start", ct-3*defaultStep)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
ct := startTime.UnixNano() / 1e6
|
|
||||||
end, err := searchutils.GetTime(r, "end", ct)
|
end, err := searchutils.GetTime(r, "end", ct)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user