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

Delete Datastore Table Button #197

Merged
merged 9 commits into from
Feb 1, 2024

Conversation

JVickery-TBS
Copy link
Contributor

feat(views): added view and button to delete ds table;

  • Added view to delete datastore table.
  • Added button to delete a resource's datastore table.

Adds a button to the Xloader data page to delete a Resource's datastore table.

- Added view to delete datastore table.
- Added button to delete a resource's datastore table.
- Added csrf field to delete button form.
- Removed the word `table` from user visible things.
- Used `get_action` from toolkit instead of ckanapi dependency.
@JVickery-TBS
Copy link
Contributor Author

@ThrawnCA for this PR, I also reverted the ckanapi dependency addition and used get_action from the toolkit instead

@ThrawnCA
Copy link
Collaborator

ThrawnCA commented Nov 9, 2023

Looks good from here.

@ThrawnCA
Copy link
Collaborator

Ideally there should be a sanity check to ensure that the package ID is correct for the resource ID.

- Confirm that the resource id belongs to the package id.
- Condition delete button behind `datastore_active`.
- Fix context variable in view.
Copy link
Collaborator

@ThrawnCA ThrawnCA left a comment

Choose a reason for hiding this comment

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

Testing on dev.data.qld.gov.au indicates that the positioning of the Delete button doesn't mesh well with the Upload to Datastore button.

Copy link
Collaborator

@ThrawnCA ThrawnCA left a comment

Choose a reason for hiding this comment

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

After the confirm-action JavaScript runs, the button submits a datastore refresh instead of deletion.

Our fork will fix this with qld-gov-au#74

# Conflicts:
#	ckanext/xloader/views.py
### RESOLVED.
- Fix layout of delete button with upload button.
- Changed delete button icon.
@JVickery-TBS
Copy link
Contributor Author

@ThrawnCA button alignment should be good now

ckanext/xloader/views.py Outdated Show resolved Hide resolved
- Move sets into their respective blocks.
@ThrawnCA ThrawnCA merged commit 959dfd2 into ckan:master Feb 1, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants