Compare commits
No commits in common. "main" and "1.37" have entirely different histories.
@ -285,20 +285,16 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
|
||||
if self.comboBox.currentText() == 'toutes les catégories':
|
||||
custom_list = schemaname_list
|
||||
elif self.comboBox.currentText() == 'travaux':
|
||||
custom_list = schemaname_list[:-2] + """
|
||||
WHERE schemaname LIKE '""" + str(self.comboBox.currentText()) + """%';
|
||||
"""
|
||||
custom_list = """(SELECT schemaname,tablename from pg_catalog.pg_tables
|
||||
where schemaname like '""" + str(self.comboBox.currentText()) + """%' order by schemaname,tablename) UNION (SELECT schemaname,matviewname AS tablename FROM pg_catalog.pg_matviews where schemaname like '""" + str(self.comboBox.currentText()) + """%' order by schemaname,tablename) order by schemaname,tablename;"""
|
||||
else:
|
||||
custom_list = schemaname_list[:-2] + """
|
||||
WHERE schemaname LIKE '_""" + str(self.comboBox.currentText()) + """%';
|
||||
"""
|
||||
custom_list = """(SELECT schemaname,tablename from pg_catalog.pg_tables
|
||||
where schemaname like '\\_""" + str(self.comboBox.currentText()) + """%' order by schemaname,tablename) UNION (SELECT schemaname,matviewname AS tablename FROM pg_catalog.pg_matviews where schemaname like '\\_""" + str(self.comboBox.currentText()) + """%' order by schemaname,tablename) order by schemaname,tablename;"""
|
||||
else:
|
||||
if self.comboBox.currentText() == 'toutes les catégories':
|
||||
custom_list = schemaname_list_ref
|
||||
else:
|
||||
custom_list = schemaname_list_ref[:-2] + """
|
||||
WHERE schemaname LIKE '""" + str(self.comboBox.currentText()) + """%' AND tablename NOT LIKE 'qgis_projects';
|
||||
"""
|
||||
custom_list = """SELECT schemaname, tablename from pg_catalog.pg_tables WHERE schemaname LIKE '""" + str(self.comboBox.currentText()) + """' AND tablename NOT LIKE 'qgis_projects' order by schemaname, tablename;"""
|
||||
cur.execute(custom_list)
|
||||
list_schema = cur.fetchall()
|
||||
|
||||
@ -388,7 +384,6 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
|
||||
self.tableWidget.setColumnCount(5)
|
||||
i = 0
|
||||
for value in list_schema:
|
||||
MetadataXML = value[2]
|
||||
if dbtype == sigdb:
|
||||
type_val = str(value[0])[1:3]
|
||||
schema_name = str(value[0])[4:]
|
||||
@ -397,8 +392,6 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
|
||||
table_name = str(value[1][len(value[0]) + 1:])
|
||||
else:
|
||||
table_name = str(value[1])
|
||||
if type_val == "00":
|
||||
table_name = value[1]
|
||||
else:
|
||||
type_val = ''
|
||||
schema_name = str(value[0])
|
||||
@ -453,9 +446,8 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
|
||||
self.tableWidget.setCellWidget(i, 4, self.FavButton)
|
||||
|
||||
# Coloration des lignes selon les droits d'accès
|
||||
if (str(value[0]) + '.' + str(value[1])) in GrandUser: # L'utilisateur a les droits
|
||||
for j in range(self.tableWidget.columnCount()):
|
||||
self.tableWidget.item(i, j).setToolTip(MetadataXML)
|
||||
if (str(value[0]) + '.' + str(value[1])) in GrandUser:
|
||||
pass # L'utilisateur a les droits
|
||||
else:
|
||||
# Coloration en violet si droits insuffisants
|
||||
for j in range(self.tableWidget.columnCount()):
|
||||
@ -606,6 +598,7 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
|
||||
for row in range(0, self.tableWidget_2.rowCount()):
|
||||
color_rgba_db = 855030089 # Code couleur pour couche dans autre BD
|
||||
color_rgba_droit = 851150528 # Code couleur pour droits insuffisants
|
||||
print(self.tableWidget_2.item(row, 1).background().color().rgba())
|
||||
if self.tableWidget_2.item(row, 1).background().color().rgba() == color_rgba_droit:
|
||||
self.QMBquestion = QMessageBox.question(iface.mainWindow(), u"Attention !", "Vous ne disposez pas des droit pour la couche «" + str(self.tableWidget_2.item(row, 1).text()) + ' ' + str(self.tableWidget_2.item(row, 2).text()) + "» !", QMessageBox.StandardButton(0x00004000))
|
||||
elif self.tableWidget_2.item(row, 1).background().color().rgba() != color_rgba_db:
|
||||
@ -640,6 +633,7 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
|
||||
elif code == 'qgis':
|
||||
# Chargement d'un projet QGIS stocké dans la base de données
|
||||
schema = self.tableWidget_2.item(row, 2).text()
|
||||
print(schema)
|
||||
table = self.tableWidget_2.item(row, 3).text()
|
||||
uri_project = 'postgresql://' + user + ':' + mdp + '@' + host + ':' + port + '?sslmode=disable&dbname=' + dbtype + "&schema=" + schema + '&project=' + table
|
||||
QgsProject.instance().read(uri_project)
|
||||
|
||||
@ -7,7 +7,7 @@ name=CenRa_FLUX
|
||||
qgisMinimumVersion=3.0
|
||||
supportsQt6=True
|
||||
description=Permet d'ouvrire une table dans la base PostGis
|
||||
version=3.20
|
||||
version=3.18
|
||||
author=Conservatoire d'Espaces Naturels de Rhône-Alpes
|
||||
email=si_besoin@cen-rhonealpes.fr
|
||||
|
||||
@ -32,7 +32,7 @@ icon=icon.png
|
||||
# experimental flag
|
||||
experimental=False
|
||||
|
||||
changelog=<h2>CenRa_FLUX:</h2></br><p><h3>05/03/2026 - Version 3.20: </h3> - Visualisation des metadonnees avec un tooltip au survol de la couche.</p></br><p><h3>26/02/2026 - Version 3.19: </h3> - Visualisation des droits pour les vues materialisees.</p></br><p><h3>25/02/2026 - Version 3.18: </h3> - Filtre par secteur geographique compatible avec les favoris.</p></br><p><h3>12/02/2026 - Version 3.17: </h3> - Favorit dans la BD Ref.</p></br><p><h3>11/02/2026 - Version 3.16: </h3> - Creation de favori et visualisation.</p></br><p><h3>10/02/2026 - Version 3.15: </h3> - Sauvegarde la recherche.</p></br><p><h3>08/12/2025 - Version 3.14: </h3> - message d'erreur pour les drois de couche sur la DB.</p></br><p><h3>08/12/2025 - Version 3.13: </h3> - Detection des droit utilisateur.</p></br><p><h3>25/09/2025 - Version 3.12: </h3> - version +1.</p></br><p><h3>25/09/2025 - Version 3.11: </h3> - Correctife sur les code 00.</p></br><p><h3>24/09/2025 - Version 3.10: </h3> - Erreur sur l ouverture des couche raster. </p></br><p><h3>24/09/2025 - Version 3.9: </h3> - bugfix lier aux extention pgsql.</p></br><p><h3>09/09/2025 - Version 3.8: </h3> - Bug REF fix.</p></br><p><h3>05/09/2025 - Version 3.7: </h3> - Ouverture de projet QGIS contenue dans la base de donnees.</p></br><p><h3>30/07/2025 - Version 3.6: </h3> - Correctife de bug.</p></br><p><h3>29/07/2025 - Version 3.5: </h3> - Bug fix sur les donnee raster.</p></br><p><h3>23/07/2025 - Version 3.4: </h3> - Ouverture raster dans la base SIG.</p></br><p><h3>23/07/2025 - Version 3.3: </h3> - Optimisation des chargement.</p></br><p><h3>22/07/2025 - Version 3.2: </h3> - Visualisation des format raster et vecteur dans REF.</p></br><p><h3>21/07/2025 - Version 3.1: </h3> - Bug fix pour l'ouverture de plus de 5 couches.</p></br><p><h3>19/05/2025 - Version 3.0: </h3> - Compatible PyQt5 et PyQt6.</p></br><p><h3>09/04/2025 - Version 2.9: </h3> - Correctif bug en TT.</p></br><p><h3>09/04/2025 - Version 2.8: </h3> - Optimisation pour le TT.</p></br><p><h3>07/04/2025 - Version 2.7: </h3> - mode debug.</p></br><p><h3>03/04/2025 - Version 2.6: </h3> - Mise a jour de securite.</p></br><p><h3>20/03/2025 - Version 2.5: </h3> - Visualisation distincte des couches ne se trouvant pas dans l'antenne.</p></br><p><h3>13/02/2025 - Version 2.4: </h3> - Ajoute redimensionnement et déplacement mollette.</p></br><p><h3>05/02/2025 - Version 2.3: </h3> - Bouton de visualisation des couches se trouvent uniquement dans le canva de la carte.</p></br><p><h3>07/01/2025 - Version 2.2: </h3> - ByPass du certif ssl ci erreur.</p></br><p><h3>22/10/2024 - Version 2.1:</h3> - Correctif de bug.</br> - Evolution de la limit de 3 à 5. </br></p></br><p><h3>22/10/2024 - Version 2.0:</h3> - Reformatage du code.</br></p></br><p><h3>03/10/2024 - Version 1.14:</h3> - Remonte la fênetre dans la pille.</br></p><p><h3>13/09/2024 - Version 1.13:</h3>- MAJ sur le lien du changelog</br>- Bug-fix: Ouvre MultiPolygone et Polygon séparément.</p></br><p><h3>10/09/2024 - Version 1.11:</h3>- Ouverture de table contenant plusieurs géométries.</p></br><p><h3>26/08/2024 - Version 1.10:</h3>- Ajoute d'un changelog et vérification de mise à jour.</p>
|
||||
changelog=<h2>CenRa_FLUX:</h2></br><p><h3>25/02/2026 - Version 3.18: </h3> - Filtre par secteur geographique compatible avec les favoris.</p></br><p><h3>12/02/2026 - Version 3.17: </h3> - Favorit dans la BD Ref.</p></br><p><h3>11/02/2026 - Version 3.16: </h3> - Creation de favori et visualisation.</p></br><p><h3>10/02/2026 - Version 3.15: </h3> - Sauvegarde la recherche.</p></br><p><h3>08/12/2025 - Version 3.14: </h3> - message d'erreur pour les drois de couche sur la DB.</p></br><p><h3>08/12/2025 - Version 3.13: </h3> - Detection des droit utilisateur.</p></br><p><h3>25/09/2025 - Version 3.12: </h3> - version +1.</p></br><p><h3>25/09/2025 - Version 3.11: </h3> - Correctife sur les code 00.</p></br><p><h3>24/09/2025 - Version 3.10: </h3> - Erreur sur l ouverture des couche raster. </p></br><p><h3>24/09/2025 - Version 3.9: </h3> - bugfix lier aux extention pgsql.</p></br><p><h3>09/09/2025 - Version 3.8: </h3> - Bug REF fix.</p></br><p><h3>05/09/2025 - Version 3.7: </h3> - Ouverture de projet QGIS contenue dans la base de donnees.</p></br><p><h3>30/07/2025 - Version 3.6: </h3> - Correctife de bug.</p></br><p><h3>29/07/2025 - Version 3.5: </h3> - Bug fix sur les donnee raster.</p></br><p><h3>23/07/2025 - Version 3.4: </h3> - Ouverture raster dans la base SIG.</p></br><p><h3>23/07/2025 - Version 3.3: </h3> - Optimisation des chargement.</p></br><p><h3>22/07/2025 - Version 3.2: </h3> - Visualisation des format raster et vecteur dans REF.</p></br><p><h3>21/07/2025 - Version 3.1: </h3> - Bug fix pour l'ouverture de plus de 5 couches.</p></br><p><h3>19/05/2025 - Version 3.0: </h3> - Compatible PyQt5 et PyQt6.</p></br><p><h3>09/04/2025 - Version 2.9: </h3> - Correctif bug en TT.</p></br><p><h3>09/04/2025 - Version 2.8: </h3> - Optimisation pour le TT.</p></br><p><h3>07/04/2025 - Version 2.7: </h3> - mode debug.</p></br><p><h3>03/04/2025 - Version 2.6: </h3> - Mise a jour de securite.</p></br><p><h3>20/03/2025 - Version 2.5: </h3> - Visualisation distincte des couches ne se trouvant pas dans l'antenne.</p></br><p><h3>13/02/2025 - Version 2.4: </h3> - Ajoute redimensionnement et déplacement mollette.</p></br><p><h3>05/02/2025 - Version 2.3: </h3> - Bouton de visualisation des couches se trouvent uniquement dans le canva de la carte.</p></br><p><h3>07/01/2025 - Version 2.2: </h3> - ByPass du certif ssl ci erreur.</p></br><p><h3>22/10/2024 - Version 2.1:</h3> - Correctif de bug.</br> - Evolution de la limit de 3 à 5. </br></p></br><p><h3>22/10/2024 - Version 2.0:</h3> - Reformatage du code.</br></p></br><p><h3>03/10/2024 - Version 1.14:</h3> - Remonte la fênetre dans la pille.</br></p><p><h3>13/09/2024 - Version 1.13:</h3>- MAJ sur le lien du changelog</br>- Bug-fix: Ouvre MultiPolygone et Polygon séparément.</p></br><p><h3>10/09/2024 - Version 1.11:</h3>- Ouverture de table contenant plusieurs géométries.</p></br><p><h3>26/08/2024 - Version 1.10:</h3>- Ajoute d'un changelog et vérification de mise à jour.</p>
|
||||
|
||||
# deprecated flag (applies to the whole plugin, not just a single version)
|
||||
deprecated=False
|
||||
|
||||
@ -2,57 +2,13 @@
|
||||
schemaname_distinct = """SELECT DISTINCT schemaname from pg_catalog.pg_tables
|
||||
WHERE schemaname NOT LIKE '_archives' AND schemaname NOT LIKE 'topology' AND schemaname NOT LIKE 'information_schema' AND schemaname NOT LIKE 'pg_catalog' and schemaname NOT LIKE 'public' AND schemaname NOT LIKE '_trier'
|
||||
order by schemaname;"""
|
||||
|
||||
schemaname_list_ref = """
|
||||
WITH TableList AS (SELECT
|
||||
schemaname,
|
||||
tablename
|
||||
FROM pg_catalog.pg_tables
|
||||
WHERE
|
||||
schemaname NOT LIKE '_archives' AND schemaname NOT LIKE 'topology' AND schemaname NOT LIKE 'information_schema' AND schemaname NOT LIKE 'pg_catalog' and schemaname NOT LIKE 'public' AND schemaname NOT LIKE '_trier'
|
||||
ORDER BY schemaname,tablename),
|
||||
TableDescription AS (SELECT
|
||||
schemaname,
|
||||
tablename,
|
||||
description
|
||||
FROM TableList
|
||||
LEFT JOIN pg_description ON objoid = (quote_ident(schemaname)||'.'||quote_ident(tablename))::regclass
|
||||
ORDER BY schemaname, tablename)
|
||||
SELECT * FROM TableDescription;
|
||||
"""
|
||||
|
||||
schemaname_list = """
|
||||
WITH
|
||||
TableList as (SELECT
|
||||
schemaname,
|
||||
tablename
|
||||
FROM pg_catalog.pg_tables
|
||||
WHERE schemaname LIKE 'trav%' OR schemaname LIKE '_ag%' OR schemaname LIKE '_00%' OR schemaname LIKE '_01%' OR schemaname LIKE '_07%' OR schemaname LIKE '_26%' OR schemaname LIKE '_form%' OR schemaname LIKE '_42%' OR schemaname LIKE '_69%'
|
||||
ORDER BY schemaname,tablename),
|
||||
|
||||
ViewList as (SELECT
|
||||
schemaname,
|
||||
matviewname AS tablename
|
||||
FROM pg_catalog.pg_matviews
|
||||
ORDER BY schemaname,tablename),
|
||||
|
||||
TableAndView as (SELECT
|
||||
schemaname,
|
||||
tablename
|
||||
FROM TableList
|
||||
UNION SELECT schemaname,tablename FROM ViewList),
|
||||
|
||||
TableViewDescription as (SELECT
|
||||
schemaname,
|
||||
tablename,
|
||||
description
|
||||
FROM TableAndView
|
||||
LEFT JOIN pg_description ON objoid = (quote_ident(schemaname)||'.'||quote_ident(tablename))::regclass
|
||||
ORDER BY schemaname,tablename)
|
||||
|
||||
SELECT * FROM TableViewDescription;
|
||||
"""
|
||||
|
||||
schemaname_list_ref = """SELECT schemaname,tablename from pg_catalog.pg_tables
|
||||
WHERE schemaname NOT LIKE '_archives' AND schemaname NOT LIKE 'topology' AND schemaname NOT LIKE 'information_schema' AND schemaname NOT LIKE 'pg_catalog' and schemaname NOT LIKE 'public' AND schemaname NOT LIKE '_trier'
|
||||
order by schemaname,tablename;"""
|
||||
schemaname_list = """(SELECT schemaname,tablename from pg_catalog.pg_tables
|
||||
where schemaname like 'trav%' or schemaname like '\\_ag%' or schemaname like '\\_00%' or schemaname like '\\_01%' or schemaname like '\\_07%' or schemaname like '\\_26%' or schemaname like '\\_form%' or schemaname like '\\_42%' or schemaname like '\\_69%' order by schemaname,tablename)
|
||||
UNION
|
||||
(SELECT schemaname,matviewname AS tablename FROM pg_catalog.pg_matviews order by schemaname,tablename) order by schemaname,tablename;"""
|
||||
geom = "geom"
|
||||
champ_travaux_prevus_multipolygon = """(gid serial NOT NULL, groupe_gestion text, gestion_lib text, id_gestion text, datedebut date, datefin date, commentaire text, surface_m2 double precision, surface_ha double precision, date_creation date, date_maj date, geom geometry(MultiPolygon,2154))"""
|
||||
champ_travaux_prevus_multilinestring = """(gid serial NOT NULL, groupe_gestion text, gestion_lib text, id_gestion text, datedebut date, datefin date, commentaire text, longueur_m double precision, longueur_km double precision, date_creation date, date_maj date, geom geometry(MultiLineString,2154))"""
|
||||
|
||||
@ -50,9 +50,9 @@
|
||||
<tags>cenra,sicen</tags>
|
||||
</pyqgis_plugin>
|
||||
|
||||
<pyqgis_plugin name="CenRa_FLUX" version="3.20">
|
||||
<pyqgis_plugin name="CenRa_FLUX" version="3.18">
|
||||
<description>Depot pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.</description>
|
||||
<version>3.20</version>
|
||||
<version>3.18</version>
|
||||
<qgis_minimum_version>3.16</qgis_minimum_version>
|
||||
<homepage>https://plateformesig.cenra-outils.org/</homepage>
|
||||
<file_name>CenRa_FLUX.zip</file_name>
|
||||
@ -61,7 +61,7 @@
|
||||
<download_url>https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/CenRa_FLUX.zip</download_url>
|
||||
<uploaded_by>CEN-Rhone-Alpes</uploaded_by>
|
||||
<create_date>2024-02-06</create_date>
|
||||
<update_date>2026-03-05</update_date>
|
||||
<update_date>2026-02-25</update_date>
|
||||
<experimental>False</experimental>
|
||||
<deprecated>False</deprecated>
|
||||
<tags>cenra,flux</tags>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user