diff --git a/rdgenerator/static/rdgenerator/css/app.css b/rdgenerator/static/rdgenerator/css/app.css index 714bf6f..85c448f 100644 --- a/rdgenerator/static/rdgenerator/css/app.css +++ b/rdgenerator/static/rdgenerator/css/app.css @@ -396,6 +396,14 @@ input[type="file"].form-control::-webkit-file-upload-button { .btn-row { display: flex; gap: 10px; flex-wrap: wrap; } .inline-form { display: inline-flex; vertical-align: middle; } .table .btn + .btn, .table .btn + .inline-form { margin-left: 8px; } +/* 表格操作列:按钮数量随任务状态变化,用单一 flex 容器统一间距与换行, + 避免各行 2~4 个按钮时排列参差 */ +.col-actions { min-width: 168px; } +.table .row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; } +.table .row-actions > .btn, +.table .row-actions > .inline-form { margin-left: 0; } +.table .row-actions .inline-form { margin: 0; } +.table .row-actions .btn { white-space: nowrap; } /* ===== 平台选择卡 ===== */ .platform-grid { diff --git a/rdgenerator/templates/dashboard.html b/rdgenerator/templates/dashboard.html index 238f479..c6a685d 100644 --- a/rdgenerator/templates/dashboard.html +++ b/rdgenerator/templates/dashboard.html @@ -49,7 +49,8 @@ {{ run.platform_label }} {{ run.status_label }} {{ run.short_uuid }} - + +
查看
删除 +
{% endfor %} diff --git a/rdgenerator/templates/my_builds.html b/rdgenerator/templates/my_builds.html index 3ea0ba2..adeea8c 100644 --- a/rdgenerator/templates/my_builds.html +++ b/rdgenerator/templates/my_builds.html @@ -32,7 +32,8 @@ {{ run.backend_label }} {{ run.status_label }} {{ run.short_uuid }} - + +
{% if run.status == 'success' %} 下载产物{% elif run.is_finished %} 查看详情{% else %} 查看进度{% endif %} @@ -42,7 +43,7 @@ 日志 {% endif %} - {% if run.is_finished and run.config_data %} + {% if run.is_finished and run.status != 'success' and run.config_data %}
{% csrf_token %} @@ -69,6 +70,7 @@
{% endif %} +
{% endfor %} diff --git a/rdgenerator/web_views.py b/rdgenerator/web_views.py index c37c7ab..1a4ec5e 100644 --- a/rdgenerator/web_views.py +++ b/rdgenerator/web_views.py @@ -93,6 +93,9 @@ def retry_build(request, run_id): if not run.is_finished(): messages.error(request, "该任务尚未结束,无需重试。") return redirect('my_builds') + if run.status == 'success': + messages.info(request, "该任务已构建成功,请直接下载产物;如需重新生成请重新提交配置。") + return redirect('my_builds') if not run.config_data: messages.error(request, "该任务提交时未保存配置快照(较早的历史任务),无法一键重试,请重新填写配置后提交。") return redirect('my_builds')