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

Fix JSON display in Topology view #6696

Open
anna-geller opened this issue Jan 9, 2025 · 1 comment
Open

Fix JSON display in Topology view #6696

anna-geller opened this issue Jan 9, 2025 · 1 comment
Labels
area/backend Needs backend code changes area/frontend Needs frontend code changes bug Something isn't working

Comments

@anna-geller
Copy link
Member

Describe the issue

Original user flow:

id: mta
namespace: io.connect
tasks:
  - id: mta-s-1
    type: io.kestra.plugin.ioconnect.Invoke
    description: MTA Step 1
    method: getNextLayout
    nextLayoutDef: '{"groupdef":[{"type": "group", "children": [{"type":"window", "appName": "Motor Edit Client"}]},{"type": "group", "children": [{"type":"window", "appName": "Home Edit Client"} ]}]}'
    previousStep: 1

The same JSON string is displayed in the topology with extra escaping slashes:

 "{\"groupdef\":[{\"type\": \"group\", \"children\": [{\"type\":\"window\", \"appName\": \"Motor Edit Client\"}]},{\"type\": \"group\", \"children\": [{\"type\":\"window\", \"appName\": \"Home Edit Client\"} ]}]}"

We should find a way to display the original string the same way in topology property box as in the code editor, this may need to change the property box to code editor box which could be hard unless the property is JSON instead of string

Environment

  • Kestra Version: develop
@anna-geller anna-geller added bug Something isn't working area/backend Needs backend code changes area/frontend Needs frontend code changes labels Jan 9, 2025
@github-project-automation github-project-automation bot moved this to Backlog in Issues Jan 9, 2025
@anna-geller
Copy link
Member Author

anna-geller commented Jan 9, 2025

EDIT: There is no JSON type for plugin properties, it would be an object and if so it would be written as yaml. the intention is to keep a raw JSON String for further processing so I'd say it's just a matter of comfort with the way we output the string in the yaml

User comment: this parameter is passed to the plugin for processing, it waits for an incoming call on an api which responds with this json, it essentially acts as a callback for the remote client acting as a stateful orchestrator.

Next steps

We can add a rule to check if the string contains any ", then we use single quotes on the outside when saving from topology - might be a quick win.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/backend Needs backend code changes area/frontend Needs frontend code changes bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

1 participant