diff --git a/QgisModelBaker/gui/panel/pg_config_panel.py b/QgisModelBaker/gui/panel/pg_config_panel.py index a6b9955a..ca5d25a9 100644 --- a/QgisModelBaker/gui/panel/pg_config_panel.py +++ b/QgisModelBaker/gui/panel/pg_config_panel.py @@ -24,7 +24,6 @@ # Available in typing module from v3.12 on from typing_extensions import override -import QgisModelBaker.libs.modelbaker.libs.pgserviceparser as pgserviceparser import QgisModelBaker.libs.modelbaker.utils.db_utils as db_utils from QgisModelBaker.libs.modelbaker.iliwrapper.globals import DbIliMode from QgisModelBaker.libs.modelbaker.iliwrapper.ili2dbconfig import ( @@ -117,7 +116,8 @@ def __init__(self, parent, db_action_type): # Fill pg_services combo box self.pg_service_combo_box.addItem(self.tr("None"), None) - for service in pgserviceparser.service_names(): + services, _ = db_utils.get_service_names() + for service in services: self.pg_service_combo_box.addItem(service, service) self.pg_service_combo_box.currentIndexChanged.connect( @@ -223,7 +223,12 @@ def get_fields(self, configuration): @override def set_fields(self, configuration): - if configuration.dbservice is None: + service_config, error = db_utils.get_service_config(configuration.dbservice) + if error: + logging.warning(error) + + # if no dbservice in the configuration or one is there but the servicefile is not available anymore + if not service_config: indexNoService = self.pg_service_combo_box.findData( None, PgConfigPanel._SERVICE_COMBOBOX_ROLE.DBSERVICE @@ -287,8 +292,6 @@ def set_fields(self, configuration): # Only apply stored QSettings if the # PG service didn't have a value for them - service_config = pgserviceparser.service_config(configuration.dbservice) - if not service_config.get("host"): self.pg_host_line_edit.setText(configuration.dbhost) @@ -352,9 +355,11 @@ def _pg_service_combo_box_changed(self): if self._current_service is None: self._keep_custom_settings() - if service: - service_config = pgserviceparser.service_config(service) + service_config, error = db_utils.get_service_config(service) + if error: + logging.warning(error) + if service_config: # QGIS cannot handle manually set hosts with service # So it needs to have a host defined in service conf or it takes localhost self.pg_host_line_edit.setText(service_config.get("host", "localhost")) diff --git a/docs/docs/background_info/catalogues.md b/docs/docs/background_info/catalogues.md index 7f4e8538..199c9083 100644 --- a/docs/docs/background_info/catalogues.md +++ b/docs/docs/background_info/catalogues.md @@ -193,7 +193,7 @@ It's not possible to export data with validation from a model that uses codelist ![tree_validation](../assets/catalogues_treevalidation.png) #### Reason -There is a constraint in the the class `CatalogueReference` of [`CatalogeObjectTrees_V1`](http://models.geo.admin.ch/CH/CHBase_Part3_CATALOGUEOBJECTS_V1.ili): +There is a constraint in the class `CatalogueReference` of [`CatalogeObjectTrees_V1`](http://models.geo.admin.ch/CH/CHBase_Part3_CATALOGUEOBJECTS_V1.ili): ``` MANDATORY CONSTRAINT Reference->IsUseable; diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 74d0ffff..a56f491a 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -91,7 +91,7 @@ plugins: Basket and Dataset Handling: Dataset und Basket Handling OID Generator: OID Generator UsabILIty Hub: UsabILIty Hub - Overview: Overview + Overview: Übersicht Model Baker Integration: Model Baker Integration Technical Concept: Technisches Konzept Optimized Projects for Extended Models: Optimierte Projekte für erweiterte @@ -105,12 +105,12 @@ plugins: primary: blue grey toggle: icon: material/weather-night - name: Switch to dark mode + name: Wechsel zu Nachmodus - scheme: slate primary: blue grey toggle: icon: material/weather-sunny - name: Switch to light mode + name: Wechsel zu Tagmodus primary: white # Page tree diff --git a/docs/requirements.txt b/docs/requirements.txt index 81d26ea9..85a66024 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,3 @@ -mkdocs-material==9.5.20 mkdocs-material==9.5.27 mkdocs-static-i18n==1.2.3 python-slugify diff --git a/scripts/package_pip_packages.sh b/scripts/package_pip_packages.sh index 79331bf6..b928128f 100755 --- a/scripts/package_pip_packages.sh +++ b/scripts/package_pip_packages.sh @@ -1,7 +1,7 @@ #!/bin/bash LIBS_DIR="QgisModelBaker/libs" -MODELBAKER_LIBRARY=("modelbaker" "1.8.0") +MODELBAKER_LIBRARY=("modelbaker" "1.8.1") PACKAGING=("packaging" "21.3") PACKAGES=(