forked from JulieChv/Analyse_Reseaux
ajout doc + correction
This commit is contained in:
26
main.py
26
main.py
@@ -58,9 +58,10 @@ def bootstrap_venv():
|
||||
|
||||
def relaunch_in_venv():
|
||||
print("[INFO] Relance du script dans le venv…")
|
||||
script_path = os.path.abspath(__file__)
|
||||
subprocess.check_call([
|
||||
venv_python(),
|
||||
__file__
|
||||
script_path
|
||||
])
|
||||
sys.exit(0)
|
||||
|
||||
@@ -68,14 +69,30 @@ def relaunch_in_venv():
|
||||
def open_main_gui():
|
||||
root = tk.Tk()
|
||||
root.title("Analyse Réseau")
|
||||
root.geometry("650x350")
|
||||
root.geometry("650x500")
|
||||
root.resizable(True, True)
|
||||
|
||||
header_frame = tk.Frame(root)
|
||||
header_frame.pack(fill="x", pady=10, padx=10)
|
||||
|
||||
logo_path = os.path.join(BASE_DIR, "Computacenter_logo.png")
|
||||
if os.path.isfile(logo_path):
|
||||
try:
|
||||
logo_img = tk.PhotoImage(file=logo_path)
|
||||
|
||||
logo_img = logo_img.subsample(15, 15)
|
||||
|
||||
logo_label = tk.Label(header_frame, image=logo_img)
|
||||
logo_label.image = logo_img
|
||||
logo_label.pack(side="right")
|
||||
except Exception as e:
|
||||
print(f"[WARN] Impossible de charger le logo : {e}")
|
||||
|
||||
ttk.Label(
|
||||
root,
|
||||
text="Analyse Réseau",
|
||||
font=("Arial", 16, "bold")
|
||||
).pack(pady=20)
|
||||
).pack(pady=(0, 20))
|
||||
|
||||
ttk.Label(
|
||||
root,
|
||||
@@ -94,7 +111,8 @@ def open_main_gui():
|
||||
root,
|
||||
text="(Convertir les données au format normalisé Yang dans un fichier JSON)" \
|
||||
"\n + possibilité de générer une matrice de flux en Excel" \
|
||||
"\n + possibilité de générer une matrice de routage en Excel (route statique uniquement)",
|
||||
"\n + possibilité de générer une matrice de routage en Excel (route statique uniquement)" \
|
||||
"\n + possibilité de générer un rapport des interfaces en Excel",
|
||||
font=("Arial", 9, "italic"),
|
||||
anchor="center",
|
||||
justify="center"
|
||||
|
||||
Reference in New Issue
Block a user