Closed mdouchin closed 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 :
We could add a widget on the dashboard, if the module needs to be configured (so it should check if everything is ok).
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
Ah yes, I forgot it took the profile from the layer datasource...
done
At present, the module has 2 main goals:
jDb
profile. See this filejDb
profilepgmetadata
and if no corresponding profile is found, it uses the default profile. See this fileFor 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
andupgrade.php
could also get the installation parameters (if given), and set up thispgmetadata
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