Username/Password fields on analyse repo mask

This commit is contained in:
2026-04-28 00:21:03 +02:00
parent 345aeaf353
commit 64be789b13
5 changed files with 32 additions and 3 deletions

View File

@@ -480,7 +480,12 @@ def repository_detail(
<h2>Run Analysis</h2>
<form class="stack" method="post" action="/ui/repos/{repository_id}/analysis-runs">
<label>Override source path <input name="source_path" placeholder="Optional local path"></label>
<button type="submit">Analyze</button>
<label>Username <input name="access_username" autocomplete="username" placeholder="Optional for private HTTP(S) repos"></label>
<label>Password or access token <input name="access_password" type="password" autocomplete="current-password" placeholder="Used for this Git operation only"></label>
<div class="actions">
<button type="submit">Analyze</button>
<span data-pending>Running analysis...</span>
</div>
</form>
<h2>Analysis Runs</h2>
<table>
@@ -795,11 +800,15 @@ def delete_evidence_from_form(
def create_analysis_run_from_form(
repository_id: int,
source_path: str = Form(""),
access_username: str = Form(""),
access_password: str = Form(""),
service: RegistryService = Depends(get_service),
) -> RedirectResponse:
summary = service.analyze_repository(
repository_id,
source_path=source_path or None,
access_username=access_username or None,
access_password=access_password or None,
)
return RedirectResponse(
f"/ui/repos/{repository_id}/analysis-runs/{summary.analysis_run.id}",