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:
Sam 2023-11-16 05:57:21 -08:00 committed by GitHub
parent 6f0c5395ac
commit 0cf6b94fa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 0 additions and 11 deletions

View File

@ -36,7 +36,6 @@ type DatasourceInfo struct {
Database string
ConfiguredFields ConfiguredFields
Interval string
TimeInterval string
MaxConcurrentShardRequests int64
IncludeFrozen bool
XPack bool

View File

@ -120,11 +120,6 @@ func newInstanceSettings(httpClientProvider httpclient.Provider) datasource.Inst
interval = ""
}
timeInterval, ok := jsonData["timeInterval"].(string)
if !ok {
timeInterval = ""
}
index, ok := jsonData["index"].(string)
if !ok {
index = ""
@ -171,7 +166,6 @@ func newInstanceSettings(httpClientProvider httpclient.Provider) datasource.Inst
MaxConcurrentShardRequests: int64(maxConcurrentShardRequests),
ConfiguredFields: configuredFields,
Interval: interval,
TimeInterval: timeInterval,
IncludeFrozen: includeFrozen,
XPack: xpack,
}

View File

@ -15,7 +15,6 @@ type datasourceInfo struct {
TimeField any `json:"timeField"`
MaxConcurrentShardRequests int64 `json:"maxConcurrentShardRequests"`
Interval string `json:"interval"`
TimeInterval string `json:"timeInterval"`
}
func TestNewInstanceSettings(t *testing.T) {
@ -40,7 +39,6 @@ func TestNewInstanceSettings(t *testing.T) {
dsInfo := datasourceInfo{
MaxConcurrentShardRequests: 5,
Interval: "Daily",
TimeInterval: "TimeInterval",
}
settingsJSON, err := json.Marshal(dsInfo)
@ -59,7 +57,6 @@ func TestNewInstanceSettings(t *testing.T) {
MaxConcurrentShardRequests: 5,
Interval: "Daily",
TimeField: "",
TimeInterval: "TimeInterval",
}
settingsJSON, err := json.Marshal(dsInfo)

View File

@ -53,7 +53,6 @@ func newFlowTestDsInfo(body []byte, statusCode int, requestCallback func(req *ht
Interval: "Daily",
Database: "[testdb-]YYYY.MM.DD",
ConfiguredFields: configuredFields,
TimeInterval: "1s",
URL: "http://localhost:9200",
HTTPClient: &client,
MaxConcurrentShardRequests: 42,