mirror of
https://github.com/wazuh/wazuh-dashboard.git
synced 2025-12-10 00:31:06 -06:00
* set up state management and query workflow for explore Signed-off-by: Anan Zhuang <ananzh@amazon.com> * fix query logic to not dependent on tab id store raw data, not processed data Signed-off-by: Anan Zhuang <ananzh@amazon.com> * fix some type and style Signed-off-by: Joey Liu <jiyili@amazon.com> * break histogram and tab query Signed-off-by: Anan Zhuang <ananzh@amazon.com> * make banner show up in new experience for new state management (#9870) Signed-off-by: Justin Kim <jungkm@amazon.com> * Explore vis changes to work with new state management Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * [Explore] New Query Panel Layout Phase 1 (#9886) * add component flow Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * footer and dual setup Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * editor ui done Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * add vertical css Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * add language type Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * detction logic and onchange to editor Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * update lanugage type Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * enter logic integrate Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * add edit Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * footer ui Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * fix footer and edit Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * add query Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * add modal Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * add loading state Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * update kv without dataset fields check Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * dynamically update prompt editor with lang type and update natural lang detection logic Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * add actions element and error resdesign Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * recent query ui Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * fix recent query Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * update error and test cases for footer Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * refactor code ditor to shared Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * add test cases basic Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * update failed test case foe s Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update index.tsx Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Changeset file for PR #9794 created/updated * storybook Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * revert dataset type Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * fix naming convetions and props Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * add file copywrite Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update .eslintrc.js Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * disable bitwise off Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * fix css styling Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * update import file Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * add cpywirte and remove console Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * add edit and clear text Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * add new line Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update index.scss Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update index.scss Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update index.scss Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update index.scss Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update index.scss Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * update marign for vertival separator Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update run_query.tsx Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * update namespace Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * update css conevtions Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * update gradient for natural prompt Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * update font-family Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * update todo Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * fix any type Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * fix namespace issues Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * udpate error todo Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * namespcae and inline styling fix Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * update test case for resuable Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update index.scss Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update src/plugins/explore/public/components/query_panel/components/editor_stack/resuable_editor.tsx Co-authored-by: Miki <amoo_miki@yahoo.com> Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update index.scss Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update index.scss Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update index.test.ts Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update src/plugins/explore/public/components/query_panel/index.tsx Co-authored-by: Yulong Ruan <ruanyu1@gmail.com> Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update onQueryStringChange name Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update index.tsx Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Fix blocked scope issue with detect language type Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * update ppl check for line count update Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update index.tsx Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * fix prettier pblm in detectlang type Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update query_panel.test.tsx Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * revert lang type check from querychange Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * fix datetime overflow issue Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * fix datepicker responsivness Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update src/plugins/explore/public/components/query_panel/components/editor_stack/edit_toolbar.test.tsx Co-authored-by: Kawika Avilla <kavilla414@gmail.com> Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * fix toolbar naming Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update index.scss Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * fix EditToolbar name Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * update ecport edittolbar Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update index.scss Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update src/plugins/explore/public/components/query_panel/components/editor_stack/resuable_editor.tsx Co-authored-by: Miki <amoo_miki@yahoo.com> Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update src/plugins/explore/public/components/query_panel/components/footer/query_error.test.tsx Co-authored-by: Miki <amoo_miki@yahoo.com> Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update src/plugins/explore/public/components/query_panel/components/footer/query_error.test.tsx Co-authored-by: Miki <amoo_miki@yahoo.com> Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update src/plugins/explore/public/components/query_panel/components/footer/query_error.test.tsx Co-authored-by: Miki <amoo_miki@yahoo.com> Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update src/plugins/explore/public/components/query_panel/components/footer/query_error.test.tsx Co-authored-by: Miki <amoo_miki@yahoo.com> Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update src/plugins/explore/public/components/query_panel/components/editor_stack/edit_toolbar.test.tsx Co-authored-by: Miki <amoo_miki@yahoo.com> Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * edit tool test fix Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * update oui var in editor stack css Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * update detection logic and oui updated Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * update test case for detection Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update index.scss Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update index.scss Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * update localization and yarn lock Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update index.scss Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update index.scss Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update index.scss Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update edit_toolbar.test.tsx Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * remove line count Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * remove line count Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * set up state management and query workflow for explore Signed-off-by: Anan Zhuang <ananzh@amazon.com> * fix query logic to not dependent on tab id store raw data, not processed data Signed-off-by: Anan Zhuang <ananzh@amazon.com> * fix some type and style Signed-off-by: Joey Liu <jiyili@amazon.com> * break histogram and tab query Signed-off-by: Anan Zhuang <ananzh@amazon.com> * make banner show up in new experience for new state management (#9870) Signed-off-by: Justin Kim <jungkm@amazon.com> * Explore vis changes to work with new state management Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * Changeset file for PR #9886 created/updated * Update yarn.lock Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Delete changelogs/fragments/9794.yml Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> --------- Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> Signed-off-by: Anan Zhuang <ananzh@amazon.com> Signed-off-by: Joey Liu <jiyili@amazon.com> Signed-off-by: Justin Kim <jungkm@amazon.com> Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> Co-authored-by: Miki <amoo_miki@yahoo.com> Co-authored-by: Yulong Ruan <ruanyu1@gmail.com> Co-authored-by: Kawika Avilla <kavilla414@gmail.com> Co-authored-by: Anan Zhuang <ananzh@amazon.com> Co-authored-by: Joey Liu <jiyili@amazon.com> Co-authored-by: Justin Kim <jungkm@amazon.com> Co-authored-by: abbyhu2000 <abigailhu2000@gmail.com> * [Explore] add pie, scatter, heatmap, single metric auto visualization (#9874) --------- Signed-off-by: Qxisylolo <qianxisy@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [Explore] disable legend for line chart when it is 1 metric and 1 date (#9911) * Changeset file for PR #9911 created/updated --------- Signed-off-by: Qxisylolo <qianxisy@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * clean up top nav (#9907) * fix autocomplete service and update temp query_panel (#9906) Signed-off-by: Anan Zhuang <ananzh@amazon.com> * Consume tab registry service and related state in explore tabs (#9901) * Consume tab registry service and related state in explore tabs Signed-off-by: Joey Liu <jiyili@amazon.com> * Changeset file for PR #9901 created/updated * Address comment Signed-off-by: Joey Liu <jiyili@amazon.com> --------- Signed-off-by: Joey Liu <jiyili@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [Explore] Fix refresh by removing duplicate sync (#9919) Signed-off-by: Anan Zhuang <ananzh@amazon.com> * [Explore] Fix explore vis types (#9912) * improve discover visualization ts types Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * Changeset file for PR #9912 created/updated --------- Signed-off-by: Yulong Ruan <ruanyl@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [Explore] feat: add explore embeddable (#9908) * feat: init explore embeddable Signed-off-by: tygao <tygao@amazon.com> * Changeset file for PR #9869 created/updated * embeddable rename Signed-off-by: tygao <tygao@amazon.com> * code integration Signed-off-by: tygao <tygao@amazon.com> * code integration Signed-off-by: tygao <tygao@amazon.com> * remove unused file Signed-off-by: tygao <tygao@amazon.com> * refactor: update explore embeddable and remove legacy code - Renamed and updated license files - Removed unused and legacy embeddable components - Updated plugin forwarding - Added changeset file for PR #9908 Signed-off-by: tygao <tygao@amazon.com> --------- Signed-off-by: tygao <tygao@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [Explore] fix save explore button not working (#9925) * [Explore] Add back no results (#9921) Signed-off-by: Anan Zhuang <ananzh@amazon.com> * [Explore] fix histogram UI (#9932) * [Explore] fix histogram UI Signed-off-by: Joey Liu <jiyili@amazon.com> * Changeset file for PR #9932 created/updated * Address comment Signed-off-by: Joey Liu <jiyili@amazon.com> --------- Signed-off-by: Joey Liu <jiyili@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [Explore vis] Bar chart with vis controls (#9920) * bar chart with style panel Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * fix conflict Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * Changeset file for PR #9920 created/updated --------- Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [Explore] Fix: PPL queries requiring two clicks to work correctly (#9940) The executeQueries thunk was called before queryStringManager was synchronized with the new query, causing the search service to use stale query data on first execution. Implemented Redux middleware (createQuerySyncMiddleware) that automatically syncs Redux query state with the global queryStringManager whenever query actions are dispatched. Signed-off-by: Anan Zhuang <ananzh@amazon.com> * [Explore] Fix: Align Explore Plugin Date Picker Behavior with Discover (#9941) Signed-off-by: Anan Zhuang <ananzh@amazon.com> * [Explore] Support logs, traces, metrics flavor for explore plugin (#9902) * move app to logs page Signed-off-by: Joshua Li <joshuali925@gmail.com> * add traces flavor Signed-off-by: Joshua Li <joshuali925@gmail.com> * fix side nav Signed-off-by: Joshua Li <joshuali925@gmail.com> * add metrics flavor Signed-off-by: Joshua Li <joshuali925@gmail.com> * update unit tests Signed-off-by: Joshua Li <joshuali925@gmail.com> * Changeset file for PR #9902 created/updated * address comments Signed-off-by: Joshua Li <joshuali925@gmail.com> * fix tests Signed-off-by: Joshua Li <joshuali925@gmail.com> * fix tests Signed-off-by: Joshua Li <joshuali925@gmail.com> --------- Signed-off-by: Joshua Li <joshuali925@gmail.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * update new experience banner to persist the dismissed banner via localStorage (#9943) * add readmes (#9942) Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * [Explore] fix: types and clean up more (#9944) * [Explore] fix: types and clean up more Signed-off-by: Anan Zhuang <ananzh@amazon.com> * fix PR comment Signed-off-by: Anan Zhuang <ananzh@amazon.com> --------- Signed-off-by: Anan Zhuang <ananzh@amazon.com> * [Explore] Add Syntax highlighting for PPL (#9895) * Update webPack to include ANTLR as dependency Signed-off-by: Suchit Sahoo <suchsah@amazon.com> * Add PPL Worker Implementation Signed-off-by: Suchit Sahoo <suchsah@amazon.com> * Refactor ANTLR grammar into a separate Package Signed-off-by: Suchit Sahoo <suchsah@amazon.com> * Add test for ppl analyzer Signed-off-by: Suchit Sahoo <suchsah@amazon.com> * Fix AutoComplete in Query Panel Not triggerring Signed-off-by: Suchit Sahoo <suchsah@amazon.com> * Fix Unit Tests for PPL Analyzer Signed-off-by: Suchit Sahoo <suchsah@amazon.com> --------- Signed-off-by: Suchit Sahoo <suchsah@amazon.com> * [Patterns] Basic table UI + tests (#9933) * patterns tab and patterns table using unmod. query Signed-off-by: Paul Sebastian <paulstn@amazon.com> * add patterns table storybook Signed-off-by: Paul Sebastian <paulstn@amazon.com> * patterns table jest test Signed-off-by: Paul Sebastian <paulstn@amazon.com> * move mock logic into stubs and everything into utils Signed-off-by: Paul Sebastian <paulstn@amazon.com> * use emdash Signed-off-by: Paul Sebastian <paulstn@amazon.com> * use i18n Signed-off-by: Paul Sebastian <paulstn@amazon.com> * move valid finite numbers to util and test Signed-off-by: Paul Sebastian <paulstn@amazon.com> * patterns tab tests Signed-off-by: Paul Sebastian <paulstn@amazon.com> * patterns container test Signed-off-by: Paul Sebastian <paulstn@amazon.com> * Changeset file for PR #9933 created/updated --------- Signed-off-by: Paul Sebastian <paulstn@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [Explore] Fix: Preserve selected tab when query run, correctly update cacheKeys when query run (#9946) * [Explore] Fix: Preserve slected tab when query run, correctly update cacheKeys when query run Signed-off-by: Joey Liu <jiyili@amazon.com> * Changeset file for PR #9946 created/updated --------- Signed-off-by: Joey Liu <jiyili@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * Ruchi/query panel explore (#9947) * update datetimerange and states to run Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update date_time_selector.tsx Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * update callback name for dstetime Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * update prompt run fucntion to hide dual Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * fixes for nl and editor Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * fix autocomplete Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * fix overflow border issue Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * add comment for css check Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * remove fixed line comment Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * updat test cases Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * update quth latest query_Explore Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * remove console Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * fix lang type issue Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * fix underline border issue in prompt Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update opensearch_dashboards.yml Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update index.scss Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update index.scss Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> --------- Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Fix the Autocomplete for the New Query Panel (#9960) * Fix the Autocomplete for the New Query Panel Signed-off-by: Suchit Sahoo <suchsah@amazon.com> * Changeset file for PR #9960 created/updated --------- Signed-off-by: Suchit Sahoo <suchsah@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * show field state integrated (#9959) Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * fix: saving explore would not contain query (#9963) Signed-off-by: tygao <tygao@amazon.com> * fix focus issue (#9969) * fix focus issue Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update index.scss Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> --------- Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * [Explore Vis] Chart type switcher with adding other available bar chart type (#9961) * remove section titles Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * change panel style Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * add chart type switcher Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * update all chart types style panel Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * add available bar charts for time based data Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * Changeset file for PR #9961 created/updated * add unit tests Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> --------- Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * Remove FieldName Suggestion directly after a FieldName in Fieldlist (#9971) Signed-off-by: Suchit Sahoo <suchsah@amazon.com> * [Explore] Fix: Adjust panels layout (#9972) * [Explore] Fix: Adjust panels layout Signed-off-by: Joey Liu <jiyili@amazon.com> * Changeset file for PR #9972 created/updated --------- Signed-off-by: Joey Liu <jiyili@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [Explore Vis] Add area chart as available chart types (#9973) * add area charts and other available charts Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * style panel for area charts Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * Changeset file for PR #9973 created/updated --------- Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [Explore] feat: update mapping and support saving style options (#9964) * update mapping and support saving style options Signed-off-by: tygao <tygao@amazon.com> * feat: add chart type save Signed-off-by: tygao <tygao@amazon.com> * Changeset file for PR #9964 created/updated --------- Signed-off-by: tygao <tygao@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [Explore] Fix cypress tests (#9984) * fix cypress tests Signed-off-by: Justin Kim <jungkm@amazon.com> * undo cypress config changes Signed-off-by: Justin Kim <jungkm@amazon.com> --------- Signed-off-by: Justin Kim <jungkm@amazon.com> * Fix PPL/SQL interceptors to respect queries from request instead of queryStringManager (#9965) Signed-off-by: Anan Zhuang <ananzh@amazon.com> * add margin between the banners (#9986) Signed-off-by: Justin Kim <jungkm@amazon.com> * update title of explore pages (#9987) * update title of explore pages Signed-off-by: Justin Kim <jungkm@amazon.com> * update to use app id Signed-off-by: Justin Kim <jungkm@amazon.com> --------- Signed-off-by: Justin Kim <jungkm@amazon.com> * [Explore] Display discover vis in visualization list (#9977) * display saved explore to visualization list Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * update discover visualization name Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * display icon for different types of charts Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * update comment Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * update saved explore embeddable icon Signed-off-by: Yulong Ruan <ruanyl@amazon.com> --------- Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * [Explore] feat: support loading state from object (#9978) * feat: support load from saved object Signed-off-by: tygao <tygao@amazon.com> * Changeset file for PR #9978 created/updated * remove comments Signed-off-by: tygao <tygao@amazon.com> --------- Signed-off-by: tygao <tygao@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [Explore] Refactor: Improve Explore Plugin Result Access Patterns & Reduce Code Duplication (#9956) Some refactoring of the Explore plugin's query processing and result access patterns Signed-off-by: Anan Zhuang <ananzh@amazon.com> * [Explore] feat: update table action bar and field selector (#9985) * [Explore] feat: update query action bar and field selector Signed-off-by: Joey Liu <jiyili@amazon.com> * Changeset file for PR #9985 created/updated * [Explore] Fix: fix explore panel gap Signed-off-by: Joey Liu <jiyili@amazon.com> * Fix popover dismiss Signed-off-by: Joey Liu <jiyili@amazon.com> --------- Signed-off-by: Joey Liu <jiyili@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * minor type and prop changes (#9995) Signed-off-by: Justin Kim <jungkm@amazon.com> * Add Contextual FieldName suggestions (#9988) * Add Contextual AutoSuggestion for FieldName Signed-off-by: Suchit Sahoo <suchsah@amazon.com> * Add Tests for contextual FieldName suggestion Signed-off-by: Suchit Sahoo <suchsah@amazon.com> * Address PR Comments Signed-off-by: Suchit Sahoo <suchsah@amazon.com> --------- Signed-off-by: Suchit Sahoo <suchsah@amazon.com> * remove inspect from top nav (#9996) Signed-off-by: Justin Kim <jungkm@amazon.com> * remove all portal refs and consolidate style sheets on pages (#9998) Signed-off-by: Justin Kim <jungkm@amazon.com> * more top nav refactor (#9999) Signed-off-by: Justin Kim <jungkm@amazon.com> * [Explore] Add AI summary component in explore plugin (#10003) * Add AI summary component in explore plugin Signed-off-by: Owen Wang <owenwyk@amazon.com> * Add icon for explore results summary Signed-off-by: Owen Wang <owenwyk@amazon.com> * Add auto trigger for explore results summary Signed-off-by: Owen Wang <owenwyk@amazon.com> * Improve CSS styles of explore results summary Signed-off-by: Owen Wang <owenwyk@amazon.com> * Use dataStart instead of dataSetup Signed-off-by: Owen Wang <owenwyk@amazon.com> * Add test case for results_summary component Signed-off-by: Owen Wang <owenwyk@amazon.com> --------- Signed-off-by: Owen Wang <owenwyk@amazon.com> * Add chart type and fields selection (#9979) Signed-off-by: Owen Wang <owenwyk@amazon.com> * Fix Autocomplete Bugs (#10000) * Devalue Fields starting _ Signed-off-by: Suchit Sahoo <suchsah@amazon.com> * Close the Autocomplete Popover when using the cmnd+endter to run the query Signed-off-by: Suchit Sahoo <suchsah@amazon.com> * Fix Wrong Autocomplete Suggestion on changing Dataset Signed-off-by: Suchit Sahoo <suchsah@amazon.com> --------- Signed-off-by: Suchit Sahoo <suchsah@amazon.com> * fix new button and add unit tests for slices (#10002) * [Explore] feat: Add inspection button to action bar in tabs (#10001) * [Explore] feat: Add inspection button to action bar in tabs Signed-off-by: Joey Liu <jiyili@amazon.com> * Changeset file for PR #10001 created/updated * Add unit test Signed-off-by: Joey Liu <jiyili@amazon.com> * Remove useCacheKey hook Signed-off-by: Joey Liu <jiyili@amazon.com> --------- Signed-off-by: Joey Liu <jiyili@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [Explore] Support filters for Explore PPL visualizations (#9953) Signed-off-by: Joshua Li <joshuali925@gmail.com> Signed-off-by: Anan Zhuang <ananzh@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> Co-authored-by: Anan Zhuang <ananzh@amazon.com> * [Explore] add new create panel dropdown to dashboard (#10004) * add new create panel dropdown to dashboard Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * tweak ui actions order when `order` missing Signed-off-by: Yulong Ruan <ruanyl@amazon.com> --------- Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * [Explore]feat: add table for explore embeddable (#10005) * feat: add table for explore embeddable Signed-off-by: tygao <tygao@amazon.com> * add comments and remove unused import Signed-off-by: tygao <tygao@amazon.com> * remove assertion Signed-off-by: tygao <tygao@amazon.com> --------- Signed-off-by: tygao <tygao@amazon.com> * Remove metric selection when the field has multiple values (#10016) Signed-off-by: Owen Wang <owenwyk@amazon.com> * refactor: hook useCurrentExploreId to read explore id from url (#10006) Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * [Explore] Fix discover visualization related TS errors (#10019) * fixed discover visualization related TS errors Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * fix explore embeddable TS errors Signed-off-by: Yulong Ruan <ruanyl@amazon.com> --------- Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * Ruchi/recent query intg (#10012) * add recent query intg Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * fix recent query bug with query stale Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update opensearch_dashboards.yml Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> --------- Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * top nav refactor (#10007) Signed-off-by: Justin Kim <jungkm@amazon.com> * make old saved search findable in open top nav panel (#10025) Signed-off-by: Justin Kim <jungkm@amazon.com> * Ruchi/saved query (#10011) * saveduqery setup Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * update refresh func name Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * saved query submit works Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * save query load Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * saved query fixes done Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update saved_query_management_component.tsx Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Update opensearch_dashboards.yml Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> --------- Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * fix imports from query_panel (#10026) Signed-off-by: Justin Kim <jungkm@amazon.com> * [Explore] Refactor Explore Redux state and improve persistence performance (#10013) * Update style panel for line chart (#10031) * add legend to line chart Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * add line exclusive settings Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * add tooltip and threshold Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * fix styles Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * add axes style to line Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * fix bugs Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> --------- Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * Fix style panel update bug (#10033) * add grid Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * fix style update bug Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> --------- Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * fix visualizations loading forever after saving explore (#10022) + tweaks styles Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * [Explore] Add tab storage and fix nav save (#10035) * tiny fix for visualization Signed-off-by: tygao <tygao@amazon.com> * fix: fix top nav Signed-off-by: tygao <tygao@amazon.com> * remove extra searchSource creation Signed-off-by: tygao <tygao@amazon.com> * update view url Signed-off-by: tygao <tygao@amazon.com> * unify import Signed-off-by: tygao <tygao@amazon.com> --------- Signed-off-by: tygao <tygao@amazon.com> * Update bar chart style panel (#10034) * refactor bar style panel Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * adding paddings Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * fix bugs Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> --------- Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * [Explore]add visualization to dashboard from Vis tab (#9991) * refactor useSavedExplore hook (#10039) * fix datepicker locaiton in classic experience (#10032) * Update Area, Pie and Metric style panel UI (#10037) * area chart style panel updates Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * add metric style panel Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * update pie chart style panel Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> --------- Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> Co-authored-by: Anan Zhuang <ananzh@amazon.com> * fixed a race condition which cause heatmap not render properly (#10040) Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * update banner font (#10030) * update banner font Signed-off-by: Justin Kim <jungkm@amazon.com> * undo change in classic experience banner and make change in query assist banner instead Signed-off-by: Justin Kim <jungkm@amazon.com> --------- Signed-off-by: Justin Kim <jungkm@amazon.com> * remove flavor from UI Slice (#10027) * remove flavor from UI Slice Signed-off-by: Justin Kim <jungkm@amazon.com> * update types on redux persistence Signed-off-by: Justin Kim <jungkm@amazon.com> --------- Signed-off-by: Justin Kim <jungkm@amazon.com> * fix some styling (#10042) Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * [Explore] Refactor query management: Fix query history and remove duplicate actions (#10043) * Fixed query history management to properly add initial/default queries to recent queries * Added proper whitespace validation using trim() to prevent empty queries from polluting history * Removed duplicate setQuery action from query slice, keeping only setQueryState * Replaced all Query type imports from data plugin with QueryState type from explore plugin Signed-off-by: Anan Zhuang <ananzh@amazon.com> * [Explore] Add execute dispatch to histogram and quick select (#10024) * Add execute dispatch to histogram and quick select Signed-off-by: Sean Li <lnse@amazon.com> * Updating quick selection logic Signed-off-by: Sean Li <lnse@amazon.com> * Fix props for onClickRecentQuery Signed-off-by: Sean Li <lnse@amazon.com> --------- Signed-off-by: Sean Li <lnse@amazon.com> * [Explore] Update heatmap style panel UI (#10051) * temp Signed-off-by: Qxisylolo <qianxisy@amazon.com> * Changeset file for PR #10051 created/updated --------- Signed-off-by: Qxisylolo <qianxisy@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * tweaks visualization panel styles (#10053) Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * [Explore] Support saving select fields when the user manually generate a visualization (#10023) * rework 9957 (#10050) Signed-off-by: Justin Kim <jungkm@amazon.com> * [Explore] Update fields selector grouping (#10048) * [Explore] Update fields selector grouping Signed-off-by: Joey Liu <jiyili@amazon.com> * Changeset file for PR #10048 created/updated * update test Signed-off-by: Joey Liu <jiyili@amazon.com> * Simplify grouping code Signed-off-by: Joey Liu <jiyili@amazon.com> --------- Signed-off-by: Joey Liu <jiyili@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * Execute the query when loading from saved object (#10060) Signed-off-by: Owen Wang <owenwyk@amazon.com> * [Explore] Fix histogram processing for index patterns without time fields (#10063) Signed-off-by: Anan <ananzh@amazon.com> * [Explore] Allow switch dataset to update recent query (#10064) Signed-off-by: Anan Zhuang <ananzh@amazon.com> * [Explore] Fix saved queries (#10059) Signed-off-by: Anan Zhuang <ananzh@amazon.com> * [Explore] change name of add to dashboard modal (#10055) * change name Signed-off-by: Qxisylolo <qianxisy@amazon.com> * change label Signed-off-by: Qxisylolo <qianxisy@amazon.com> * Changeset file for PR #10055 created/updated --------- Signed-off-by: Qxisylolo <qianxisy@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [Explore] Update scatter style panel UI (#10062) * [Explore] Support loading tab from explore and add uiState storage (#10056) * add active tab storage Signed-off-by: tygao <tygao@amazon.com> * update save Signed-off-by: tygao <tygao@amazon.com> * add uiState mapping Signed-off-by: tygao <tygao@amazon.com> * add comments and update naming Signed-off-by: tygao <tygao@amazon.com> * update Signed-off-by: tygao <tygao@amazon.com> --------- Signed-off-by: tygao <tygao@amazon.com> * [Explore] refactor query editor architecture (#10066) * refactor query editor architecture Signed-off-by: Justin Kim <jungkm@amazon.com> * address comments and some initialization bugs Signed-off-by: Justin Kim <jungkm@amazon.com> --------- Signed-off-by: Justin Kim <jungkm@amazon.com> * handle state correctly when switching dataset (#10069) Signed-off-by: Justin Kim <jungkm@amazon.com> * [Explore] add to dashboard should create a new save explore (#10061) * save a new explore Signed-off-by: Qxisylolo <qianxisy@amazon.com> * Changeset file for PR #10061 created/updated * change name Signed-off-by: Qxisylolo <qianxisy@amazon.com> * change name,1 Signed-off-by: Qxisylolo <qianxisy@amazon.com> * change comment Signed-off-by: Qxisylolo <qianxisy@amazon.com> --------- Signed-off-by: Qxisylolo <qianxisy@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [Explore] Move chart component to explore component folder (#10072) * [Explore] Move chart component to explore component folder Signed-off-by: Joey Liu <jiyili@amazon.com> * Changeset file for PR #10072 created/updated --------- Signed-off-by: Joey Liu <jiyili@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [explore] Switch on click (#10070) * switch dual mode when clicking on the disabled one as well as some improvements on focus logic Signed-off-by: Justin Kim <jungkm@amazon.com> * add unit tests for onClickWrapper for bottom_editor and top_editor Signed-off-by: Justin Kim <jungkm@amazon.com> --------- Signed-off-by: Justin Kim <jungkm@amazon.com> * [Explore] Support PPL filters in Explore (#10045) Signed-off-by: Joshua Li <joshuali925@gmail.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * fix some broken unit tests (#10077) Signed-off-by: Justin Kim <jungkm@amazon.com> * cool ai mode (#10075) Signed-off-by: Justin Kim <jungkm@amazon.com> * [Explore] Replace custom query error handling with QueryResult component (#10080) Signed-off-by: Anan Zhuang <ananzh@amazon.com> * [Explore] Add axes selector on style panel (#10067) * Add axes selector on style panel Signed-off-by: Owen Wang <owenwyk@amazon.com> * Add axes selector support for pie chart Signed-off-by: Owen Wang <owenwyk@amazon.com> * Address comments Signed-off-by: Owen Wang <owenwyk@amazon.com> * Fix save to dashboard embeddables Signed-off-by: Owen Wang <owenwyk@amazon.com> * Rename to chart type selector Signed-off-by: Owen Wang <owenwyk@amazon.com> * Remove unused parameter Signed-off-by: Owen Wang <owenwyk@amazon.com> --------- Signed-off-by: Owen Wang <owenwyk@amazon.com> * fix saved explore cannot open from a dashboard (#10084) + fix build fail due to importing unused scss Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * [Explore] turn on grid in scatter (#10085) * turn on grid in scatter Signed-off-by: Qxisylolo <qianxisy@amazon.com> * Changeset file for PR #10085 created/updated --------- Signed-off-by: Qxisylolo <qianxisy@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [Explore] tweaks styles panel and use compressed style components (#10086) * tweaks styles panel and use compressed style components Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * added a space before add to dashboard button Signed-off-by: Yulong Ruan <ruanyl@amazon.com> --------- Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * [Explore] Add axes select support for other chat types (#10087) * [Explore] Fix and add unit tests for line/bar/area (#10090) * Fix recent query bug to allow run query update query history via middleware (#10091) Signed-off-by: Anan Zhuang <ananzh@amazon.com> * [Explore] make source = * optional, and default to showing empty (#10083) * make source = * optional, and default to showing empty Signed-off-by: Justin Kim <jungkm@amazon.com> * undo changes in data plugin Signed-off-by: Justin Kim <jungkm@amazon.com> --------- Signed-off-by: Justin Kim <jungkm@amazon.com> * [Explore] Update explore chart UI (#10092) * [Explore] Update explore chart UI Signed-off-by: Joey Liu <jiyili@amazon.com> * Changeset file for PR #10092 created/updated * Fix test Signed-off-by: Joey Liu <jiyili@amazon.com> --------- Signed-off-by: Joey Liu <jiyili@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * Bringing unknown fields to explore and fixing some typings (#10078) Signed-off-by: Sean Li <lnse@amazon.com> * Fix Extra Spaces being inserted with Aggregate Function In Autocomplete (#10093) * Fix the insertion of Aggregation Functions Signed-off-by: Suchit Sahoo <suchsah@amazon.com> * Changeset file for PR #10093 created/updated --------- Signed-off-by: Suchit Sahoo <suchsah@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * support key-value (#10094) * support key-value Signed-off-by: Justin Kim <jungkm@amazon.com> * remove console.log Signed-off-by: Justin Kim <jungkm@amazon.com> * remove misleading test Signed-off-by: Justin Kim <jungkm@amazon.com> --------- Signed-off-by: Justin Kim <jungkm@amazon.com> * [Explore] fix Viz tab scroll and resize behavior (#10096) * [Explore] fix Viz tab scroll and resize behaviour Signed-off-by: Joey Liu <jiyili@amazon.com> * Changeset file for PR #10096 created/updated --------- Signed-off-by: Joey Liu <jiyili@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * fix options for top_editor (#10097) Signed-off-by: Justin Kim <jungkm@amazon.com> * [Explore] fix monaco reference to old suggestionProvider (#10098) Signed-off-by: Joshua Li <joshuali925@gmail.com> * fix: only allow PPL to be filterable in explore and dashboards (#10076) Signed-off-by: Joshua Li <joshuali925@gmail.com> * Add Documentations for PPL Commands (#10095) * Add PPL Documentations Signed-off-by: Suchit Sahoo <suchsah@amazon.com> * Changeset file for PR #10095 created/updated --------- Signed-off-by: Suchit Sahoo <suchsah@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [Explore] add tests and storybook in style panel (#10089) * add tests and storybook in style panel Signed-off-by: Qxisylolo <qianxisy@amazon.com> * fix conflicts Signed-off-by: Qxisylolo <qianxisy@amazon.com> --------- Signed-off-by: Qxisylolo <qianxisy@amazon.com> * [Explore] Dashboard ingress update (#10073) * update to use context menu --------- Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * more editor and redux state refactor (#10100) Signed-off-by: Justin Kim <jungkm@amazon.com> * [Explore] Make log table columns to be controlled by query result (#10109) * [Explore] Make log table columns to be controlled by query result Signed-off-by: Joey Liu <jiyili@amazon.com> * Changeset file for PR #10109 created/updated --------- Signed-off-by: Joey Liu <jiyili@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * fix duplicated completion provider registration (#10108) Signed-off-by: Joshua Li <joshuali925@gmail.com> * Filter out Null Values in Suggestions (#10110) Signed-off-by: Suchit Sahoo <suchsah@amazon.com> * add unit tests for explore embeddables (#10102) * [Explore] support single-empty mode for filters (#10111) * trim filter PPL command for empty query Signed-off-by: Joshua Li <joshuali925@gmail.com> * add as PPL filter in single-empty mode Signed-off-by: Joshua Li <joshuali925@gmail.com> * perf: reduce dependency array small perf improvement from @angle943 Signed-off-by: Joshua Li <joshuali925@gmail.com> * fix UT Signed-off-by: Joshua Li <joshuali925@gmail.com> --------- Signed-off-by: Joshua Li <joshuali925@gmail.com> * [Explore] fix a issue that cause chart time range update unexpectedly (#10113) * [Explore] fix a issue that cuase chart time range text get updated unexpectedly Signed-off-by: Joey Liu <jiyili@amazon.com> * Changeset file for PR #10113 created/updated --------- Signed-off-by: Joey Liu <jiyili@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * save to query string manager with source (#10114) Signed-off-by: Justin Kim <jungkm@amazon.com> * [Explore] Fixing regex and adding command for triggering suggest (#10115) * Fixing regex and adding command for triggering suggest Signed-off-by: Sean Li <lnse@amazon.com> * Adding case for describe and fixing tests unit tests Signed-off-by: Sean Li <lnse@amazon.com> --------- Signed-off-by: Sean Li <lnse@amazon.com> * [Explore] Various UX tweaks for axes selector (#10119) * Fix metric can be render with impossible query Signed-off-by: Owen Wang <owenwyk@amazon.com> * Change axis name from color to 2nd y Signed-off-by: Owen Wang <owenwyk@amazon.com> * Move chart type selector out of accordion Signed-off-by: Owen Wang <owenwyk@amazon.com> * Change pie theta axis to size Signed-off-by: Owen Wang <owenwyk@amazon.com> * Rename metric field selection to value Signed-off-by: Owen Wang <owenwyk@amazon.com> * Add unit test for axes selector Signed-off-by: Owen Wang <owenwyk@amazon.com> --------- Signed-off-by: Owen Wang <owenwyk@amazon.com> * [Explore] fix axes-related UI, and add grid panel for scatter and heatmap (#10101) * fix axes Signed-off-by: Qxisylolo <qianxisy@amazon.com> * fix style order Signed-off-by: Qxisylolo <qianxisy@amazon.com> * Changeset file for PR #10101 created/updated * fix part of the tests Signed-off-by: Qxisylolo <qianxisy@amazon.com> --------- Signed-off-by: Qxisylolo <qianxisy@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [Explore] Fix axes select not get update when we click switch axes button and add unit tests (#10121) * Fix axes select not update when swtich axes Signed-off-by: Owen Wang <owenwyk@amazon.com> * Add unit tests Signed-off-by: Owen Wang <owenwyk@amazon.com> * Remove metric if cannot apply Signed-off-by: Owen Wang <owenwyk@amazon.com> --------- Signed-off-by: Owen Wang <owenwyk@amazon.com> * Add dataset select and service to explore (#10117) * [datasets] dataset select and service The dataset select component alongside the data view service. The original plan of dataset service came with conflicts with the existing dataset and the dataset interface in the query does not nicely confirm to index pattern. So data view acts as a direct fork of index pattern to avoid backwards compatibility issues for existing index patterns and to not break the query enhancements logic. This is the initial foundation. Will clean up unused and make it more unique to datasets Signed-off-by: Kawika Avilla <kavilla414@gmail.com> fix type issues Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Changeset file for PR #10014 created/updated Update plugin.ts fix tests Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * Increase timeout waiting for the exiting of an optimizer worker (#10020) * Increase timeout waiting for the exiting of an optimizer worker Notice it was showing the failed to timeout again so bumping it up like: https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3193 Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * Changeset file for PR #10020 created/updated --------- Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * Use dataset select Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * some more styling Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * no working Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * its working but its not clean Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * working but still messy Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * ensure default loads Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * ensure default loads Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * cleanup unneeded text Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * update to use right components Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * some styling Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * fix default dataset Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * update style of details Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * add default funcitonality Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * add available data Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * style footer in details and comment it out Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * styling Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * able to select data Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * able to seleect and update the selected dataset Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * update time field logic Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * delete cherry-picked funny business Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * clean up set dataset Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * update state conflict Signed-off-by: Kawika Avilla <kavilla414@gmail.com> --------- Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * Add Support for PPL functions (#10118) Signed-off-by: Suchit Sahoo <suchsah@amazon.com> * update footer styling (#10122) Signed-off-by: Justin Kim <jungkm@amazon.com> * Fix Antlr to Moncao Token Mappings (#10127) * Fix Antlr to Moncao Token Mappings Signed-off-by: Suchit Sahoo <suchsah@amazon.com> * Changeset file for PR #10127 created/updated --------- Signed-off-by: Suchit Sahoo <suchsah@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [Explore] Split page components into smaller container components (#10124) * [Explore] Split page components into smaller container components Signed-off-by: Joey Liu <jiyili@amazon.com> * Changeset file for PR #10124 created/updated --------- Signed-off-by: Joey Liu <jiyili@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * added table type visualization (#10131) * [Explore] fix linting errors (#10099) * fix linting errors Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * fix stories Signed-off-by: Yulong Ruan <ruanyl@amazon.com> --------- Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * [Explore] Query editor style update (#10128) * query editor style update Signed-off-by: Justin Kim <jungkm@amazon.com> * query editor style update Signed-off-by: Justin Kim <jungkm@amazon.com> --------- Signed-off-by: Justin Kim <jungkm@amazon.com> * [Explore] Add dynamic tab selection based on visualization compatibility (#10106) * [Explore] Add dynamic tab selection based on visualization compatibility Automatically switches to the visualization tab when query results support visualization, otherwise stays on logs tab. * Modified executeQueries() to always run visualization tab query for detection * Added detection logic in ExploreTabsComponent when activeTabId === '' * Changed initial activeTabId from 'logs' to '' to trigger auto-detection * Run button and initial load now auto-detect optimal tab Signed-off-by: Anan Zhuang <ananzh@amazon.com> * resolve merging conflict Signed-off-by: Anan Zhuang <ananzh@amazon.com> --------- Signed-off-by: Anan Zhuang <ananzh@amazon.com> * [Explore] Fixed all the lint and type errors in state_management (#10137) Signed-off-by: Anan Zhuang <ananzh@amazon.com> * [Explore] Add columns filter UI and update fields selector panel style (#10136) * [Explore] Add columns filter UI and update fields selector panel style Signed-off-by: Joey Liu <jiyili@amazon.com> * Changeset file for PR #10136 created/updated --------- Signed-off-by: Joey Liu <jiyili@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [Explore] Fix new (#10141) * fix new button Signed-off-by: Justin Kim <jungkm@amazon.com> * add unit test for reset_explore_state.test.ts Signed-off-by: Justin Kim <jungkm@amazon.com> --------- Signed-off-by: Justin Kim <jungkm@amazon.com> * [Explore] Fix some UT (#10145) Signed-off-by: Joey Liu <jiyili@amazon.com> * [Explore] Fix typescript error (#10146) Signed-off-by: Joey Liu <jiyili@amazon.com> * [Explore] Style panel UX changes (#10129) * Fix toast message i18n Signed-off-by: Owen Wang <owenwyk@amazon.com> * Hide style options if no fields are selected Signed-off-by: Owen Wang <owenwyk@amazon.com> * Hide accordion sepeartor for the last sub panel Signed-off-by: Owen Wang <owenwyk@amazon.com> * Update style options for legent, threshold and tooltip panel Signed-off-by: Owen Wang <owenwyk@amazon.com> * Update style panel UX for each chart type Signed-off-by: Owen Wang <owenwyk@amazon.com> * Add comments Signed-off-by: Owen Wang <owenwyk@amazon.com> --------- Signed-off-by: Owen Wang <owenwyk@amazon.com> * [Explore] Place the "Add to Dashboard" button to the right of the "Export" button (#10120) * finish tests Signed-off-by: Qxisylolo <qianxisy@amazon.com> * fix comments Signed-off-by: Qxisylolo <qianxisy@amazon.com> * clean Signed-off-by: Qxisylolo <qianxisy@amazon.com> * aliitle Signed-off-by: Qxisylolo <qianxisy@amazon.com> * new fix Signed-off-by: Qxisylolo <qianxisy@amazon.com> --------- Signed-off-by: Qxisylolo <qianxisy@amazon.com> * Add Bar Size Control Switch (#10152) * Add Bar Size Control Switch Signed-off-by: Luna Liu <lunalzm@amazon.com> * Changeset file for PR #10152 created/updated * Extract Bar Size Logic Signed-off-by: Luna Liu <lunalzm@amazon.com> --------- Signed-off-by: Luna Liu <lunalzm@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [explore] dataset select bug fixes and clean up (#10134) Cleans u some of the logic to extend index pattern and simplify some of the logic Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * Reorder Autocomplete Suggestions (#10154) Signed-off-by: Suchit Sahoo <suchsah@amazon.com> * fix ts-errors for legacy folder (#10147) Signed-off-by: Justin Kim <jungkm@amazon.com> * add loader for prompt to ppl (#10149) Signed-off-by: Justin Kim <jungkm@amazon.com> * [explore] reset store when unmounting app (#10142) Signed-off-by: Joshua Li <joshuali925@gmail.com> * [Explore] Fix a issue causing unnecessary saved object fetch and top nav loading icon flicker (#10158) * [Explore] Fix a issue causing unnecessary saved object fetch and top nav loading icon flicker flicker Signed-off-by: Joey Liu <jiyili@amazon.com> * Changeset file for PR #10158 created/updated --------- Signed-off-by: Joey Liu <jiyili@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * remove traces and metrics page in nav menu (#10143) Signed-off-by: Joshua Li <joshuali925@gmail.com> * fix result summary test (#10156) * Fix unit tests and add coverage for explore vis (#10159) * fix some unit test Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * fix bar, heatmap, metric, pie Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * add remaining tests Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> --------- Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * [Explore] Change fields selector default setting to show missing fields (#10140) * [Explore] Move add to dashboard button into action bar Signed-off-by: Joey Liu <jiyili@amazon.com> * Changeset file for PR #10140 created/updated * Fix test Signed-off-by: Joey Liu <jiyili@amazon.com> * Changeset file for PR #10140 created/updated --------- Signed-off-by: Joey Liu <jiyili@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [Explore] Add query abort handling for Query Assistant integration (#10160) Signed-off-by: Anan Zhuang <ananzh@amazon.com> * [Explore] properly reset store on app unmount (#10163) Signed-off-by: Joshua Li <joshuali925@gmail.com> * [Explore] Improve UT coverage in chart component (#10162) Signed-off-by: Joey Liu <jiyili@amazon.com> * add source to query (#10164) Signed-off-by: Justin Kim <jungkm@amazon.com> * make save query button always show up (#10165) Signed-off-by: Justin Kim <jungkm@amazon.com> * [Explore] Improve UT coverage for log table component (#10166) Signed-off-by: Joey Liu <jiyili@amazon.com> * [Explore] Add more unit tests for state management (#10172) Signed-off-by: Anan Zhuang <ananzh@amazon.com> * ts error and minor css change for query panel (#10170) Signed-off-by: Justin Kim <jungkm@amazon.com> * fix axes tests and ts errors (#10176) Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * [Explore] add test and fix error for embeddable and pie (#10179) * chore: add test and fix error for embeddable and pie Signed-off-by: tygao <tygao@amazon.com> * update comments Signed-off-by: tygao <tygao@amazon.com> --------- Signed-off-by: tygao <tygao@amazon.com> * [Explore] apply switch x and y to scatter heatmap and bar (#10177) * temp Signed-off-by: Qxisylolo <qianxisy@amazon.com> * fix comments Signed-off-by: Qxisylolo <qianxisy@amazon.com> * add tests Signed-off-by: Qxisylolo <qianxisy@amazon.com> --------- Signed-off-by: Qxisylolo <qianxisy@amazon.com> * Fix test error for visualization and metric chart type (#10181) * [Explore] add tests scatter, heatmap, style panel and bar (#10184) * add tests for heatmap scatter and style panel Signed-off-by: Qxisylolo <qianxisy@amazon.com> * fix axis style Signed-off-by: Qxisylolo <qianxisy@amazon.com> * revert Signed-off-by: Qxisylolo <qianxisy@amazon.com> * ts error Signed-off-by: Qxisylolo <qianxisy@amazon.com> * add tests for bar Signed-off-by: Qxisylolo <qianxisy@amazon.com> * add disable Signed-off-by: Qxisylolo <qianxisy@amazon.com> --------- Signed-off-by: Qxisylolo <qianxisy@amazon.com> * fix pie liine tests (#10185) * Fix ts error in data/public/antlr (#10173) * Fix ts error in data/public/antlr Signed-off-by: Suchit Sahoo <suchsah@amazon.com> * Changeset file for PR #10173 created/updated --------- Signed-off-by: Suchit Sahoo <suchsah@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * add more coverage for heatmap and scatter (#10186) Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * [Explore] Rewrite a clean query_actions.test.ts (#10187) Signed-off-by: Anan <ananzh@amazon.com> * Fix ts errors in explore public folder (#10178) Signed-off-by: Suchit Sahoo <suchsah@amazon.com> * [datasets] style improvements for dataset select (#10168) * [datasets] clean up styling on dataset select Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * remove clickable default mode Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * add data source navigation Signed-off-by: Kawika Avilla <kavilla414@gmail.com> --------- Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * [Explore] Improve UT coverage for topNav component (#10169) Signed-off-by: Joey Liu <jiyili@amazon.com> * [Explore] Move field selector component out of legacy folder (#10171) Signed-off-by: Joey Liu <jiyili@amazon.com> * fix doc view test (#10188) Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * [Explore] fix UT (#10192) Signed-off-by: Joey Liu <jiyili@amazon.com> * fix vis builder ts errors (#10191) Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * update error handling (#10193) Signed-off-by: Justin Kim <jungkm@amazon.com> * always change editor mode, don't put conditional about editor mode (#10194) Signed-off-by: Justin Kim <jungkm@amazon.com> * sparkle update color change (#10197) Signed-off-by: Justin Kim <jungkm@amazon.com> * fix ut for query_action (#10199) Signed-off-by: Justin Kim <jungkm@amazon.com> * Fix explore plugin query panel reset on page reload due to DatasetSelect initialization (#10198) Signed-off-by: Anan Zhuang <ananzh@amazon.com> * [Explore] Fix UT mock (#10195) Signed-off-by: Joey Liu <jiyili@amazon.com> * fix tests (#10200) * fix some bugs related to query mode (#10201) Signed-off-by: Justin Kim <jungkm@amazon.com> * fix remaining UT and typescript errors in explore (#10204) Signed-off-by: Justin Kim <jungkm@amazon.com> * [Explore] Merge main into query_explore (#10202) * Skip failing selenium test "should show Percentiles" (#9879) Signed-off-by: Justin Kim <jungkm@amazon.com> * [CVE-2024-4068] add package resolution for micromatch (#9846) * add package resolution for braces Signed-off-by: Justin Kim <jungkm@amazon.com> * Changeset file for PR #9846 created/updated * add package resolution for micromatch instead of braces Signed-off-by: Justin Kim <jungkm@amazon.com> * Changeset file for PR #9846 created/updated * add package resolution to @storybook/**/webpack and @storybook/**/micromatch Signed-off-by: Justin Kim <jungkm@amazon.com> * Changeset file for PR #9846 created/updated * Changeset file for PR #9846 created/updated --------- Signed-off-by: Justin Kim <jungkm@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * show update button on date change (#9875) * show update button on date change Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Changeset file for PR #9875 created/updated --------- Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [Discover] Adding Back Unknown Fields (#9856) * Adding back unknown fields Signed-off-by: Sean Li <lnse@amazon.com> * Changeset file for PR #9856 created/updated * Removing unnecessary subscription, adding changes to explore plugin Signed-off-by: Sean Li <lnse@amazon.com> * Removing changes to explore plugin, will create another PR Signed-off-by: Sean Li <lnse@amazon.com> --------- Signed-off-by: Sean Li <lnse@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * Implement polling for index state in Vended Dashboard progress (#9862) Signed-off-by: Simeon Widdis <sawiddis@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> Co-authored-by: Kawika Avilla <kavilla414@gmail.com> * making 3.1.0 release notes (#9892) * making 3.1 release notes Signed-off-by: Justin Kim <jungkm@amazon.com> * omit in release note Signed-off-by: Justin Kim <jungkm@amazon.com> --------- Signed-off-by: Justin Kim <jungkm@amazon.com> * ignore release_notes directory for casing check (#9897) Signed-off-by: Justin Kim <jungkm@amazon.com> * Fix CVE 2025-5889 (#9903) * Fix CVE 2025-5889 Signed-off-by: Justin Kim <jungkm@amazon.com> * Changeset file for PR #9903 created/updated --------- Signed-off-by: Justin Kim <jungkm@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * update 3.1 release-notes to include #9903 (#9910) Signed-off-by: Justin Kim <jungkm@amazon.com> * [UI setting] feat: keep backward compatibility for UI setting client. (#9854) * feat: keep backward compatibility for scope Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * Changeset file for PR #9854 created/updated * feat: update warning messages Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: update logic to keep backward compatibility Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: UT failure Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: optimize code Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: bootstrap Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: boostrap Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: bootstrap error Signed-off-by: SuZhou-Joe <suzhou@amazon.com> --------- Signed-off-by: SuZhou-Joe <suzhou@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [Bugfix] Make UI setting client more robust when the setting key does not exist (#9927) * feat: add settings Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * Changeset file for PR #9927 created/updated * fix: bootstrap Signed-off-by: SuZhou-Joe <suzhou@amazon.com> --------- Signed-off-by: SuZhou-Joe <suzhou@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * docs: add guidelines on testing and development (#9922) Signed-off-by: Joshua Li <joshuali925@gmail.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * Use `// @ts-expect-error` instead of ts_error_baseline (#9931) Signed-off-by: Joshua Li <joshuali925@gmail.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * Add Shenoy Pratik (`@ps48`) as a maintainer (#9976) * Add Shenoy Pratik (@ps48) as a maintainer Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * Changeset file for PR #9976 created/updated --------- Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * Increase timeout waiting for the exiting of an optimizer worker (#10020) * Increase timeout waiting for the exiting of an optimizer worker Notice it was showing the failed to timeout again so bumping it up like: https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3193 Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * Changeset file for PR #10020 created/updated --------- Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * feat(docs): ensure `.md` files are git tracked when generating sidebar (#9891) Signed-off-by: Joshua Li <joshuali925@gmail.com> Co-authored-by: Justin Kim <jungkm@amazon.com> * [Banner Plugin] Working static banner with no overlapping (#9989) * [Banner Plugin] Add static banner with mount point and feature flag Signed-off-by: Sid Wang <sidwang@amazon.com> * Changeset file for PR #9989 created/updated --------- Signed-off-by: Sid Wang <sidwang@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * fix popover not close if double click (#9993) * fix popover not close if double click Signed-off-by: Zhenxing Shen <zxshen@amazon.com> * Changeset file for PR #9993 created/updated --------- Signed-off-by: Zhenxing Shen <zxshen@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * Add auto-version increment workflow (#10112) Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com> * [Navigation] Support icon in left navigation (#10021) * feat: enable icon Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: unify icon usage Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * Changeset file for PR #10021 created/updated * feat: update icon Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: bootstrap error Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: workspace unit test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: update snapshot Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: update snapshot Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: unit test Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: update icons Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add icon to overview page Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: update Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: optimize icon with tooltip Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: auto collapse left nav when route change Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: lint error Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add test coverage Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * fix: flaky from data source page Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * Revert "fix: flaky from data source page" This reverts commit 3c0d0ce67fabd0cccb9ef5bbd511081db0269403. Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: increase coverage Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: test coverage Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: refactor styling Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: style Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: optimize state Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: update Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: update Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: update Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: add video to debug Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: update Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * Revert "feat: add video to debug" This reverts commit 621b6881e6b990bdb0dae528a3bfa905e3bdbf5b. Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * Revert "Revert "feat: add video to debug"" This reverts commit 500d0f5e056a50dca640bb8d9b3df3b3e3a0f8e7. Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: reduce flakiness of shared_links.spec.js Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: reduce flakiness of shared_links.spec.js Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * Revert "Revert "Revert "feat: add video to debug""" This reverts commit 63ef8101515d3e69b5d5ce758c6723803ded4d29. Signed-off-by: SuZhou-Joe <suzhou@amazon.com> --------- Signed-off-by: SuZhou-Joe <suzhou@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> --------- Signed-off-by: Justin Kim <jungkm@amazon.com> Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> Signed-off-by: Sean Li <lnse@amazon.com> Signed-off-by: Simeon Widdis <sawiddis@amazon.com> Signed-off-by: SuZhou-Joe <suzhou@amazon.com> Signed-off-by: Joshua Li <joshuali925@gmail.com> Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Signed-off-by: Sid Wang <sidwang@amazon.com> Signed-off-by: Zhenxing Shen <zxshen@amazon.com> Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com> Co-authored-by: Justin Kim <jungkm@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> Co-authored-by: Ruchi Sharma <ruchi492@gmail.com> Co-authored-by: Simeon Widdis <sawiddis@amazon.com> Co-authored-by: Kawika Avilla <kavilla414@gmail.com> Co-authored-by: SuZhou-Joe <suzhou@amazon.com> Co-authored-by: Joshua Li <joshuali925@gmail.com> Co-authored-by: Sid Wang <sidwang@amazon.com> Co-authored-by: zxshen <zxshen@amazon.com> Co-authored-by: Sayali Gaikawad <gaiksaya@amazon.com> * update tests (#10206) Signed-off-by: Qxisylolo <qianxisy@amazon.com> * add query to editor when loading a saved explore (#10209) Signed-off-by: tygao <tygao@amazon.com> * fix vis not auto generated if switching from table (#10182) Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * update save search name (#10211) Signed-off-by: Qxisylolo <qianxisy@amazon.com> * [Explore] Fix Tooltip Display Names for Multiple Chart Types (#10208) * Fix Tooltip Display Names for Multiple Chart Types Signed-off-by: Luna Liu <lunalzm@amazon.com> * Changeset file for PR #10208 created/updated --------- Signed-off-by: Luna Liu <lunalzm@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [Explore] Prevent saved explore state persistence when navigating back to workspace (#10213) Signed-off-by: Anan Zhuang <ananzh@amazon.com> * [Explore] Fixed a few visualization issues (#10207) * fixed query execution error when switching to vusualize tab with empty query input Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * Add support for PPL field types Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * move PPL_FIELD_TYPES to data plugin Signed-off-by: Yulong Ruan <ruanyl@amazon.com> --------- Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * fix ts errors (#10217) Signed-off-by: Justin Kim <jungkm@amazon.com> * [Explore] Some clean up (#10216) Signed-off-by: Anan Zhuang <ananzh@amazon.com> * [Explore] Fixing Cypress integration tests (#10116) * Updating tests to work with new Explore plugin Signed-off-by: Sean Li <lnse@amazon.com> * Temporarily changing FTR branch to main Signed-off-by: Sean Li <lnse@amazon.com> * Fixing simple dataset selector tests and rebasing Signed-off-by: Sean Li <lnse@amazon.com> * Fixing autocomplete_query test Signed-off-by: Sean Li <lnse@amazon.com> * Fixing fixing dataset selector test Signed-off-by: Sean Li <lnse@amazon.com> * Fixing language specific display test Signed-off-by: Sean Li <lnse@amazon.com> * Fixing tests post dataset changes Signed-off-by: Sean Li <lnse@amazon.com> * Adding waits after page reloads in saved queries test Signed-off-by: Sean Li <lnse@amazon.com> * Skipping indexes test for shared links Signed-off-by: Sean Li <lnse@amazon.com> --------- Signed-off-by: Sean Li <lnse@amazon.com> * Changing Cypress workflow back to point towards main Signed-off-by: Sean Li <lnse@amazon.com> * Regenerating grammar changes Signed-off-by: Sean Li <lnse@amazon.com> * Revert "[Explore] Some clean up (#10216)" (#10220) This reverts commit f03044685f1cb37b213ab0fad05624bc01f1cbea. * Fixing mock for data_view.test.ts and updating yarn.lock to match main Signed-off-by: Sean Li <lnse@amazon.com> * Temporarily disabling saved_search_in_dashboards.spec.js until it is updated Signed-off-by: Sean Li <lnse@amazon.com> * Fixing unit tests and increasing wait on saved queries integ test Signed-off-by: Sean Li <lnse@amazon.com> * Fix more lint errors Signed-off-by: Anan Zhuang <ananzh@amazon.com> * Ignoring require in test file Signed-off-by: Sean Li <lnse@amazon.com> * Fixing duplicate i18n ID Signed-off-by: Sean Li <lnse@amazon.com> * fix tooltip i18n (#14) * fixed an regression issue that dashboard query not applied (#15) Signed-off-by: Yulong Ruan <ruanyl@amazon.com> * single query editor (#16) Signed-off-by: Justin Kim <jungkm@amazon.com> * fix doc view test (#10188) Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> * Skip autocomplete UI test to have a fast follow up for new query autocomplete experience Signed-off-by: Sean Li <lnse@amazon.com> --------- Signed-off-by: Anan Zhuang <ananzh@amazon.com> Signed-off-by: Joey Liu <jiyili@amazon.com> Signed-off-by: Justin Kim <jungkm@amazon.com> Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> Signed-off-by: Ruchi Sharma <ruchi492@gmail.com> Signed-off-by: Qxisylolo <qianxisy@amazon.com> Signed-off-by: Yulong Ruan <ruanyl@amazon.com> Signed-off-by: tygao <tygao@amazon.com> Signed-off-by: Joshua Li <joshuali925@gmail.com> Signed-off-by: Suchit Sahoo <suchsah@amazon.com> Signed-off-by: Paul Sebastian <paulstn@amazon.com> Signed-off-by: Owen Wang <owenwyk@amazon.com> Signed-off-by: Sean Li <lnse@amazon.com> Signed-off-by: Anan <ananzh@amazon.com> Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Signed-off-by: Luna Liu <lunalzm@amazon.com> Signed-off-by: Simeon Widdis <sawiddis@amazon.com> Signed-off-by: SuZhou-Joe <suzhou@amazon.com> Signed-off-by: Sid Wang <sidwang@amazon.com> Signed-off-by: Zhenxing Shen <zxshen@amazon.com> Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com> Co-authored-by: Anan Zhuang <ananzh@amazon.com> Co-authored-by: Joey Liu <jiyili@amazon.com> Co-authored-by: Justin Kim <jungkm@amazon.com> Co-authored-by: abbyhu2000 <abigailhu2000@gmail.com> Co-authored-by: Ruchi Sharma <ruchi492@gmail.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> Co-authored-by: Miki <amoo_miki@yahoo.com> Co-authored-by: Yulong Ruan <ruanyu1@gmail.com> Co-authored-by: Kawika Avilla <kavilla414@gmail.com> Co-authored-by: Qxisylolo <qianxisy@amazon.com> Co-authored-by: Joey Liu <55552896+Maosaic@users.noreply.github.com> Co-authored-by: Yulong Ruan <ruanyl@amazon.com> Co-authored-by: Tianyu Gao <tygao@amazon.com> Co-authored-by: Joshua Li <joshuali925@gmail.com> Co-authored-by: Suchit Sahoo <38322563+LDrago27@users.noreply.github.com> Co-authored-by: Paul Sebastian <paulstn@amazon.com> Co-authored-by: Owen Wang <owenwyk@amazon.com> Co-authored-by: lunalzm <lunalzm@amazon.com> Co-authored-by: Simeon Widdis <sawiddis@amazon.com> Co-authored-by: SuZhou-Joe <suzhou@amazon.com> Co-authored-by: Sid Wang <sidwang@amazon.com> Co-authored-by: zxshen <zxshen@amazon.com> Co-authored-by: Sayali Gaikawad <gaiksaya@amazon.com>
527 lines
14 KiB
Markdown
527 lines
14 KiB
Markdown
# Testing Strategy for Explore Plugin Redux Implementation
|
|
|
|
This document outlines the testing strategy for the Redux implementation in the Explore plugin. It covers unit testing, integration testing, and end-to-end testing approaches.
|
|
|
|
## Testing Levels
|
|
|
|
### 1. Unit Tests
|
|
|
|
Unit tests focus on testing individual components in isolation. For our Redux implementation, we'll test:
|
|
|
|
#### Reducers
|
|
|
|
Test each reducer function to ensure it correctly updates state based on actions:
|
|
|
|
```typescript
|
|
// ui_slice.test.ts
|
|
import { uiReducer, setActiveTab, setLoading } from './ui_slice';
|
|
|
|
describe('UI Reducer', () => {
|
|
it('should handle initial state', () => {
|
|
expect(uiReducer(undefined, { type: 'unknown' })).toEqual({
|
|
activeTabId: 'logs',
|
|
flavor: 'log',
|
|
isLoading: false,
|
|
error: null,
|
|
queryPanel: {
|
|
promptQuery: '',
|
|
},
|
|
});
|
|
});
|
|
|
|
it('should handle setActiveTab', () => {
|
|
const actual = uiReducer(
|
|
{ activeTabId: 'logs', flavor: 'log', isLoading: false, error: null, queryPanel: { promptQuery: '' } },
|
|
setActiveTab('metrics')
|
|
);
|
|
expect(actual.activeTabId).toEqual('metrics');
|
|
});
|
|
|
|
it('should handle setLoading', () => {
|
|
const actual = uiReducer(
|
|
{ activeTabId: 'logs', flavor: 'log', isLoading: false, error: null, queryPanel: { promptQuery: '' } },
|
|
setLoading(true)
|
|
);
|
|
expect(actual.isLoading).toEqual(true);
|
|
});
|
|
});
|
|
```
|
|
|
|
#### Action Creators
|
|
|
|
Test synchronous action creators to ensure they return the correct action objects:
|
|
|
|
```typescript
|
|
// query_actions.test.ts
|
|
import { setQuery, setQueryString, setLanguage } from './query_slice';
|
|
|
|
describe('Query Actions', () => {
|
|
it('should create an action to set query', () => {
|
|
const query = { query: 'test', language: 'lucene' };
|
|
const expectedAction = {
|
|
type: 'query/setQuery',
|
|
payload: query,
|
|
};
|
|
expect(setQuery(query)).toEqual(expectedAction);
|
|
});
|
|
|
|
it('should create an action to set query string', () => {
|
|
const queryString = 'test query';
|
|
const expectedAction = {
|
|
type: 'query/setQueryString',
|
|
payload: queryString,
|
|
};
|
|
expect(setQueryString(queryString)).toEqual(expectedAction);
|
|
});
|
|
});
|
|
```
|
|
|
|
#### Thunks
|
|
|
|
Test thunks using mock store and mock services:
|
|
|
|
```typescript
|
|
// query_actions.test.ts
|
|
import configureMockStore from 'redux-mock-store';
|
|
import thunk from 'redux-thunk';
|
|
import { executeTabQuery } from './query_actions';
|
|
import { setLoading, setError } from './ui_slice';
|
|
import { setResults } from './results_slice';
|
|
|
|
const middlewares = [thunk];
|
|
const mockStore = configureMockStore(middlewares);
|
|
|
|
describe('Query Thunks', () => {
|
|
let store;
|
|
let mockSearchSource;
|
|
let mockServices;
|
|
|
|
beforeEach(() => {
|
|
mockSearchSource = {
|
|
setField: jest.fn().mockReturnThis(),
|
|
fetch: jest.fn().mockResolvedValue({ hits: { hits: [] } }),
|
|
};
|
|
|
|
mockServices = {
|
|
data: {
|
|
search: {
|
|
searchSource: {
|
|
create: jest.fn().mockResolvedValue(mockSearchSource),
|
|
},
|
|
},
|
|
query: {
|
|
timefilter: {
|
|
timefilter: {
|
|
getTime: jest.fn().mockReturnValue({ from: 'now-15m', to: 'now' }),
|
|
createFilter: jest.fn().mockReturnValue(null),
|
|
},
|
|
},
|
|
},
|
|
},
|
|
indexPattern: { fields: [] },
|
|
};
|
|
|
|
store = mockStore({
|
|
query: { query: { query: 'test', language: 'lucene' } },
|
|
ui: { activeTabId: 'logs' },
|
|
services: mockServices,
|
|
results: {},
|
|
});
|
|
});
|
|
|
|
it('should execute a tab query and update results', async () => {
|
|
await store.dispatch(executeTabQuery());
|
|
|
|
const actions = store.getActions();
|
|
expect(actions[0]).toEqual(setLoading(true));
|
|
expect(actions[1].type).toEqual('results/setResults');
|
|
expect(actions[2]).toEqual(setLoading(false));
|
|
|
|
expect(mockSearchSource.setField).toHaveBeenCalledWith('query', {
|
|
query: 'test',
|
|
language: 'lucene',
|
|
});
|
|
expect(mockSearchSource.fetch).toHaveBeenCalled();
|
|
});
|
|
|
|
it('should handle errors during query execution', async () => {
|
|
const error = new Error('Query failed');
|
|
mockSearchSource.fetch.mockRejectedValue(error);
|
|
|
|
try {
|
|
await store.dispatch(executeTabQuery());
|
|
} catch (e) {
|
|
// Expected to throw
|
|
}
|
|
|
|
const actions = store.getActions();
|
|
expect(actions[0]).toEqual(setLoading(true));
|
|
expect(actions[1]).toEqual(setError(error));
|
|
expect(actions[2]).toEqual(setLoading(false));
|
|
});
|
|
});
|
|
```
|
|
|
|
#### Selectors
|
|
|
|
Test selectors to ensure they extract the correct data from state:
|
|
|
|
```typescript
|
|
// selectors.test.ts
|
|
import { selectActiveTabId, selectIsLoading, selectRows } from './selectors';
|
|
|
|
describe('Selectors', () => {
|
|
const state = {
|
|
ui: { activeTabId: 'logs', isLoading: true },
|
|
query: { query: { query: 'test' } },
|
|
results: {
|
|
'test_now-15m_now': {
|
|
hits: { hits: [{ _id: '1' }, { _id: '2' }] },
|
|
},
|
|
},
|
|
services: {
|
|
data: {
|
|
query: {
|
|
timefilter: {
|
|
timefilter: {
|
|
getTime: () => ({ from: 'now-15m', to: 'now' }),
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
it('should select active tab ID', () => {
|
|
expect(selectActiveTabId(state)).toEqual('logs');
|
|
});
|
|
|
|
it('should select loading state', () => {
|
|
expect(selectIsLoading(state)).toEqual(true);
|
|
});
|
|
|
|
it('should select rows from results', () => {
|
|
expect(selectRows(state)).toEqual([{ _id: '1' }, { _id: '2' }]);
|
|
});
|
|
});
|
|
```
|
|
|
|
### 2. Integration Tests
|
|
|
|
Integration tests focus on testing how different parts of the system work together.
|
|
|
|
#### Store Integration
|
|
|
|
Test that the store is properly configured and that state changes propagate correctly:
|
|
|
|
```typescript
|
|
// store.test.ts
|
|
import { getExploreStore } from './store';
|
|
import { setQuery } from './slices/query_slice';
|
|
import { setActiveTab } from './slices/ui_slice';
|
|
|
|
describe('Explore Store', () => {
|
|
let store;
|
|
let unsubscribe;
|
|
|
|
beforeEach(async () => {
|
|
const mockServices = {
|
|
data: {
|
|
query: {
|
|
timefilter: {
|
|
timefilter: {
|
|
getTime: jest.fn().mockReturnValue({ from: 'now-15m', to: 'now' }),
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
const result = await getExploreStore(mockServices);
|
|
store = result.store;
|
|
unsubscribe = result.unsubscribe;
|
|
});
|
|
|
|
afterEach(() => {
|
|
unsubscribe();
|
|
});
|
|
|
|
it('should initialize with default state', () => {
|
|
const state = store.getState();
|
|
expect(state.query.query).toEqual({ query: '', language: '' });
|
|
expect(state.ui.activeTabId).toEqual('logs');
|
|
expect(state.results).toEqual({});
|
|
});
|
|
|
|
it('should update state when actions are dispatched', () => {
|
|
store.dispatch(setQuery({ query: 'test', language: 'lucene' }));
|
|
store.dispatch(setActiveTab('metrics'));
|
|
|
|
const state = store.getState();
|
|
expect(state.query.query).toEqual({ query: 'test', language: 'lucene' });
|
|
expect(state.ui.activeTabId).toEqual('metrics');
|
|
});
|
|
});
|
|
```
|
|
|
|
#### URL State Persistence
|
|
|
|
Test that state is correctly persisted to and loaded from the URL:
|
|
|
|
```typescript
|
|
// redux_persistence.test.ts
|
|
import { persistReduxState, loadStateFromUrl } from './utils/redux_persistence';
|
|
|
|
describe('Redux Persistence', () => {
|
|
let originalLocation;
|
|
let mockServices;
|
|
|
|
beforeEach(() => {
|
|
originalLocation = window.location;
|
|
delete window.location;
|
|
window.location = {
|
|
href: 'http://localhost:5601/app/explore',
|
|
hash: '',
|
|
replace: jest.fn(),
|
|
};
|
|
|
|
mockServices = {
|
|
data: {
|
|
query: {
|
|
state: {
|
|
update: jest.fn(),
|
|
get: jest.fn().mockReturnValue({
|
|
query: { query: 'test', language: 'lucene' },
|
|
filters: [],
|
|
}),
|
|
},
|
|
timefilter: {
|
|
timefilter: {
|
|
getTime: jest.fn().mockReturnValue({ from: 'now-15m', to: 'now' }),
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
});
|
|
|
|
afterEach(() => {
|
|
window.location = originalLocation;
|
|
});
|
|
|
|
it('should persist state to URL', () => {
|
|
const state = {
|
|
query: { query: { query: 'test', language: 'lucene' } },
|
|
ui: { activeTabId: 'logs' },
|
|
legacy: { columns: ['field1', 'field2'], sort: [], filters: [] },
|
|
transaction: { inProgress: false },
|
|
services: mockServices,
|
|
};
|
|
|
|
persistReduxState(state, mockServices);
|
|
|
|
expect(mockServices.data.query.state.update).toHaveBeenCalled();
|
|
expect(window.history.replaceState).toHaveBeenCalled();
|
|
});
|
|
|
|
it('should load state from URL', () => {
|
|
const encodedState = btoa(JSON.stringify({
|
|
query: { query: 'test', language: 'lucene' },
|
|
tab: 'logs',
|
|
columns: ['field1', 'field2'],
|
|
}));
|
|
|
|
window.location.hash = `#/view/${encodedState}`;
|
|
|
|
const loadedState = loadStateFromUrl(mockServices);
|
|
|
|
expect(loadedState).toEqual({
|
|
query: { query: { query: 'test', language: 'lucene' } },
|
|
ui: { activeTabId: 'logs' },
|
|
legacy: {
|
|
columns: ['field1', 'field2'],
|
|
sort: [],
|
|
filters: [],
|
|
interval: 'auto',
|
|
rowCount: 50,
|
|
},
|
|
});
|
|
});
|
|
});
|
|
```
|
|
|
|
#### Component Integration
|
|
|
|
Test that components correctly interact with the Redux store:
|
|
|
|
```typescript
|
|
// discover_table.test.tsx
|
|
import React from 'react';
|
|
import { render, screen, fireEvent } from '@testing-library/react';
|
|
import { Provider } from 'react-redux';
|
|
import configureMockStore from 'redux-mock-store';
|
|
import thunk from 'redux-thunk';
|
|
import { DiscoverTable } from './discover_table';
|
|
|
|
const middlewares = [thunk];
|
|
const mockStore = configureMockStore(middlewares);
|
|
|
|
describe('DiscoverTable', () => {
|
|
let store;
|
|
|
|
beforeEach(() => {
|
|
store = mockStore({
|
|
query: { query: { query: 'test', language: 'lucene' } },
|
|
ui: { activeTabId: 'logs', isLoading: false },
|
|
results: {
|
|
'test_now-15m_now': {
|
|
hits: { hits: [{ _id: '1', _source: { field1: 'value1' } }] },
|
|
},
|
|
},
|
|
legacy: { columns: ['field1'], sort: [] },
|
|
services: {
|
|
data: {
|
|
query: {
|
|
timefilter: {
|
|
timefilter: {
|
|
getTime: () => ({ from: 'now-15m', to: 'now' }),
|
|
},
|
|
},
|
|
},
|
|
},
|
|
indexPattern: { fields: [{ name: 'field1', type: 'string' }] },
|
|
},
|
|
});
|
|
});
|
|
|
|
it('should render table with data from Redux store', () => {
|
|
render(
|
|
<Provider store={store}>
|
|
<DiscoverTable />
|
|
</Provider>
|
|
);
|
|
|
|
expect(screen.getByText('value1')).toBeInTheDocument();
|
|
});
|
|
|
|
it('should dispatch actions when columns are added', () => {
|
|
render(
|
|
<Provider store={store}>
|
|
<DiscoverTable />
|
|
</Provider>
|
|
);
|
|
|
|
fireEvent.click(screen.getByText('Add Column'));
|
|
fireEvent.click(screen.getByText('field1'));
|
|
|
|
const actions = store.getActions();
|
|
expect(actions[0].type).toEqual('legacy/addColumn');
|
|
expect(actions[0].payload).toEqual({ column: 'field1' });
|
|
});
|
|
});
|
|
```
|
|
|
|
### 3. End-to-End Tests
|
|
|
|
End-to-end tests verify that the entire application works correctly from a user's perspective.
|
|
|
|
```typescript
|
|
// explore_e2e.test.ts
|
|
describe('Explore Plugin', () => {
|
|
beforeEach(async () => {
|
|
await page.goto('http://localhost:5601/app/explore');
|
|
});
|
|
|
|
it('should execute a query and display results', async () => {
|
|
// Enter a query
|
|
await page.fill('[data-test-subj="queryInput"]', 'host:example.com');
|
|
|
|
// Click the search button
|
|
await page.click('[data-test-subj="querySubmitButton"]');
|
|
|
|
// Wait for results to load
|
|
await page.waitForSelector('[data-test-subj="docTable"]');
|
|
|
|
// Verify results are displayed
|
|
const rowCount = await page.$$eval('[data-test-subj="docTableRow"]', rows => rows.length);
|
|
expect(rowCount).toBeGreaterThan(0);
|
|
});
|
|
|
|
it('should persist state to URL', async () => {
|
|
// Enter a query
|
|
await page.fill('[data-test-subj="queryInput"]', 'host:example.com');
|
|
|
|
// Click the search button
|
|
await page.click('[data-test-subj="querySubmitButton"]');
|
|
|
|
// Wait for URL to update
|
|
await page.waitForFunction(() => {
|
|
return window.location.hash.includes('#/view/');
|
|
});
|
|
|
|
// Get current URL
|
|
const url = await page.url();
|
|
|
|
// Reload the page
|
|
await page.reload();
|
|
|
|
// Verify query is still set
|
|
const queryValue = await page.$eval('[data-test-subj="queryInput"]', el => el.value);
|
|
expect(queryValue).toEqual('host:example.com');
|
|
});
|
|
});
|
|
```
|
|
|
|
## Test Coverage Goals
|
|
|
|
- **Unit Tests**: 80% coverage of all Redux-related code
|
|
- **Integration Tests**: Cover all major user flows
|
|
- **End-to-End Tests**: Cover critical user journeys
|
|
|
|
## Testing Tools
|
|
|
|
1. **Jest**: For unit and integration testing
|
|
2. **React Testing Library**: For component testing
|
|
3. **Redux Mock Store**: For testing Redux actions and thunks
|
|
4. **Playwright/Cypress**: For end-to-end testing
|
|
|
|
## Mocking Strategy
|
|
|
|
1. **Services**: Mock all OpenSearch Dashboards services
|
|
2. **API Calls**: Mock all API calls to OpenSearch
|
|
3. **Time**: Use fake timers for time-dependent tests
|
|
|
|
## Continuous Integration
|
|
|
|
1. Run unit and integration tests on every PR
|
|
2. Run end-to-end tests on merge to main branch
|
|
3. Generate coverage reports and enforce minimum coverage thresholds
|
|
|
|
## Test Organization
|
|
|
|
Organize tests to mirror the structure of the code:
|
|
|
|
```
|
|
src/
|
|
plugins/
|
|
explore/
|
|
public/
|
|
application/
|
|
state_management/
|
|
slices/
|
|
ui_slice.ts
|
|
ui_slice.test.ts
|
|
actions/
|
|
query_actions.ts
|
|
query_actions.test.ts
|
|
utils/
|
|
redux_persistence.ts
|
|
redux_persistence.test.ts
|
|
components/
|
|
discover_table.tsx
|
|
discover_table.test.tsx
|
|
```
|
|
|
|
## Conclusion
|
|
|
|
This testing strategy ensures that our Redux implementation is thoroughly tested at all levels, from individual reducers to the entire application. By following this approach, we can have confidence in the reliability and correctness of our code. |