changes to the processing

This commit is contained in:
2026-09-07 22:49:53 +02:00
parent 6ae75e9b84
commit a0fa6bcc7a
2 changed files with 17 additions and 11 deletions
+7 -1
View File
@@ -2442,7 +2442,13 @@ def booking_payment():
packages_str = _sanitize_text(request.values.get("packages") or request.values.get("package") or "", 200).lower() packages_str = _sanitize_text(request.values.get("packages") or request.values.get("package") or "", 200).lower()
booking_flow = _sanitize_text(request.values.get("flow") or "payment", 24).lower() booking_flow = _sanitize_text(request.values.get("flow") or "payment", 24).lower()
is_trial = booking_flow in {"trial", "testversion"} or request.values.get("testversion", "").strip().lower() in {"1", "on", "true", "yes"} requested_trial = request.values.get("testversion", "").strip().lower() in {"1", "on", "true", "yes"}
package_requests_trial = "testversion" in {
package.strip().lower()
for package in packages_str.split(",")
if package.strip()
}
is_trial = booking_flow in {"trial", "testversion"} or requested_trial or package_requests_trial
trial_days = int(request.values.get("trial_days") or 14) trial_days = int(request.values.get("trial_days") or 14)
if booking_flow not in BOOKING_FLOW_MAP and booking_flow != "trial": if booking_flow not in BOOKING_FLOW_MAP and booking_flow != "trial":
+10 -10
View File
@@ -304,6 +304,7 @@
<form id="checkout-form" method="POST" action="{{ url_for('booking_payment') }}"> <form id="checkout-form" method="POST" action="{{ url_for('booking_payment') }}">
<input type="hidden" name="package" value="{{ package_key }}"> <input type="hidden" name="package" value="{{ package_key }}">
<input type="hidden" name="flow" value="{{ flow }}">
<div class="booking-review__form-grid"> <div class="booking-review__form-grid">
<div class="booking-review__section-title">1. Angaben zur Schule & Ansprechpartner</div> <div class="booking-review__section-title">1. Angaben zur Schule & Ansprechpartner</div>
@@ -524,17 +525,16 @@
let backendData = null; // Speichert das finale Backend-Resultat let backendData = null; // Speichert das finale Backend-Resultat
let isFailed = false; let isFailed = false;
// Echte Log-Meldungen, die exakt alle 10 Sekunden durchgeschaltet werden
const statusSteps = [ const statusSteps = [
{ atMs: 0, msg: "[INFO] Verarbeite Trigger: Starte Provisionierung für " + slug + "..." }, { atMs: 0, msg: "[INFO] Processing trigger: Starting deployment for " + slug + "..." },
{ atMs: 10000, msg: "[INFO] Prüfe freie Ports... Verwende Port 10004 für Tenant " + slug }, { atMs: 10000, msg: "[INFO] Checking available resources and allocating network ports..." },
{ atMs: 20000, msg: "Requesting a certificate for " + slug + ".invario-software.de..." }, { atMs: 20000, msg: "[INFO] Requesting security certificate for " + slug + "..." },
{ atMs: 30000, msg: "Successfully deployed certificate to Nginx. Restarting app container..." }, { atMs: 30000, msg: "[INFO] Deploying certificate to proxy layer. Restarting service..." },
{ atMs: 40000, msg: "Container inventarsystem-app-1 Recreated. Waiting for MongoDB/Redis..." }, { atMs: 40000, msg: "[INFO] Service containers recreated. Waiting for backend dependencies..." },
{ atMs: 50000, msg: "Initializing database for " + slug + "... Default admin created." }, { atMs: 50000, msg: "[INFO] Initializing storage for " + slug + "... Default admin created." },
{ atMs: 60000, msg: "Module configurations updated successfully (library=on)..." }, { atMs: 60000, msg: "[INFO] Configurations updated successfully..." },
{ atMs: 70000, msg: "Rebuilding and/or restarting app container using docker-compose..." }, { atMs: 70000, msg: "[INFO] Rebuilding and restarting application stack..." },
{ atMs: 80000, msg: "[INFO] Bereinige verwaiste App-Container. Cleaning up old temporary files..." } { atMs: 80000, msg: "[INFO] Cleaning up temporary files and orphan processes..." }
]; ];
// 1. Hintergrund-Polling: Fragt den echten Status ab, OHNE die UI abzubrechen // 1. Hintergrund-Polling: Fragt den echten Status ab, OHNE die UI abzubrechen