opensearch-project / OpenSearch-Dashboards

📊 Open source visualization dashboards for OpenSearch.
https://opensearch.org/docs/latest/dashboards/index/
Apache License 2.0
1.65k stars 861 forks source link

[BUG] Scripted Field Editing Issue: White Space Appears After Saving in OpenSearch Dashboards #5750

Open ghost opened 7 months ago

ghost commented 7 months ago

Describe the bug

After adding a scripted field to an index pattern in OpenSearch Dashboards, the initial edit of the field works without issues. However, once the edit is saved and an attempt is made to edit the same scripted field again, the edit area displays only white space. Refreshing the page seems to resolve the issue temporarily.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Index Patterns' in OpenSearch Dashboards.
  2. Add a 'Scripted Field' to an existing index pattern.
  3. Save the 'Scripted Field' after editing.
  4. Attempt to edit the same 'Scripted Field' again.
  5. Observe that the edit area turns into white space, with no option to input or modify the script.

Expected behavior After adding a scripted field to an index pattern, any subsequent edits should display the existing script and allow for modifications. The edit area should consistently show the script editor interface rather than a blank white space.

OpenSearch Version 2.11.1 docker image

Dashboards Version 2.11.1 docker image Plugins

opensearch-alerting opensearch-anomaly-detection opensearch-asynchronous-search opensearch-cross-cluster-replication opensearch-custom-codecs opensearch-geospatial opensearch-index-management opensearch-job-scheduler opensearch-knn opensearch-ml opensearch-neural-search opensearch-notifications opensearch-notifications-core opensearch-observability opensearch-performance-analyzer opensearch-reports-scheduler opensearch-security opensearch-security-analytics opensearch-sql

Screenshots

image

Host/Environment (please complete the following information):

abbyhu2000 commented 6 months ago

@abbyhu2000 Reproduce the issue.

ghost commented 6 months ago

As far as I know, this still occurs.

abbyhu2000 commented 6 months ago

Was able to reproduce this issue. After we save an edited scripted field and immediately click edit again, the page will become empty:

Screenshot 2024-03-01 at 12 45 56 PM

However, if we access some other page after we save the edited scripted field, and then come back to edit again, the page can be rendered normally.

Should we target to fix this bug in 2.13? @ashwin-pc @wbeckler

ghost commented 6 months ago

@abbyhu2000 thank you for reproducing it