new testarena

This commit is contained in:
2025-11-28 11:22:07 +01:00
parent 22f7f2f94d
commit fb26b8386b
48 changed files with 7105 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
{% extends "base.html" %}
{% block title %}Submit Test Job - ASF TestArena{% endblock %}
{% block content %}
<div class="submit-container">
<h2 style="margin-bottom: 30px; color: var(--dark);">Submit New Test Job</h2>
<div class="step-indicator">
<div class="step active">
<div class="step-number">1</div>
<div class="step-label">Branch</div>
</div>
<div class="step">
<div class="step-number">2</div>
<div class="step-label">Scenarios</div>
</div>
<div class="step">
<div class="step-number">3</div>
<div class="step-label">Environment</div>
</div>
<div class="step">
<div class="step-number">4</div>
<div class="step-label">Test Mode</div>
</div>
<div class="step">
<div class="step-number">5</div>
<div class="step-label">Review</div>
</div>
</div>
<form method="POST" action="{{ url_for('jobs.submit_step1') }}">
<div class="form-group">
<label for="branch_name">Git Branch Name</label>
<input type="text" id="branch_name" name="branch_name" class="form-control"
placeholder="e.g., feature/new-feature" required>
<small style="color: #6b7280; margin-top: 5px; display: block;">
Enter the branch name to analyze available test scenarios
</small>
</div>
<div class="form-actions">
<a href="{{ url_for('dashboard.index') }}" class="btn" style="background: #6b7280; color: white;">Cancel</a>
<button type="submit" class="btn btn-primary">Next</button>
</div>
</form>
</div>
{% endblock %}

View File

@@ -0,0 +1,68 @@
{% extends "base.html" %}
{% block title %}Select Scenarios - ASF TestArena{% endblock %}
{% block content %}
<div class="submit-container">
<h2 style="margin-bottom: 30px; color: var(--dark);">Select Test Scenarios</h2>
<div class="step-indicator">
<div class="step completed">
<div class="step-number"></div>
<div class="step-label">Branch</div>
</div>
<div class="step active">
<div class="step-number">2</div>
<div class="step-label">Scenarios</div>
</div>
<div class="step">
<div class="step-number">3</div>
<div class="step-label">Environment</div>
</div>
<div class="step">
<div class="step-number">4</div>
<div class="step-label">Test Mode</div>
</div>
<div class="step">
<div class="step-number">5</div>
<div class="step-label">Review</div>
</div>
</div>
<div style="background: #eff6ff; padding: 15px; border-radius: 8px; margin-bottom: 20px;">
<strong>Branch:</strong> {{ branch_name }}
</div>
<form method="POST" action="{{ url_for('jobs.submit_step2') }}">
<input type="hidden" name="branch_name" value="{{ branch_name }}">
<div class="form-group">
<label>
<input type="checkbox" id="selectAll" onclick="toggleAll(this)">
Select All Scenarios
</label>
</div>
<div class="checkbox-group">
{% for scenario in scenarios %}
<div class="checkbox-item">
<input type="checkbox" name="scenarios" value="{{ scenario }}" id="scenario_{{ loop.index }}">
<label for="scenario_{{ loop.index }}">{{ scenario }}</label>
</div>
{% endfor %}
</div>
<div class="form-actions">
<a href="{{ url_for('jobs.submit') }}" class="btn" style="background: #6b7280; color: white;">Back</a>
<button type="submit" class="btn btn-primary">Next</button>
</div>
</form>
</div>
<script>
function toggleAll(checkbox) {
const checkboxes = document.querySelectorAll('input[name="scenarios"]');
checkboxes.forEach(cb => cb.checked = checkbox.checked);
}
</script>
{% endblock %}

View File

