opensearch-project / dashboards-flow-framework

A UI designer for constructing AI applications with OpenSearch
Apache License 2.0
9 stars 6 forks source link

Add guardrails to doc and query JSON inputs #231

Closed ohltyler closed 1 month ago

ohltyler commented 1 month ago

Description

Naturally, the JSON schema of both the sample documents and the query have downstream impact on the ingest and search pipelines, respectively. To help prevent accidental changes, and to make the user make a more explicit choice when editing such fields, this moves those inputs into modals. Users have a readonly view of the values, but must click on an explicit 'Edit' to change the values.

More specifics:

Demo video, showing the readonly views, and the flows for editing the doc and query fields (button texts and modal titles subject to change)

screen-capture (10).webm

Issues Resolved

Makes progress on #23

Check List

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

ohltyler commented 1 month ago

Seems some issue in core OSD causing the test failure. My older version of OSD is working. It is just a single test case:

 PASS  public/pages/workflows/workflows.test.tsx (37.268 s)
  Workflows
    ✓ renders the page (336 ms)

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        38.255 s
Ran all test suites.
✨  Done in 40.10s.
ohltyler commented 1 month ago

Seems some issue in core OSD causing the test failure. My older version of OSD is working. It is just a single test case:

 PASS  public/pages/workflows/workflows.test.tsx (37.268 s)
  Workflows
    ✓ renders the page (336 ms)

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        38.255 s
Ran all test suites.
✨  Done in 40.10s.

and same issue on #232 to confirm it's unrelated.