3liz / lizmap-pgmetadata-module

PgMetadata Lizmap module
https://github.com/3liz/qgis-pgmetadata-plugin
0 stars 5 forks source link

Administration - Add a way to create or update the database profile #29

Closed mdouchin closed 1 year ago

mdouchin commented 1 year ago

At present, the module has 2 main goals:

For the second option, it means the administrator should be able to configure the credentials to the PgMetadata database, for example in a dedicated administration panel.

Basically, all the credentials should be editable and stored in the [pgmetadata] section.

Perhaps the install.php and upgrade.php could also get the installation parameters (if given), and set up this pgmetadata profile if the given parameters can be used to connect to the database (and fallback to no creating the [pgmetadata] section if connection fails ?)

cc @laurentj @rldhont

laurentj commented 1 year ago

I don't think install/upgrade should set something.

An administration panel is enough and more user friendly.

The administration panel should :

laurentj commented 1 year ago

We could add a widget on the dashboard, if the module needs to be configured (so it should check if everything is ok).

mdouchin commented 1 year ago

I don't think install/upgrade should set something.

Ok for me

The administration panel should :

* check that a pgmetadata schema and a table dataset exists, for html export (using the default connection), and displays if it is ok or not. Does a dedicated profile make sens for this data?

Not really. Imagine a Lizmap project with a PostgreSQL layer stored in another server as where LWC is installed. The module PgMetadata can sucessfully read the QGIS layer datasource and query this external PostgreSQL database. So it not mandatory to have metadata stored in the local Lizmap database. A dedicated profile is not needed in this "Layer" context, as the module already checks for each PostgreSQL layer if its server is compatible. So I think we should not check anything in this context, since the check is done dynamically for each Lizmap project and for each "clicked" Lizmap PostgreSQL layer

* check that a pgmetadata schema and a view v_dataset_as_dcat exists, for RDF DCAT, using the default connection (or the pgmetadata profile it it exists). It displays ok or not, and if not ok, propose a form to create a new connection (as the pgmetadata profile).

YES

laurentj commented 1 year ago

Ah yes, I forgot it took the profile from the layer datasource...

laurentj commented 1 year ago

done