fix(ui): fix credential profile field names and list response unwrapping

- credentialProfilesApi.list now unwraps {profiles: [...]} wrapper
- CredentialProfilesPage handles both array and wrapped responses
- Renamed privacy_protocol → priv_protocol to match backend schema
- Renamed privacy_passphrase → priv_passphrase to match backend
- Renamed security_name → username (SNMPv3 uses username field)
- Removed security_name from CredentialProfileCreate type

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jason Staack
2026-03-22 07:50:35 -05:00
parent cffe12bf53
commit 7dc941e467
2 changed files with 10 additions and 11 deletions

View File

@@ -491,9 +491,8 @@ export interface CredentialProfileCreate {
security_level?: string
auth_protocol?: string
auth_passphrase?: string
privacy_protocol?: string
privacy_passphrase?: string
security_name?: string
priv_protocol?: string
priv_passphrase?: string
}
export interface CredentialProfileUpdate extends Partial<CredentialProfileCreate> {}
@@ -505,7 +504,7 @@ export const credentialProfilesApi = {
`/api/tenants/${tenantId}/credential-profiles`,
{ params: credentialType ? { credential_type: credentialType } : undefined },
)
.then((r) => r.data),
.then((r) => r.data.profiles),
get: (tenantId: string, profileId: string) =>
api