Skip to content

Commit a486d9f

Browse files
authored
fix: json parsing (#4175)
1 parent 1ed51ba commit a486d9f

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/writeData/subscriptions/components/JsonParsingForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ const JsonParsingForm: FC<Props> = ({formContent, updateForm}) => {
150150
value={d}
151151
onClick={() => {
152152
setDataTypeM(d)
153-
formContent.jsonMeasurementKey.type = d
153+
formContent.jsonMeasurementKey.type = d.toLowerCase()
154154
}}
155155
selected={dataTypeM === d}
156156
testID={`measurement-json-parsing-type-${1}`}

src/writeData/subscriptions/components/JsonPathInput.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,12 @@ const JsonPathInput: FC<Props> = ({name, formContent, updateForm, itemNum}) => {
139139
onClick={() => {
140140
setDataType(d)
141141
tagType
142-
? (formContent.jsonTagKeys[itemNum].type = d)
143-
: (formContent.jsonFieldKeys[itemNum].type = d)
142+
? (formContent.jsonTagKeys[
143+
itemNum
144+
].type = d.toLowerCase())
145+
: (formContent.jsonFieldKeys[
146+
itemNum
147+
].type = d.toLowerCase())
144148
}}
145149
selected={dataType === d}
146150
testID={`${tagType}-json-parsing-type-${1}`}

src/writeData/subscriptions/context/subscription.create.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const DEFAULT_CONTEXT: SubscriptionCreateContextType = {
5858
},
5959
],
6060
jsonTimestamp: {
61-
name: '',
61+
name: 'timestamp',
6262
path: '',
6363
type: 'string',
6464
},

0 commit comments

Comments
 (0)