fix(servers/edit + patching): dropdown 'Solution applicative' affiche TOUTES les applications (filtre 'WHERE itop_id IS NOT NULL' retire) - les apps locales sans correspondance iTop apparaissent maintenant

This commit is contained in:
Pierre & Lumière 2026-05-05 15:58:41 +02:00
parent 53144dcf43
commit 5a9e2f78d1
2 changed files with 3 additions and 3 deletions

View File

@ -98,7 +98,7 @@ async def config_exclusions_page(request: Request, db=Depends(get_db),
WHERE application_name IS NOT NULL AND application_name != '' WHERE application_name IS NOT NULL AND application_name != ''
GROUP BY application_name ORDER BY application_name""")).fetchall() GROUP BY application_name ORDER BY application_name""")).fetchall()
all_apps = db.execute(text("""SELECT id, nom_court FROM applications all_apps = db.execute(text("""SELECT id, nom_court FROM applications
WHERE itop_id IS NOT NULL ORDER BY nom_court""")).fetchall() ORDER BY nom_court""")).fetchall()
# Stats globales # Stats globales
stats = { stats = {
@ -346,7 +346,7 @@ async def correspondance_page(request: Request, db=Depends(get_db),
envs = db.execute(text("SELECT DISTINCT name FROM environments ORDER BY name")).fetchall() envs = db.execute(text("SELECT DISTINCT name FROM environments ORDER BY name")).fetchall()
domains = db.execute(text("SELECT DISTINCT name FROM domains ORDER BY name")).fetchall() domains = db.execute(text("SELECT DISTINCT name FROM domains ORDER BY name")).fetchall()
all_apps = db.execute(text("""SELECT id, nom_court FROM applications all_apps = db.execute(text("""SELECT id, nom_court FROM applications
WHERE itop_id IS NOT NULL ORDER BY nom_court""")).fetchall() ORDER BY nom_court""")).fetchall()
# Stats globales # Stats globales
stats = { stats = {

View File

@ -136,7 +136,7 @@ async def server_edit(request: Request, server_id: int, db=Depends(get_db)):
"SELECT name FROM zones ORDER BY name" "SELECT name FROM zones ORDER BY name"
)).fetchall() )).fetchall()
applications = db.execute(sqlt( applications = db.execute(sqlt(
"SELECT id, nom_court FROM applications WHERE itop_id IS NOT NULL ORDER BY nom_court" "SELECT id, nom_court FROM applications ORDER BY nom_court"
)).fetchall() )).fetchall()
return templates.TemplateResponse("partials/server_edit.html", { return templates.TemplateResponse("partials/server_edit.html", {
"request": request, "s": s, "domains": domains, "envs": envs, "ips": ips, "request": request, "s": s, "domains": domains, "envs": envs, "ips": ips,