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

Upload ruleset files using a "drag and drop" component #1770

Closed
3 tasks done
jesusgn90 opened this issue Sep 3, 2019 · 5 comments
Closed
3 tasks done

Upload ruleset files using a "drag and drop" component #1770

jesusgn90 opened this issue Sep 3, 2019 · 5 comments
Assignees
Labels
type/enhancement Enhancement issue UI/UX Generic label for things related to the font-end side
Milestone

Comments

@jesusgn90
Copy link
Contributor

jesusgn90 commented Sep 3, 2019

Hi team,

The app currently supports uploading ruleset files, filling a text editor and clicking on a "Save" button. What about having a "drag and drop" box where the user can put a valid ruleset file?

Proposals:

  • Create a "drag and drop" component for uploading files using the Wazuh API.
  • Integrate it with our ruleset management tabs.
  • Upload the files.
@jesusgn90 jesusgn90 added type/enhancement Enhancement issue UI/UX Generic label for things related to the font-end side priority/low labels Sep 3, 2019
@jesusgn90 jesusgn90 added this to the 36th week sprint milestone Sep 3, 2019
@adri9valle adri9valle reopened this Sep 4, 2019
@adri9valle
Copy link
Contributor

adri9valle commented Sep 4, 2019

Update 04.09.2019

Branch: upload-files

I've created a component in order to use in the different ruleset sections (rules, decoders, and CDB lists).

By the moment has the following capabilities:

  • Select or drag and drop multiple files.
  • The attached files are listed.
  • Max files number is set to 5.
  • Max size per file is set to 300Kb.
  • In case of rules or decoders, the extension of the files is checked in order to check if is .xml.

Working on:

  • Get the file content in order to send to the API, currently, only the name and the size are taken.

Demo:

upload4

NOTE: The design, disposition and the way to access to the component could change in next iterations.

@juankaromo juankaromo self-assigned this Sep 5, 2019
@adri9valle
Copy link
Contributor

adri9valle commented Sep 6, 2019

Update 06.09.19

I've been working with @juankaromo in order to adapt this new capability with the integration of the logtest in the APP #1434. The current status and is the following:

up-pop-list

NOTE: The design, disposition and the way to access to the component could change in next iterations.

Now we get the files and their content, but API endpoint to upload files is still missing.

Pending API

@adri9valle
Copy link
Contributor

Update 19.09.19

Now the files are uploaded, working on improving the error handler:

upload

@adri9valle
Copy link
Contributor

adri9valle commented Sep 20, 2019

Update 20.09.19

This functionality is finished:

  • Upload rules, decoders, and lists.
  • Max 5 files.
  • Max 300Kb per file.
  • Check .xml extension in rules and decoders.
  • Handle errors
    • Don't close the upload component in case of errors
    • In case of error list the files properly uploaded and the were not.
    • Icon to expand the error detail.

finish

Merge pending by:

@adri9valle
Copy link
Contributor

Update 01.10.19

Changed the style and fix when clicking again in import file and lose the popover content:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Enhancement issue UI/UX Generic label for things related to the font-end side
Projects
None yet
Development

No branches or pull requests

3 participants