opensearch-project / OpenSearch-Dashboards

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

[BUG] DataSourceMenu prop hideLocalCluster has no effect #6747

Closed derek-ho closed 5 days ago

derek-ho commented 1 week ago

Describe the bug

The prop "hideLocalCluster" on DataSourceMenu has no effect. To replicate - set data_source.hideLocalCluster=true in dashboards config yml. Then, when rendering datasourcemenu, try to pass in hideLocalCluster = false. When it is rendered, it still hides the local cluster.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior When set false via prop, it should not hide local cluster. I think it should take precedence over the dashboards config setting. OpenSearch Version Please list the version of OpenSearch being used.

Dashboards Version Please list the version of OpenSearch Dashboards being used.

Plugins

Please list all plugins currently enabled.

Screenshots

If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

Additional context

Add any other context about the problem here.

BionIT commented 1 week ago

@derek-ho This config should be set by using yaml config instead of each plugin to set it https://github.com/opensearch-project/OpenSearch-Dashboards/issues/6336

derek-ho commented 1 week ago

@BionIT security dashboards plugin may need to disregard the yaml config since it needs to manage local cluster things as well, so can we change the prop to be able to take effect as well or override the yaml value?

BionIT commented 5 days ago

Synced offline, this prop is set via yaml config not be used by plugins, thus not a bug, will close next.