GEOLYTIX / xyz

An open source javascript framework for spatial data and application interfaces.
MIT License
88 stars 26 forks source link

CSV Upload #1642

Open simon-leech opened 3 weeks ago

simon-leech commented 3 weeks ago

CSV Uploading

Description

This PR provides a new utility lib.utils.csvUpload. This module takes an input and parameters and stores the data to the database in chunks. An updateQuery is ran after the importing is successful, which can be used to generate the geometry of rows for example. The module returns a Promise, and an outcome object. The outcome object will contain a success flag, of true or false indicating the success of the import, and a message, which can be displayed to the user in the plugins.csv_upload.

A new plugins.csv_upload has been added, this provides the UI for the CSV Upload - which is a button that opens a dialog for importing. Alerts are used when the Promise resolves to inform the user of the import. This provides both a mapp.ui.layers.panels.csv_upload and mapp.ui.locations.entries.csv_upload.

GitHub Issue

1676

Type of Change

Please delete options that are not relevant, and select all options that apply.

How have you tested this?

Tested on bugs_testing/plugins/csv_upload/workspace.json

Testing Checklist

Please delete options that are not relevant, and select all options that apply.

Code Quality Checklist

Please delete options that are not relevant, and select all options that apply.

sonarcloud[bot] commented 3 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud