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

[pull] main-for-docs from opensearch-project:main #23

Merged
merged 679 commits into from
Jun 29, 2024

Conversation

pull[bot]
Copy link

@pull pull bot commented Jan 26, 2023

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label Jan 26, 2023
LDrago27 and others added 29 commits March 11, 2024 10:02
…vel for plugins to use (#6108)

* export context as top level

Signed-off-by: Lu Yu <[email protected]>

* add changelog

Signed-off-by: Lu Yu <[email protected]>

---------

Signed-off-by: Lu Yu <[email protected]>
* Adds session token for aws connection

Signed-off-by: Bandini Bhopi <[email protected]>

* Adds changelog

Signed-off-by: Bandini Bhopi <[email protected]>

---------

Signed-off-by: Bandini Bhopi <[email protected]>
* Working Dev docs

Signed-off-by: Ashwin P Chandran <[email protected]>

Create CNAME

Delete CNAME

disable jekyll

Signed-off-by: Ashwin P Chandran <[email protected]>

change to relative path

Signed-off-by: Ashwin P Chandran <[email protected]>

add docs readme

Signed-off-by: Ashwin P Chandran <[email protected]>

Adds changelog

Signed-off-by: Ashwin P Chandran <[email protected]>

* removes unnecessary debugger

Signed-off-by: Ashwin P Chandran <[email protected]>

---------

Signed-off-by: Ashwin P Chandran <[email protected]>
…d auth types (#6109)

* [Token Exchange Unification] Test connextion router schema validation support for registered auth type

Signed-off-by: Xinrui Bai <[email protected]>

* Update changefile

Signed-off-by: Xinrui Bai <[email protected]>

* [UT] Add test cases for registered auth type, test connection failure case

Signed-off-by: Xinrui Bai <[email protected]>

* [UT] Update testing URL value to avoid linkchecker failure

Signed-off-by: Xinrui Bai <[email protected]>

* [UT] Update testing URL value to avoid linkchecker failure round2

Signed-off-by: Xinrui Bai <[email protected]>

* [UT] Update testing URL value to avoid linkchecker failure round 3

Signed-off-by: Xinrui Bai <[email protected]>

---------

Signed-off-by: Xinrui Bai <[email protected]>
* feat: add comment

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: update unit test

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: add CHANGELOG

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize comment

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize comment

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize code

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize code

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>
… allow filter data sources before rendering in navigation bar (#6113)

* expose filterfn in datasource menu component

Signed-off-by: Lu Yu <[email protected]>

* add changelog

Signed-off-by: Lu Yu <[email protected]>

---------

Signed-off-by: Lu Yu <[email protected]>
* feat: add fakenews.co to allowlist

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: only exclude a known file

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>
* Add workspacePluginSetup type

Signed-off-by: Hailong Cui <[email protected]>

* add fakenews.co to .lycheeexclude

Signed-off-by: Hailong Cui <[email protected]>

* [Workspace] Add a workspace client in workspace plugin (#6094)

* feat: add comment

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: update unit test

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: add CHANGELOG

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize comment

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize comment

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize code

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize code

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: Hailong Cui <[email protected]>

* Revert "add fakenews.co to .lycheeexclude"

This reverts commit 55f6344.

Signed-off-by: Hailong Cui <[email protected]>

* Add WorkspacePluginStart

Signed-off-by: Hailong Cui <[email protected]>

---------

Signed-off-by: Hailong Cui <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Co-authored-by: SuZhou-Joe <[email protected]>
…ce in read only mode (#6125)

* add component to show selected data source in read only mode

Signed-off-by: Lu Yu <[email protected]>

* add change log

Signed-off-by: Lu Yu <[email protected]>

* fix typo and remove unused fields

Signed-off-by: Lu Yu <[email protected]>

* fix snapshot

Signed-off-by: Lu Yu <[email protected]>

---------

Signed-off-by: Lu Yu <[email protected]>
* Move @kristenTian to emeritus maintainer

Signed-off-by: Flyingliuhub <[email protected]>

* update pull Id

Signed-off-by: Flyingliuhub <[email protected]>

---------

Signed-off-by: Flyingliuhub <[email protected]>
* [Workspace]Add workspace id in basePath (#212)

* feat: enable workspace id in basePath

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: add unit test

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: remove useless test object id

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: add unit test

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: add unit test

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: update snapshot

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: move formatUrlWithWorkspaceId to core/public/utils

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: remove useless variable

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: remove useless variable

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimization

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimization

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimization

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: move workspace/utils to core

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: move workspace/utils to core

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: update comment

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize code

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: update unit test

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimization

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: add space under license

Signed-off-by: SuZhou-Joe <[email protected]>

* fix: unit test

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: add CHANGELOG

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: add feature flag check

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: make the pr smaller

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize with a more strict check

Signed-off-by: SuZhou-Joe <[email protected]>

* fix: unit test error

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: remove useless code

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: add a unit test case

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: better merge

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: rename the workspaceBasePath to clientBasePath

Signed-off-by: SuZhou-Joe <[email protected]>

* fix: snapshot

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: rename withoutWorkspace to withoutClientBasePath

Signed-off-by: SuZhou-Joe <[email protected]>

* Revert "feat: add feature flag check"

This reverts commit 64b3645.

Signed-off-by: SuZhou-Joe <[email protected]>

* Revert "fix: unit test error"

This reverts commit 80bed72.

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize comment and test cases description

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize comment

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>
…t to better support registered auth types (#6122)

* [Token Exchange Unification] State update for createDataSource and editDataSource pages

Signed-off-by: Xinrui Bai <[email protected]>

* [Token Exchange Unification] rectify state for dataSource creation page and edit page

Signed-off-by: Xinrui Bai <[email protected]>

* [UT] Add more test cases for util functions

Signed-off-by: Xinrui Bai <[email protected]>

* [Token Exchange Unification] Update dataSource bottom banner control

Signed-off-by: Xinrui Bai <[email protected]>

* Update changefile.md

Signed-off-by: Xinrui Bai <[email protected]>

* Add comments

Signed-off-by: Xinrui Bai <[email protected]>

* Code review change, fix typo

Signed-off-by: Xinrui Bai <[email protected]>

* Resolve comments, update typo in test cases

Signed-off-by: Xinrui Bai <[email protected]>

---------

Signed-off-by: Xinrui Bai <[email protected]>
* feat: sidecar poc

Signed-off-by: tygao <[email protected]>

* update sidecar

Signed-off-by: tygao <[email protected]>

* update mouseevent

Signed-off-by: tygao <[email protected]>

* update type

Signed-off-by: tygao <[email protected]>

* update service mock

Signed-off-by: tygao <[email protected]>

* update sidecar config mode type

Signed-off-by: tygao <[email protected]>

* update docked mode enum

Signed-off-by: tygao <[email protected]>

* update resizable button style

Signed-off-by: tygao <[email protected]>

* doc: add changelog

Signed-off-by: tygao <[email protected]>

* test: update snapshots

Signed-off-by: tygao <[email protected]>

* fix typo

Signed-off-by: tygao <[email protected]>

* doc: update readme

Signed-off-by: tygao <[email protected]>

* test: add test for resizable button and service

Signed-off-by: tygao <[email protected]>

* test: add test for create react overlays and app container

Signed-off-by: tygao <[email protected]>

* test: add tests for service and components

Signed-off-by: tygao <[email protected]>

* test: update tests for resizable button

Signed-off-by: tygao <[email protected]>

* fix: update enum usage

Signed-off-by: tygao <[email protected]>

* update

Signed-off-by: tygao <[email protected]>

* fix wrong change

Signed-off-by: tygao <[email protected]>

* add prefix for resizableButton

Signed-off-by: tygao <[email protected]>

---------

Signed-off-by: tygao <[email protected]>
* fix data source filter

Signed-off-by: Lu Yu <[email protected]>

* add change log

Signed-off-by: Lu Yu <[email protected]>

---------

Signed-off-by: Lu Yu <[email protected]>
…rces. (#6135)

* Upgrade @opensearch/[email protected] which inherits AWSSigv4 to .child

Signed-off-by: Bandini Bhopi <[email protected]>

* Uses client.child for aws sigv4 connection

Signed-off-by: Bandini Bhopi <[email protected]>

* Import http-aws-es connector class

Signed-off-by: Bandini Bhopi <[email protected]>

* Refactor client caching mechanism

Signed-off-by: Bandini Bhopi <[email protected]>

* Fix UT

Signed-off-by: Bandini Bhopi <[email protected]>

* Added UT for client pool

Signed-off-by: Bandini Bhopi <[email protected]>

* Revert client pool changes from authentication method

Signed-off-by: Bandini Bhopi <[email protected]>

---------

Signed-off-by: Bandini Bhopi <[email protected]>
This pull request introduces a comprehensive update to the homepage, focusing on enhancing its layout, functionality, and configurability. Key changes include:

* Initial implementation and iterative improvements of the new homepage layout, including the addition of hero sections and various other sections for improved content organization and presentation.
* Introduction of lazy rendering and memoization to optimize performance and user experience.
* Refinements in section rendering, including inline rendering, to streamline the page's structure and interactivity.
* Removal of unused functions and components, alongside renaming functions for better clarity and alignment with their purpose.
* Significant enhancements in testing, ensuring robust functionality through the addition of various unit tests, including jest tests and tests for new observable-based features.
* Adjustments and updates following UX guidance, including changes to the footer, welcome screen, and other user interface elements to align with best practices and user expectations.
* Conversion of the homepage to use observables for dynamic content updates, and making the new homepage experience configurable, allowing for easy toggling between legacy and new layouts.
* Comprehensive cleanup and minor redesign efforts to refine the overall look and feel, alongside the removal of outdated comments and redundant code.
* Introduction of a new configuration option to enable/disable the new homepage, providing flexibility and control to users or administrators.
* Additional contributions include replacing a YAML config with an advanced setting and fixing the changelog for accurate documentation.


---------

Signed-off-by: Matt Provost <[email protected]>
Signed-off-by: abbyhu2000 <[email protected]>
Signed-off-by: Ashwin P Chandran <[email protected]>
Co-authored-by: Matt Provost <[email protected]>
Co-authored-by: Ashwin P Chandran <[email protected]>
…patible data sources or only show used data sources (#6129)

* add data source aggregated view to show all compatible data sources or only used data sources

Signed-off-by: Lu Yu <[email protected]>

* add change log

Signed-off-by: Lu Yu <[email protected]>

* address comments and add more tests

Signed-off-by: Lu Yu <[email protected]>

---------

Signed-off-by: Lu Yu <[email protected]>
Signed-off-by: Ashwin P Chandran <[email protected]>
…lugin (#6185)

* remove obsolete snapshots

Signed-off-by: Lu Yu <[email protected]>

* add change log

Signed-off-by: Lu Yu <[email protected]>

---------

Signed-off-by: Lu Yu <[email protected]>
Application config plugin allows external plugin to register a different storage other than the default OpenSearch. The external plugin may need some additional information about the request headers when handling the requests.

* Allow extra information in the application config calls

Signed-off-by: Tianle Huang <[email protected]>

* only expose headers

Signed-off-by: Tianle Huang <[email protected]>

* update jsdoc

Signed-off-by: Tianle Huang <[email protected]>

* add more logs

Signed-off-by: Tianle Huang <[email protected]>

* update change log

Signed-off-by: Tianle Huang <[email protected]>

* update readme

Signed-off-by: Tianle Huang <[email protected]>

* update readme

Signed-off-by: Tianle Huang <[email protected]>

---------

Signed-off-by: Tianle Huang <[email protected]>
* [Discover] options button in canvas to toggle legacy mode

Removes top nav bar link and provides a button option.

Issue:
n/a

Signed-off-by: Kawika Avilla <[email protected]>
* add version number to newly created datasource object

Signed-off-by: Zilong Xia <[email protected]>

* update attribute key from version to dataSourceVersion

Signed-off-by: Zilong Xia <[email protected]>

* add support and test coverage for custom auth type

Signed-off-by: Zilong Xia <[email protected]>

* fix ciGroup3 test case suite Create Datasource Wizard

Signed-off-by: Zilong Xia <[email protected]>

---------

Signed-off-by: Zilong Xia <[email protected]>
Signed-off-by: ZilongX <[email protected]>
* Add set default datasource

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

* Fix typo

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

* change on this.props.isDefault

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

* add unit test

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

* set data_source to false

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

* add more unit test

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

* fix lint error

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

* edit one more unit test

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

* Fix another typo

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

---------

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>
Co-authored-by: ZilongX <[email protected]>
zhyuanqi and others added 29 commits June 7, 2024 14:08
* add missing aria-label for discover page
* Update snapshot
* add localization and make it human-readable

---------

Signed-off-by: abbyhu2000 <[email protected]>
`[email protected]` removed all the code that used phin.

`load-bmfont`, a nested dependency of `jimp` imports `phin` but that is a functionality we don't use as we don't import AngleCode bitmap fonts. With an arbitrarily bump of `phin`, this commit avoids including an offending version in the dev-deps.

Signed-off-by: Miki <[email protected]>
* Add changelog for PR 6954

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

* Update changelogs/fragments/6954.yml

Co-authored-by: Miki <[email protected]>
Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>

---------

Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>
Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>
Co-authored-by: Miki <[email protected]>
* Add changelog

Signed-off-by: abbyhu2000 <[email protected]>

* add another changelog

Signed-off-by: abbyhu2000 <[email protected]>

---------

Signed-off-by: abbyhu2000 <[email protected]>
* Add Suchit to be a maintainer

Signed-off-by: abbyhu2000 <[email protected]>

* Changeset file for PR #6980 created/updated

* restore maintainer doc format

Signed-off-by: abbyhu2000 <[email protected]>

---------

Signed-off-by: abbyhu2000 <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>
* Optimize scrolling behavior of Discover table

This is an improvement to #6683

Signed-off-by: Miki <[email protected]>
* [Discover-next] query editor and UI settings toggle

Adds new query editor in replacement of query string input.

Utilizing:
```
data.enhancements.enabled: true
```

And enabling the Advanced Setting: `query:enhancements:enabled`

Also, cleans up the toggling since it is now two different components.

Related issue:
#6067

Signed-off-by: Kawika Avilla <[email protected]>

* Remove commented out code

Signed-off-by: Kawika Avilla <[email protected]>

---------

Signed-off-by: Kawika Avilla <[email protected]>
… to data source saved object (#7026)

* [Multiple Datasource][Version Decoupling] Add data source engine type to data source saved object

Signed-off-by: Zilong Xia <[email protected]>

* Changeset file for PR #7026 created/updated

---------

Signed-off-by: Zilong Xia <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
…duplicate col (#6983)

* check if the timestamp is already included to remove duplicate col

---------

Signed-off-by: Anan Zhuang <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
…e permission (#7054)

* [BUG][NewHomePage] Temp Solution to avoid crash for anonymous user with no write permission

Issue Resolve:
#6320

---------

Signed-off-by: Anan Zhuang <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
* Update error message in timeline visualization when MDS disabled

Signed-off-by: Zhongnan Su <[email protected]>

* Changeset file for PR #7069 created/updated

---------

Signed-off-by: Zhongnan Su <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
### Description

see #6894 

This PR picks #6894, #6895, #6933, #6972 to main. Additionally,
- separates extensions from query enhancements
- adds banner support
- partially revert #6972 as it's pending on the data source commit to main
- renames search bar extension to query editor extension

A query editor extension can display a UI component above the query editor and/or a banner above the language selector. The component has the ability to read and write discover search bar states to enhance the search experience for users. The configuration is part of UI Enhancements.

```ts
export interface QueryEditorExtensionDependencies {
  /**
   * Currently selected index patterns.
   */
  indexPatterns?: Array<IIndexPattern | string>;
  /**
   * Currently selected data source.
   */
  dataSource?: DataSource;
  /**
   * Currently selected query language.
   */
  language: string;
}

export interface QueryEditorExtensionConfig {
  /**
   * The id for the search bar extension.
   */
  id: string;
  /**
   * Lower order indicates higher position on UI.
   */
  order: number;
  /**
   * A function that determines if the search bar extension is enabled and should be rendered on UI.
   * @returns whether the extension is enabled.
   */
  isEnabled: (dependencies: QueryEditorExtensionDependencies) => Promise<boolean>;
  /**
   * A function that returns the search bar extension component. The component
   * will be displayed on top of the query editor in the search bar.
   * @param dependencies - The dependencies required for the extension.
   * @returns The component the search bar extension.
   */
  getComponent?: (dependencies: QueryEditorExtensionDependencies) => React.ReactElement | null;
  /**
   * A function that returns the search bar extension banner. The banner is a
   * component that will be displayed on top of the search bar.
   * @param dependencies - The dependencies required for the extension.
   * @returns The component the search bar extension.
   */
  getBanner?: (dependencies: QueryEditorExtensionDependencies) => React.ReactElement | null;
}

export interface UiEnhancements {
  query?: QueryEnhancement;
+ queryEditorExtension?: QueryEditorExtensionConfig;
}
```
Developers can utilize search bar extensions to add additional features to the search bar, such as query assist.

Issues resolved: #6077

A search bar extension can display a UI component above the query bar. The component has the ability to read and write discover search bar states to enhance the search experience for users. The configuration is part of Query Enhancements.

Signed-off-by: Joshua Li <[email protected]>
* remove angular related comment and code

Signed-off-by: abbyhu2000 <[email protected]>

* Changeset file for PR #7087 created/updated

---------

Signed-off-by: abbyhu2000 <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
When selecting a specific language, the data source selector disappears and relies completely on the
query editor when enhancements are enabled.

If toggled on and then off, everything is working properly.

#7046

Signed-off-by: Kawika Avilla <[email protected]>

---------

Signed-off-by: Kawika Avilla <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Parses user string between `::datasource::` to get the data source Then appends the dataSourceId in the meta.

Also creates the data frame before the interceptor to keep the meta info passed around.

If this gets accepted follow ups need to happen:
* should be ensuring the virtual index pattern includes the data source name with the index pattern name to avoid conflicts and a weird state.
* some reason dataframe is being always wiped out the first call in the search source. need to fix so that the schema is persisted
* weird initial load state. likely just too many things at once so we should make sure the usual and fresh experience is respected
* better indicator on the datasource, or just autocomplete that displays all the datasource connections when user types initial `::`.

Rebase of #7092 

Issue:
#6957

---------

Signed-off-by: Sean Li <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
* [Discover] Allow save query to load correctly in Discover

* add save query logic in Discover
* add save query logic in VisBuilder
* remove double render

Issue Resolve
#5942

---------

Signed-off-by: Anan Zhuang <[email protected]>
* Fix visualizations colors for more than 10 items
---------

Signed-off-by: Eva Millán <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Co-authored-by: Anan Zhuang <[email protected]>
Co-authored-by: Ashwin P Chandran <[email protected]>
…in Index Patterns Dashboards Plugin (#7100)

* [Multiple Datasource][Version Decoupling] Support Version Decoupling in Index Patterns Dashboards Plugin

Signed-off-by: Zilong Xia <[email protected]>

* Changeset file for PR #7100 created/updated

---------

Signed-off-by: Zilong Xia <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
#7077)

Follow up for #7034, this PR
- addresses #7034 (comment)
- addresses #7034 (comment)
- fixes render order
   - QueryEditorExtensions requires the container divs to be mounted first,
but in the previous implementation, extensions will be mounted first and
it relied on rerendering of queryEditorTopRow. Moving them into query
editor fixes the render order and ensures refs are set.

@AMoo-Miki I didn't use the object check `'[object Object]' !== Object.prototype.toString.call(configMap)`. I don't know what access user has, but if an attacker can arbitrarily alter `configMap`, the code will still break with something like
```tsx
        configMap={
          new Proxy(
            {},
            {
              ownKeys(target) {
                throw new Error('Accessing keys is not allowed.');
              },
            }
          )
        }
```

Given that our code creates the config map here, I think relying on static type check is enough, but feel free to comment if otherwise.
https://github.com/opensearch-project/OpenSearch-Dashboards/blob/7f0e39eb9809c95b98069cc971611edc2cbbc62b/src/plugins/data/public/ui/ui_service.ts#L31

Signed-off-by: Joshua Li <[email protected]>
@pull pull bot merged commit ba67043 into CPTNB:main-for-docs Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.