feat: enhance apply logs and config versions features

- Add detailed diff reporting for OpenResty options in TestPreviewAndDiffConfigVersion.
- Update ApplyLogsPage to display additional log details including checksums and support file counts.
- Introduce ConfigVersionSnapshotModal for viewing configuration snapshots.
- Refactor config versions page to utilize new snapshot modal and improve option diff display.
- Extend ApplyLogItem type to include checksums and support file count.
- Enhance NodeDetailPage to show target version details and checksums.
This commit is contained in:
ryan
2026-03-12 22:49:18 +08:00
parent 4c0466a92b
commit 594057be06
13 changed files with 618 additions and 234 deletions
+15
View File
@@ -221,6 +221,21 @@ func TestPreviewAndDiffConfigVersion(t *testing.T) {
if len(diff.ChangedOptionKeys) == 0 || diff.ChangedOptionKeys[0] == "" {
t.Fatal("expected changed OpenResty option keys to be reported")
}
if len(diff.ChangedOptionDetails) == 0 {
t.Fatal("expected changed OpenResty option details to be reported")
}
found := false
for _, item := range diff.ChangedOptionDetails {
if item.Key == "OpenRestyProxyReadTimeout" {
found = true
if item.PreviousValue != "60" || item.CurrentValue != "120" {
t.Fatalf("unexpected option diff values: %+v", item)
}
}
}
if !found {
t.Fatal("expected OpenRestyProxyReadTimeout diff detail")
}
}
func TestCreateTLSCertificateRejectsInvalidPEM(t *testing.T) {