@@ -0,0 +1,60 @@
{% extends "base.html" %}
{% block title %}Select Environment - ASF TestArena{% endblock %}
{% block content %}
<div class="submit-container">
<h2 style="margin-bottom: 30px; color: var(--dark);">Select Environment</h2>
<div class="step-indicator">
<div class="step completed">
<div class="step-number"></div>
<div class="step-label">Branch</div>
</div>
<div class="step completed">
<div class="step-number"></div>
<div class="step-label">Scenarios</div>
</div>
<div class="step active">
<div class="step-number">3</div>
<div class="step-label">Environment</div>
</div>
<div class="step">
<div class="step-number">4</div>
<div class="step-label">Test Mode</div>
</div>
<div class="step">
<div class="step-number">5</div>
<div class="step-label">Review</div>
</div>
</div>
<form method="POST" action="{{ url_for('jobs.submit_step3') }}">
<input type="hidden" name="branch_name" value="{{ branch_name }}">
<input type="hidden" name="scenarios" value="{{ scenarios|tojson }}">
<div class="radio-group">
<label class="radio-item">
<input type="radio" name="environment" value="sensor_hub" required>
<div>
<strong>Sensor Hub</strong>
<p style="font-size: 12px; color: #6b7280; margin-top: 4px;">Test on sensor hub hardware/simulator</p>
</div>
</label>
<label class="radio-item">
<input type="radio" name="environment" value="main_board" required>
<div>
<strong>Main Board</strong>
<p style="font-size: 12px; color: #6b7280; margin-top: 4px;">Test on main board hardware/simulator</p>
</div>
</label>
</div>
<div class="form-actions">
<button type="button" class="btn" style="background: #6b7280; color: white;" onclick="history.back()">Back</button>
<button type="submit" class="btn btn-primary">Next</button>
</div>
</form>
</div>
{% endblock %}

View File

@@ -0,0 +1,79 @@
{% extends "base.html" %}
{% block title %}Select Test Mode - ASF TestArena{% endblock %}
{% block content %}
<div class="submit-container">
<h2 style="margin-bottom: 30px; color: var(--dark);">Select Test Mode</h2>
<div class="step-indicator">
<div class="step completed">
<div class="step-number"></div>
<div class="step-label">Branch</div>
</div>
<div class="step completed">
<div class="step-number"></div>
<div class="step-label">Scenarios</div>
</div>
<div class="step completed">
<div class="step-number"></div>
<div class="step-label">Environment</div>
</div>
<div class="step active">
<div class="step-number">4</div>
<div class="step-label">Test Mode</div>
</div>
<div class="step">
<div class="step-number">5</div>
<div class="step-label">Review</div>
</div>
</div>
<form method="POST" action="{{ url_for('jobs.submit_final') }}">
<input type="hidden" name="branch_name" value="{{ branch_name }}">
<input type="hidden" name="scenarios" value="{{ scenarios }}">
<input type="hidden" name="environment" value="{{ environment }}">
<div class="radio-group">
<label class="radio-item">
<input type="radio" name="test_mode" value="devbench_simulator" required>
<div>
<strong>Devbench Simulator</strong>
<p style="font-size: 12px; color: #6b7280; margin-top: 4px;">Fully simulated environment</p>
</div>
</label>
<label class="radio-item">
<input type="radio" name="test_mode" value="testbench_hil" required>
<div>
<strong>Testbench HIL</strong>
<p style="font-size: 12px; color: #6b7280; margin-top: 4px;">Hardware-in-the-Loop with real devices</p>
</div>
</label>
</div>
<div class="form-group" style="margin-top: 30px;">
<h3 style="margin-bottom: 15px; color: var(--dark);">Additional Options</h3>
<div style="margin-bottom: 10px;">
<label>
<input type="checkbox" name="keep_devbenches">
Keep devbenches after test completion
</label>
</div>
<div>
<label>
<input type="checkbox" name="reuse_results">
Reuse previous test results if available
</label>
</div>
</div>
<div class="form-actions">
<button type="button" class="btn" style="background: #6b7280; color: white;" onclick="history.back()">Back</button>
<button type="submit" class="btn btn-success">Start Test</button>
</div>
</form>
</div>
{% endblock %}