mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
tsdb/elasticsearch: remove TimeInterval field from tsdb/elasticsearch client (#78264)
remove TimeInterval field from tsdb/elasticsearch client #78187 Co-authored-by: Sam <samucap@users.noreply.github.com>
This commit is contained in:
parent
6f0c5395ac
commit
0cf6b94fa2
@ -36,7 +36,6 @@ type DatasourceInfo struct {
|
|||||||
Database string
|
Database string
|
||||||
ConfiguredFields ConfiguredFields
|
ConfiguredFields ConfiguredFields
|
||||||
Interval string
|
Interval string
|
||||||
TimeInterval string
|
|
||||||
MaxConcurrentShardRequests int64
|
MaxConcurrentShardRequests int64
|
||||||
IncludeFrozen bool
|
IncludeFrozen bool
|
||||||
XPack bool
|
XPack bool
|
||||||
|
@ -120,11 +120,6 @@ func newInstanceSettings(httpClientProvider httpclient.Provider) datasource.Inst
|
|||||||
interval = ""
|
interval = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
timeInterval, ok := jsonData["timeInterval"].(string)
|
|
||||||
if !ok {
|
|
||||||
timeInterval = ""
|
|
||||||
}
|
|
||||||
|
|
||||||
index, ok := jsonData["index"].(string)
|
index, ok := jsonData["index"].(string)
|
||||||
if !ok {
|
if !ok {
|
||||||
index = ""
|
index = ""
|
||||||
@ -171,7 +166,6 @@ func newInstanceSettings(httpClientProvider httpclient.Provider) datasource.Inst
|
|||||||
MaxConcurrentShardRequests: int64(maxConcurrentShardRequests),
|
MaxConcurrentShardRequests: int64(maxConcurrentShardRequests),
|
||||||
ConfiguredFields: configuredFields,
|
ConfiguredFields: configuredFields,
|
||||||
Interval: interval,
|
Interval: interval,
|
||||||
TimeInterval: timeInterval,
|
|
||||||
IncludeFrozen: includeFrozen,
|
IncludeFrozen: includeFrozen,
|
||||||
XPack: xpack,
|
XPack: xpack,
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,6 @@ type datasourceInfo struct {
|
|||||||
TimeField any `json:"timeField"`
|
TimeField any `json:"timeField"`
|
||||||
MaxConcurrentShardRequests int64 `json:"maxConcurrentShardRequests"`
|
MaxConcurrentShardRequests int64 `json:"maxConcurrentShardRequests"`
|
||||||
Interval string `json:"interval"`
|
Interval string `json:"interval"`
|
||||||
TimeInterval string `json:"timeInterval"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestNewInstanceSettings(t *testing.T) {
|
func TestNewInstanceSettings(t *testing.T) {
|
||||||
@ -40,7 +39,6 @@ func TestNewInstanceSettings(t *testing.T) {
|
|||||||
dsInfo := datasourceInfo{
|
dsInfo := datasourceInfo{
|
||||||
MaxConcurrentShardRequests: 5,
|
MaxConcurrentShardRequests: 5,
|
||||||
Interval: "Daily",
|
Interval: "Daily",
|
||||||
TimeInterval: "TimeInterval",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
settingsJSON, err := json.Marshal(dsInfo)
|
settingsJSON, err := json.Marshal(dsInfo)
|
||||||
@ -59,7 +57,6 @@ func TestNewInstanceSettings(t *testing.T) {
|
|||||||
MaxConcurrentShardRequests: 5,
|
MaxConcurrentShardRequests: 5,
|
||||||
Interval: "Daily",
|
Interval: "Daily",
|
||||||
TimeField: "",
|
TimeField: "",
|
||||||
TimeInterval: "TimeInterval",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
settingsJSON, err := json.Marshal(dsInfo)
|
settingsJSON, err := json.Marshal(dsInfo)
|
||||||
|
@ -53,7 +53,6 @@ func newFlowTestDsInfo(body []byte, statusCode int, requestCallback func(req *ht
|
|||||||
Interval: "Daily",
|
Interval: "Daily",
|
||||||
Database: "[testdb-]YYYY.MM.DD",
|
Database: "[testdb-]YYYY.MM.DD",
|
||||||
ConfiguredFields: configuredFields,
|
ConfiguredFields: configuredFields,
|
||||||
TimeInterval: "1s",
|
|
||||||
URL: "http://localhost:9200",
|
URL: "http://localhost:9200",
|
||||||
HTTPClient: &client,
|
HTTPClient: &client,
|
||||||
MaxConcurrentShardRequests: 42,
|
MaxConcurrentShardRequests: 42,
|
||||||
|
Loading…
Reference in New Issue
Block a user