fix web ui latency
fix web ui latency in situations where cron shedule has been reduced resulting in more data being present in influxDB than expected
This commit is contained in:
@@ -194,6 +194,9 @@ func (sr *scrutinyRepository) generateSmartAttributesSubquery(wwn string, durati
|
|||||||
`|> filter(fn: (r) => r["_measurement"] == "smart" )`,
|
`|> filter(fn: (r) => r["_measurement"] == "smart" )`,
|
||||||
fmt.Sprintf(`|> filter(fn: (r) => r["device_wwn"] == "%s" )`, wwn),
|
fmt.Sprintf(`|> filter(fn: (r) => r["device_wwn"] == "%s" )`, wwn),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
partialQueryStr = append(partialQueryStr, `|> aggregateWindow(every: 1d, fn: last, createEmpty: false)`)
|
||||||
|
|
||||||
if selectEntries > 0 {
|
if selectEntries > 0 {
|
||||||
partialQueryStr = append(partialQueryStr, fmt.Sprintf(`|> tail(n: %d, offset: %d)`, selectEntries, selectEntriesOffset))
|
partialQueryStr = append(partialQueryStr, fmt.Sprintf(`|> tail(n: %d, offset: %d)`, selectEntries, selectEntriesOffset))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user