Dateien nach "/" hochladen
This commit is contained in:
1 parent
d47d039331
commit
d304b93207
1 file changed
+27
-7
@@ -359,7 +359,7 @@ main{max-width:760px;margin:32px auto;padding:0 24px 48px}
|
|||||||
padding:28px;margin-bottom:24px;box-shadow:0 1px 2px rgba(0,0,0,.03);
|
padding:28px;margin-bottom:24px;box-shadow:0 1px 2px rgba(0,0,0,.03);
|
||||||
}
|
}
|
||||||
label{display:block;margin-top:16px;font-size:.85em;color:var(--ink-soft);font-weight:600}
|
label{display:block;margin-top:16px;font-size:.85em;color:var(--ink-soft);font-weight:600}
|
||||||
input[type=text],input[type=file]{
|
input[type=text],input[type=file],select{
|
||||||
width:100%;padding:11px 12px;margin-top:6px;border:1px solid var(--border);
|
width:100%;padding:11px 12px;margin-top:6px;border:1px solid var(--border);
|
||||||
border-radius:9px;font-size:.95em;background:#fbfcfd;
|
border-radius:9px;font-size:.95em;background:#fbfcfd;
|
||||||
}
|
}
|
||||||
@@ -439,12 +439,14 @@ a{color:var(--orange)}
|
|||||||
<input type="text" name="git_url" placeholder="https://git.obraasch.de/olli1986/mein-skill">
|
<input type="text" name="git_url" placeholder="https://git.obraasch.de/olli1986/mein-skill">
|
||||||
<label>...oder ZIP-Datei hochladen (max. 50 MB)</label>
|
<label>...oder ZIP-Datei hochladen (max. 50 MB)</label>
|
||||||
<input type="file" name="zip_file" accept=".zip">
|
<input type="file" name="zip_file" accept=".zip">
|
||||||
|
<label>Wie ausführlich soll das Ergebnis sein?</label>
|
||||||
|
<select name="report_level">
|
||||||
|
<option value="quick">Nur Einschätzung (Score, Empfehlung, Fund-Anzahl – am schnellsten)</option>
|
||||||
|
<option value="standard" selected>Bericht (alle Funde im Detail, rein lokal)</option>
|
||||||
{% if allow_llm %}
|
{% if allow_llm %}
|
||||||
<div class="checkbox-row">
|
<option value="full">Ausführlicher Bericht mit deutschen KI-Erklärungen (sendet Dateiinhalte extern)</option>
|
||||||
<input type="checkbox" name="use_llm" id="use_llm">
|
|
||||||
<label for="use_llm">Ausführlichen Bericht mit deutschen Erklärungen erstellen (nutzt KI über den konfigurierten Anbieter, sendet Dateiinhalte extern)</label>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</select>
|
||||||
<button type="submit">Scan starten</button>
|
<button type="submit">Scan starten</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -469,11 +471,22 @@ a{color:var(--orange)}
|
|||||||
<span class="score-num">{{ result.risk_assessment.score }}/100</span>
|
<span class="score-num">{{ result.risk_assessment.score }}/100</span>
|
||||||
<span class="badge {{ result.risk_assessment.recommendation }}">{{ result.risk_assessment.recommendation }}</span>
|
<span class="badge {{ result.risk_assessment.recommendation }}">{{ result.risk_assessment.recommendation }}</span>
|
||||||
</div>
|
</div>
|
||||||
{% if not issues_by_severity %}
|
{% if quick_mode %}
|
||||||
|
{% if issues_by_severity %}
|
||||||
|
<p class="notice">
|
||||||
|
{{ total_issues }} Fund(e) insgesamt —
|
||||||
|
{% for sev, items in issues_by_severity.items() %}{{ severity_labels.get(sev, sev) }}: {{ items|length }}{% if not loop.last %} · {% endif %}{% endfor %}
|
||||||
|
</p>
|
||||||
|
{% else %}
|
||||||
|
<p class="notice">Keine Funde.</p>
|
||||||
|
{% endif %}
|
||||||
|
<p class="notice">Für Details je Fund und die Komponenten-Übersicht "Bericht" oder "Ausführlicher Bericht" wählen.</p>
|
||||||
|
{% elif not issues_by_severity %}
|
||||||
<p class="notice">Keine Funde – das Ergebnis unten (Rohdaten) bestätigt das im Detail.</p>
|
<p class="notice">Keine Funde – das Ergebnis unten (Rohdaten) bestätigt das im Detail.</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% if not quick_mode %}
|
||||||
{% for severity, items in issues_by_severity.items() %}
|
{% for severity, items in issues_by_severity.items() %}
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h3 class="sev-heading sev-{{ severity }}">{{ severity_labels.get(severity, severity) }} ({{ items|length }})</h3>
|
<h3 class="sev-heading sev-{{ severity }}">{{ severity_labels.get(severity, severity) }} ({{ items|length }})</h3>
|
||||||
@@ -512,6 +525,7 @@ a{color:var(--orange)}
|
|||||||
<summary>Rohdaten (vollständiges JSON)</summary>
|
<summary>Rohdaten (vollständiges JSON)</summary>
|
||||||
<pre>{{ result_json }}</pre>
|
<pre>{{ result_json }}</pre>
|
||||||
</details>
|
</details>
|
||||||
|
{% endif %}
|
||||||
{% elif error %}
|
{% elif error %}
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<p class="err">{{ error }}</p>
|
<p class="err">{{ error }}</p>
|
||||||
@@ -544,7 +558,11 @@ def index():
|
|||||||
error=f"Limit erreicht: maximal {MAX_SCANS_PER_HOUR_PER_IP} Scans pro Stunde und IP. Bitte später erneut versuchen.",
|
error=f"Limit erreicht: maximal {MAX_SCANS_PER_HOUR_PER_IP} Scans pro Stunde und IP. Bitte später erneut versuchen.",
|
||||||
)
|
)
|
||||||
|
|
||||||
use_llm = ALLOW_LLM and request.form.get("use_llm") == "on"
|
report_level = request.form.get("report_level", "standard")
|
||||||
|
if report_level not in ("quick", "standard", "full"):
|
||||||
|
report_level = "standard"
|
||||||
|
use_llm = ALLOW_LLM and report_level == "full"
|
||||||
|
quick_mode = report_level == "quick"
|
||||||
git_url = (request.form.get("git_url") or "").strip()
|
git_url = (request.form.get("git_url") or "").strip()
|
||||||
zip_file = request.files.get("zip_file")
|
zip_file = request.files.get("zip_file")
|
||||||
|
|
||||||
@@ -612,6 +630,8 @@ def index():
|
|||||||
allow_llm=ALLOW_LLM,
|
allow_llm=ALLOW_LLM,
|
||||||
result=result,
|
result=result,
|
||||||
issues_by_severity=normalize_issues(raw_issues),
|
issues_by_severity=normalize_issues(raw_issues),
|
||||||
|
total_issues=len(raw_issues),
|
||||||
|
quick_mode=quick_mode,
|
||||||
components=normalize_components(result.get("components", [])),
|
components=normalize_components(result.get("components", [])),
|
||||||
severity_labels=SEVERITY_LABELS_DE,
|
severity_labels=SEVERITY_LABELS_DE,
|
||||||
summary_paragraphs=[p for p in (summary_text or "").split("\n\n") if p.strip()],
|
summary_paragraphs=[p for p in (summary_text or "").split("\n\n") if p.strip()],
|
||||||
|
|||||||
Reference in new issue
Block a user