feat: add edit job configuration page and job detail view templates

This commit is contained in:
Rizqi 2026-06-23 01:05:05 +07:00
parent eace735a41
commit a8a99f3b20
2 changed files with 10 additions and 9 deletions

View File

@ -470,13 +470,22 @@
</div>
<div class="action-bar">
<button class="btn btn-danger" type="submit" form="deleteForm" style="margin-right: auto;">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" style="margin-right: 6px; vertical-align: middle;"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>
Delete Job
</button>
<a href="/job/{{ job.id }}" class="btn btn-ghost">Cancel</a>
<button type="submit" id="submitBtn" class="btn btn-primary">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" style="margin-right: 6px; vertical-align: middle;"><polyline points="20 6 9 17 4 12"/></svg>
Save Changes
</button>
<a href="/job/{{ job.id }}" class="btn btn-ghost">Cancel</a>
</div>
</form>
<form id="deleteForm" method="post" action="/job/{{ job.id }}/delete"
onsubmit="return confirm('Are you sure you want to delete this job? This will cancel any active schedule and delete the job logs.')">
</form>
</div>
</div>
{% endblock %}

View File

@ -154,14 +154,6 @@
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" style="margin-right: 4px;"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/></svg>
Edit Job
</a>
<form method="post" action="/job/{{ job.id }}/delete"
style="margin: 0;"
onsubmit="return confirm('Are you sure you want to delete this job? This will cancel any active schedule and delete the job logs.')">
<button class="btn btn-danger btn-sm" type="submit">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" style="margin-right: 4px;"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>
Delete
</button>
</form>
{% endif %}
{% if job.status == 'running' or job.status == 'queued' %}
<form method="post" action="/job/{{ job.id }}/stop"