|
@@ -172,8 +172,13 @@ def overview():
|
|
|
# --- Vue par job : pivot de locations → jobs ---
|
|
# --- Vue par job : pivot de locations → jobs ---
|
|
|
jobs_view = []
|
|
jobs_view = []
|
|
|
for job in jobs:
|
|
for job in jobs:
|
|
|
|
|
+ allowed = {(jd.dest_type, jd.dest_id) for jd in job.job_destinations}
|
|
|
jlocs = []
|
|
jlocs = []
|
|
|
for loc in locations:
|
|
for loc in locations:
|
|
|
|
|
+ if loc["type"] == "ssh" and ("ssh", loc.get("dest_id")) not in allowed:
|
|
|
|
|
+ continue
|
|
|
|
|
+ if loc["type"] == "instance" and ("instance", loc.get("instance_id")) not in allowed:
|
|
|
|
|
+ continue
|
|
|
group = next((g for g in loc.get("groups", []) if g["job"].id == job.id), None)
|
|
group = next((g for g in loc.get("groups", []) if g["job"].id == job.id), None)
|
|
|
jlocs.append({
|
|
jlocs.append({
|
|
|
"type": loc["type"],
|
|
"type": loc["type"],
|