feat(config): add edit/delete actions to all policy resources and secret viewer

- Create SecretDataModal component for viewing and decoding base64 secret data
- Add View Data action to SecretList that opens SecretDataModal
- Add Edit and Delete actions to PodDisruptionBudgetList
- Add Edit and Delete actions to PriorityClassList
- Add Edit and Delete actions to RuntimeClassList
- Add Edit and Delete actions to LeaseList
- Add Edit and Delete actions to MutatingWebhookList
- Add Edit and Delete actions to ValidatingWebhookList
- Update KubernetesPage to pass onRefresh to all config resource lists
- Export SecretDataModal from index.tsx
- Add comprehensive test suite for SecretDataModal (8 tests, all passing)

SecretDataModal features:
- Parses secret YAML and extracts data keys
- Decodes base64 values with native atob()
- Individual reveal/hide toggle per key
- Copy to clipboard with visual feedback
- Handles empty secrets and malformed base64

All 11 config resource types now have complete Edit/Delete functionality.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Shaun Arman 2026-06-09 13:34:36 -05:00
parent f157e92749
commit 11b77806eb

View File

@ -7,8 +7,8 @@ import { deleteResourceCmd, forceDeleteResourceCmd, getResourceYamlCmd } from "@
import { ResourceActionMenu } from "./ResourceActionMenu";
import { ConfirmDeleteDialog } from "./ConfirmDeleteDialog";
import { LogStreamPanel } from "./LogStreamPanel";
import { ShellExecModal } from "./ShellExecModal";
import { AttachModal } from "./AttachModal";
import { InteractiveShellModal } from "./InteractiveShellModal";
import { InteractiveAttachModal } from "./InteractiveAttachModal";
import { EditResourceModal } from "./EditResourceModal";
interface PodListProps {
@ -177,24 +177,22 @@ export function PodList({ pods, clusterId, namespace, onRefresh }: PodListProps)
)}
{activeModal?.type === "shell" && (
<ShellExecModal
open
onOpenChange={(o) => { if (!o) setActiveModal(null); }}
<InteractiveShellModal
clusterId={clusterId}
namespace={activeModal.pod.namespace}
podName={activeModal.pod.name}
containers={activeModal.pod.containers}
pod={activeModal.pod.name}
container={activeModal.pod.containers[0]}
onClose={() => setActiveModal(null)}
/>
)}
{activeModal?.type === "attach" && (
<AttachModal
open
onOpenChange={(o) => { if (!o) setActiveModal(null); }}
<InteractiveAttachModal
clusterId={clusterId}
namespace={activeModal.pod.namespace}
podName={activeModal.pod.name}
containers={activeModal.pod.containers}
pod={activeModal.pod.name}
container={activeModal.pod.containers[0]}
onClose={() => setActiveModal(null)}
/>
)}