fix: trim parsed snmp oid rows
This commit is contained in:
@@ -290,10 +290,10 @@ const parseSnmpOidRows = (raw: string): SnmpOidRow[] => {
|
||||
throw new Error('SNMP OID 配置必须是 JSON 数组')
|
||||
}
|
||||
return parsed.map((item) => ({
|
||||
oid: String(item?.oid ?? ''),
|
||||
metric_name: String(item?.metric_name ?? ''),
|
||||
metric_unit: String(item?.metric_unit ?? ''),
|
||||
type: String(item?.type ?? ''),
|
||||
oid: String(item?.oid ?? '').trim(),
|
||||
metric_name: String(item?.metric_name ?? '').trim(),
|
||||
metric_unit: String(item?.metric_unit ?? '').trim(),
|
||||
type: String(item?.type ?? '').trim(),
|
||||
}))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user