chore: bump @grafana/create-plugin configuration to 5.26.4 (#2082)
Bumps [`@grafana/create-plugin`](https://github.com/grafana/plugin-tools/tree/main/packages/create-plugin) configuration from 4.2.1 to 5.26.4. **Notes for reviewer:** This is an auto-generated PR which ran `@grafana/create-plugin update`. Please consult the create-plugin [CHANGELOG.md](https://github.com/grafana/plugin-tools/blob/main/packages/create-plugin/CHANGELOG.md) to understand what may have changed. Please review the changes thoroughly before merging. --------- Co-authored-by: grafana-plugins-platform-bot[bot] <144369747+grafana-plugins-platform-bot[bot]@users.noreply.github.com> Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
This commit is contained in:
committed by
GitHub
parent
e76741b453
commit
b13d567eee
@@ -142,7 +142,8 @@ func convertTrendToHistory(trend zabbix.Trend, valueType string) (zabbix.History
|
||||
}
|
||||
|
||||
func getTrendPointValue(point zabbix.TrendPoint, valueType string) (float64, error) {
|
||||
if valueType == "avg" || valueType == "min" || valueType == "max" || valueType == "count" {
|
||||
switch valueType {
|
||||
case "avg", "min", "max", "count":
|
||||
valueStr := point.ValueAvg
|
||||
switch valueType {
|
||||
case "min":
|
||||
@@ -158,7 +159,7 @@ func getTrendPointValue(point zabbix.TrendPoint, valueType string) (float64, err
|
||||
return 0, backend.DownstreamError(fmt.Errorf("error parsing trend value: %s", err))
|
||||
}
|
||||
return value, nil
|
||||
} else if valueType == "sum" {
|
||||
case "sum":
|
||||
avgStr := point.ValueAvg
|
||||
avg, err := strconv.ParseFloat(avgStr, 64)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user