Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update models.go #1494

Closed
wants to merge 1 commit into from
Closed

Update models.go #1494

wants to merge 1 commit into from

Conversation

flexboy
Copy link

@flexboy flexboy commented Aug 30, 2022

Error "json: invalid use of ,string struct tag, trying to unmarshal unquoted value into int64"
#1386

Error "json: invalid use of ,string struct tag, trying to unmarshal unquoted value into int64"
#1386
@@ -67,8 +67,8 @@ type ItemTag struct {
type Trend []TrendPoint

type TrendPoint struct {
ItemID string `json:"itemid,omitempty"`
Clock int64 `json:"clock,omitempty,string"`
ItemID int64 `json:"itemid,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pkg/datasource/response_handler.go:24:24: cannot use point.ItemID (type int64) as type string in map index
pkg/datasource/response_handler.go:25:15: cannot use point.ItemID (type int64) as type string in map index
pkg/datasource/response_handler.go:26:13: cannot use point.ItemID (type int64) as type string in map index
pkg/datasource/response_handler.go:28:27: cannot use point.ItemID (type int64) as type string in map index

But this is a good idea, I'll take a look closer.

Copy link
Author

@flexboy flexboy Sep 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pkg/datasource/response_handler.go:24,25,26

	pointItem := itemsMap[strconv.FormatInt(point.ItemID,10)]
	if seriesMap[strconv.FormatInt(point.ItemID,10)] == nil {
		seriesMap[strconv.FormatInt(point.ItemID,10)] = timeseries.NewTimeSeriesData()

pkg/datasource/response_handler.go:28

            pointSeries := seriesMap[strconv.FormatInt(point.ItemID,10)]

@alexanderzobnin
Copy link
Collaborator

Are you able to replicate the original bug?

@Elufimov
Copy link

I am not an author but I have an original bug with grafana 9.2.0 zabbix 6.2.0 and elasticsearch 7.13.2.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@flexboy flexboy closed this by deleting the head repository Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants