构建列表操作按钮修正:成功任务不再显示重试,统一操作列排版
- 成功状态的构建记录不再显示「重试」按钮,仅保留下载产物/日志/删除; 失败、取消、超时仍保留一键重试(线上核对确认仅新快照成功任务误显示) - retry_build 后端增加 success 状态拦截,防止绕过页面直接 POST - 操作列改为统一 flex 容器(flex-wrap + gap),按钮数量随状态变化时 间距一致、左对齐、窄屏自动换行;后台任务管理页同款统一
This commit is contained in:
@@ -49,7 +49,8 @@
|
||||
<td>{{ run.platform_label }}</td>
|
||||
<td><span class="badge {{ run.status_badge }} {% if not run.is_finished %}badge-dot{% endif %}">{{ run.status_label }}</span></td>
|
||||
<td class="mono text-muted">{{ run.short_uuid }}</td>
|
||||
<td style="white-space:nowrap">
|
||||
<td class="col-actions">
|
||||
<div class="row-actions">
|
||||
<a class="btn btn-secondary btn-sm"
|
||||
href="/check_for_file?filename={{ run.filename|urlencode }}&uuid={{ run.uuid|urlencode }}&platform={{ run.platform|urlencode }}">查看</a>
|
||||
<form method="post" class="inline-form" action="{% url 'delete_build' run.id %}"
|
||||
@@ -59,6 +60,7 @@
|
||||
<svg class="icon"><use href="#i-trash"/></svg> 删除
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
<td><span class="badge {{ run.backend_badge_class }}">{{ run.backend_label }}</span></td>
|
||||
<td><span class="badge {{ run.status_badge }} {% if not run.is_finished %}badge-dot{% endif %}">{{ run.status_label }}</span></td>
|
||||
<td class="mono text-muted">{{ run.short_uuid }}</td>
|
||||
<td style="white-space:nowrap">
|
||||
<td class="col-actions">
|
||||
<div class="row-actions">
|
||||
<a class="btn btn-secondary btn-sm"
|
||||
href="/check_for_file?filename={{ run.filename|urlencode }}&uuid={{ run.uuid|urlencode }}&platform={{ run.platform|urlencode }}">
|
||||
{% if run.status == 'success' %}<svg class="icon"><use href="#i-download"/></svg> 下载产物{% elif run.is_finished %}<svg class="icon"><use href="#i-eye"/></svg> 查看详情{% else %}<svg class="icon"><use href="#i-eye"/></svg> 查看进度{% endif %}
|
||||
@@ -42,7 +43,7 @@
|
||||
<svg class="icon"><use href="#i-external"/></svg> 日志
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if run.is_finished and run.config_data %}
|
||||
{% if run.is_finished and run.status != 'success' and run.config_data %}
|
||||
<form method="post" class="inline-form" action="{% url 'retry_build' run.id %}"
|
||||
onsubmit="return confirm('将使用该任务的原始配置重新提交一次构建(原任务记录保留),是否继续?');">
|
||||
{% csrf_token %}
|
||||
@@ -69,6 +70,7 @@
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user