Skip to content

Commit

Permalink
fix: struct data type handling
Browse files Browse the repository at this point in the history
  • Loading branch information
chejimmy committed Mar 26, 2024
1 parent bb305e2 commit 704aed2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkg/framer/fields/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,20 @@ func FieldTypeForPropertyValue(property *iotsitewise.DescribeAssetPropertyOutput
return data.FieldTypeInt64
case "STRING":
return data.FieldTypeString
case "STRUCT":
return data.FieldTypeString
default:
return data.FieldTypeFloat64
}
}

// Map values from ???:
// https://docs.microsoft.com/en-us/rest/api/monitor/metrics/list#unit
//
// https://docs.microsoft.com/en-us/rest/api/monitor/metrics/list#unit
//
// to
// https://github.com/grafana/grafana/blob/master/packages/grafana-data/src/valueFormats/categories.ts#L24
//
// https://github.com/grafana/grafana/blob/master/packages/grafana-data/src/valueFormats/categories.ts#L24
func ToGrafanaUnit(unit *string) string {
if unit == nil {
return ""
Expand Down

0 comments on commit 704aed2

Please sign in to comment.