Per-backend log labels: show Gitea Actions text on waiting/failure pages and footer
This commit is contained in:
@@ -93,6 +93,11 @@ class GithubRun(models.Model):
|
||||
return get_backend(self.backend or 'github').log_url(self.github_run_id)
|
||||
return ""
|
||||
|
||||
@property
|
||||
def backend_label(self):
|
||||
"""任务所属构建平台的展示名(用于日志链接等文案)。"""
|
||||
return "Gitea Actions" if (self.backend or "github") == "gitea" else "GitHub Actions"
|
||||
|
||||
def short_uuid(self):
|
||||
return self.uuid[:8] if len(self.uuid) >= 8 else self.uuid
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
</main>
|
||||
|
||||
<footer class="footer">
|
||||
RustDesk 客户端定制平台 · 自定义客户端由 GitHub Actions 自动构建
|
||||
RustDesk 客户端定制平台 · 自定义客户端由 {{ build_platform_label|default:"GitHub" }} Actions 自动构建
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<div class="info-box" style="text-align:left">
|
||||
<strong>构建过程异常终止,部分安装包可能并未生成。</strong><br>
|
||||
你可以先尝试下载下方已经产出的文件(不存在的文件将提示 404),或查看 GitHub Actions 日志定位原因后重新提交构建。
|
||||
你可以先尝试下载下方已经产出的文件(不存在的文件将提示 404),或查看 {{ backend_label }} 日志定位原因后重新提交构建。
|
||||
</div>
|
||||
|
||||
<div class="download-list">
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<p style="margin-top:22px">
|
||||
{% if log_url %}
|
||||
<a href="{{ log_url }}" target="_blank" rel="noopener"><svg class="icon"><use href="#i-external"/></svg> 查看 GitHub Actions 日志,了解具体失败原因</a>
|
||||
<a href="{{ log_url }}" target="_blank" rel="noopener"><svg class="icon"><use href="#i-external"/></svg> 查看 {{ backend_label }} 日志,了解具体失败原因</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{% block content %}
|
||||
<div class="page-head">
|
||||
<h1 class="page-title">定制 RustDesk 客户端</h1>
|
||||
<p class="page-subtitle">填写以下配置并提交,系统将通过 GitHub Actions 自动构建专属客户端,通常需要 30~45 分钟,可在「我的构建」中随时查看进度。</p>
|
||||
<p class="page-subtitle">填写以下配置并提交,系统将通过 {{ build_platform_label|default:"GitHub" }} Actions 自动构建专属客户端,通常需要 30~45 分钟,可在「我的构建」中随时查看进度。</p>
|
||||
</div>
|
||||
|
||||
<form id="myForm" action="/generator" method="post" enctype="multipart/form-data">
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
{% if log_url %}
|
||||
<div style="margin-top:8px">
|
||||
<a href="{{ log_url }}" target="_blank" rel="noopener">
|
||||
<svg class="icon"><use href="#i-external"/></svg> 技术排查:查看 GitHub Actions 构建日志
|
||||
<svg class="icon"><use href="#i-external"/></svg> 技术排查:查看 {{ backend_label }} 构建日志
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -427,7 +427,8 @@ def generator_view(request):
|
||||
'status_label': status_label,
|
||||
'status_badge': status_badge,
|
||||
'platform': result['platform'],
|
||||
'log_url': result['log_url']
|
||||
'log_url': result['log_url'],
|
||||
'backend_label': result['run'].backend_label,
|
||||
})
|
||||
else:
|
||||
messages.error(request, result['error'])
|
||||
@@ -471,6 +472,7 @@ def check_for_file(request):
|
||||
'status_label': status_label,
|
||||
'status_badge': status_badge,
|
||||
'log_url': github_log_url,
|
||||
'backend_label': gh_run.backend_label,
|
||||
}
|
||||
|
||||
if gh_run.status == "success":
|
||||
|
||||
Reference in New Issue
Block a user