Closed kevin-kho closed 2 months ago
I've narrowed it down to the following code in useJsonata.ts
; it fails to retrieve the value if the query
is kebab-case
const value = jsonataWrapper(query).evaluate(
extras.scope || scope || extras.resource || resource,
{
...mapValues(dataSourceFetchers, dsf => dsf.value),
root: extras.resource || resource,
parent: parent,
embedResource: embedResource,
items: extras?.arrayItems || arrayItems,
item:
last(extras?.arrayItems) ||
last(arrayItems) ||
extras.resource ||
resource,
...extras,
},
);
The jsonataWrapper(query)
seems to split the key on -
thinking it's a path. I think Jsonata is taking the -
as an expression
Description
When rendering a CustomResource, if the spec has fields with kebab-case (example:
spec.redisConfiguration.notify-keyspace-events
). It will fail to render the values on Details page.The field renders fine for the Form page (both UI and YAML).
Expected result
Detail page renders the values for kebab-case fields
Actual result
Detail page fails to render the values for kebab-case fields
Steps to reproduce
Detail page fails to render the kebab-case fields
Form page renders it fine.
This is the CustomResource's YAML view
Troubleshooting
I dove into the busola code base and I think I narrowed it down to
ExtensibilityDetails.js
line 113 wherecustomComponents
is defined.