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

Refactor changes #9462

Merged

Conversation

huyaboo
Copy link
Member

@huyaboo huyaboo commented Feb 27, 2025

Description

This PR does several things

  • Removes system indexes (any index name that starts with .) from the index name selector
  • Refactor cat indices into separate file
  • Properly hide the delimiter selector; the selector is only shown when the file uploaded is a csv file or if the text box file type selector is a csv type
  • Fix the text selector by passing in the createMode parameter

Issues Resolved

Screenshot

image

Testing the changes

For hiding system indexes

Checked that .kibana indexes aren't in the selector

For file upload

  1. Added different types of files .ndjson, .json, and .csv
  2. Checked that the delimiter is only shown in the .csv file

For text input

  1. Selected different types of files .ndjson, .json, and .csv
  2. Checked that the delimiter is only shown in the .csv file

Changelog

-fix: Remove system indexes from the index name selector

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>
Copy link

codecov bot commented Feb 27, 2025

Codecov Report

Attention: Patch coverage is 25.00000% with 18 lines in your changes missing coverage. Please review.

Please upload report for BASE (feature/data-importer@1a51a92). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...a_importer/public/components/data_importer_app.tsx 5.26% 17 Missing and 1 partial ⚠️
Additional details and impacted files
@@                   Coverage Diff                    @@
##             feature/data-importer    #9462   +/-   ##
========================================================
  Coverage                         ?   61.71%           
========================================================
  Files                            ?     3834           
  Lines                            ?    92212           
  Branches                         ?    14614           
========================================================
  Hits                             ?    56909           
  Misses                           ?    31635           
  Partials                         ?     3668           
Flag Coverage Δ
Linux_1 28.99% <ø> (?)
Linux_2 56.46% <ø> (?)
Linux_3 39.34% <25.00%> (?)
Linux_4 28.91% <ø> (?)
Windows_1 29.00% <ø> (?)
Windows_2 56.41% <ø> (?)
Windows_3 39.34% <25.00%> (?)
Windows_4 28.91% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -168,18 +148,19 @@ export const DataImporterPluginApp = ({
if (importType === IMPORT_CHOICE_FILE) {
if (inputFile) {
const fileExtension = extname(inputFile.name);
setIsLoadingPreview(true); // Set loading state to true
setIsLoadingPreview(true);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we gotta look for coverage later for this

@huyaboo huyaboo merged commit c9c0e77 into opensearch-project:feature/data-importer Feb 28, 2025
56 of 68 checks passed
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.

2 participants