WPRDC / wprdc-ops

Codeless repo for organizing project-wide work and issues.
0 stars 0 forks source link

Restore views #33

Open drw opened 1 year ago

drw commented 1 year ago

The old data portal had a lot of maps and other things linked from various resources. Other than all those maps (mainly Carto maps) that we'd like to restore the views of, there were also a lot of views of PDF files, GeoJSON files, KML files, and various web sites that we have resource-links to. We could write a script to automatically add views for PDF/GeoJSON/KML files that are already resources, as we enable those view types; with web sites that we're linking to, I generally like to first check to see whether the web site actually renders in the CKAN "Website" view.

[Also, a few larger tables had filtered Data Tables views (because the full table would take to long to load, even though Data Tables should only be showing a small fraction of the rows). This seems to no longer be the case, so we may not need the old filtered views.]

saylorsd commented 3 months ago

We have a few view plugins installed:

I second the idea for a script to generate views (if we there aren't any) for these resources. There's a wonderfully-documented CLI command, that might be of use.

saylorsd commented 3 months ago

https://docs.ckan.org/en/2.10/maintaining/configuration.html#ckan-views-default-views

drw commented 3 months ago

There's more documentation on the ckan views create command here: https://docs.ckan.org/en/latest/maintaining/data-viewer.html

You can do things like

> ckan views create pdf_view

to create PDF views for all PDF resources.

drw commented 3 months ago

I created a script for inventorying resource views: https://github.com/WPRDC/viewmaster

drw commented 1 week ago

Many views were automatically added with the ckan views create command. Others were manually added. Found resources without formats and corrected those and added appropriate views. Still to do: