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.
✅ New feature (non-breaking change which adds functionality)
✅ Documentation
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.
✅ Existing Tests still pass
✅ Ran locally on my machine
Code Quality Checklist
Please delete options that are not relevant, and select all options that apply.
✅ My code follows the guidelines of XYZ
✅ My code has been commented
✅ Documentation has been updated
✅ New and existing unit tests pass locally with my changes
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. AnupdateQuery
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 anoutcome
object. Theoutcome
object will contain asuccess
flag, of true or false indicating the success of the import, and a message, which can be displayed to the user in theplugins.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 thePromise
resolves to inform the user of the import. This provides both amapp.ui.layers.panels.csv_upload
andmapp.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.