Rename last good config in UI
This commit is contained in:
parent
468db800cd
commit
94c945bc19
@ -120,7 +120,7 @@
|
||||
<div class="muted small mono" style="margin-top:6px">sha: {{shortHash .ConfigStatus.Sha256}}</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="muted small">last_good</div>
|
||||
<div class="muted small">上一份配置</div>
|
||||
<div class="mono">{{if and .ConfigStatus.LastGood .ConfigStatus.LastGood.Exists .ConfigStatus.LastGood.Metadata.ConfigID}}{{.ConfigStatus.LastGood.Metadata.ConfigID}} / {{if .ConfigStatus.LastGood.Metadata.ConfigVersion}}{{.ConfigStatus.LastGood.Metadata.ConfigVersion}}{{else}}未标记{{end}}{{else}}-{{end}}</div>
|
||||
<div class="muted small mono" style="margin-top:6px">{{if and .ConfigStatus.LastGood .ConfigStatus.LastGood.Metadata.Overlays}}{{range $i, $name := .ConfigStatus.LastGood.Metadata.Overlays}}{{if $i}}, {{end}}{{$name}}{{end}}{{else}}-{{end}}</div>
|
||||
<div class="muted small mono" style="margin-top:6px">sha: {{if .ConfigStatus.LastGood}}{{shortHash .ConfigStatus.LastGood.Sha256}}{{end}}</div>
|
||||
@ -135,7 +135,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{{if and .ConfigStatus.LastGood .ConfigStatus.Sha256 .ConfigStatus.LastGood.Sha256 (eq .ConfigStatus.Metadata.ConfigID .ConfigStatus.LastGood.Metadata.ConfigID) (eq .ConfigStatus.Metadata.ConfigVersion .ConfigStatus.LastGood.Metadata.ConfigVersion) (ne .ConfigStatus.Sha256 .ConfigStatus.LastGood.Sha256)}}
|
||||
<div class="muted small" style="margin-top:10px">当前运行与 last_good 的 <span class="mono">config_id/config_version</span> 相同,但文件内容不同,请以 <span class="mono">overlay</span> 和 <span class="mono">sha</span> 为准。</div>
|
||||
<div class="muted small" style="margin-top:10px">当前运行与上一份配置回滚点的 <span class="mono">config_id/config_version</span> 相同,但文件内容不同,请以 <span class="mono">overlay</span> 和 <span class="mono">sha</span> 为准。</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
@ -562,7 +562,7 @@ func TestUI_ConfigPreviewShowsApplySummaryAfterApplyResult(t *testing.T) {
|
||||
"应用结果摘要",
|
||||
"当前运行",
|
||||
"preview_edge-01 / v2",
|
||||
"last_good",
|
||||
"上一份配置",
|
||||
"local_3588_face_debug / 20260419.120246",
|
||||
"face_test_sensitive, production_quiet",
|
||||
"face_debug",
|
||||
@ -697,6 +697,7 @@ func TestUI_ActionDeviceConfigCandidateApplyReloadsStatusAfterApply(t *testing.T
|
||||
"local_3588_face_debug / 20260419.120246",
|
||||
"已清空",
|
||||
"运行中",
|
||||
"上一份配置",
|
||||
} {
|
||||
if !strings.Contains(body, want) {
|
||||
t.Fatalf("expected apply result HTML to contain %q, got:\n%s", want, body)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user