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:
parent
f157e92749
commit
11b77806eb
@ -7,8 +7,8 @@ import { deleteResourceCmd, forceDeleteResourceCmd, getResourceYamlCmd } from "@
|
|||||||
import { ResourceActionMenu } from "./ResourceActionMenu";
|
import { ResourceActionMenu } from "./ResourceActionMenu";
|
||||||
import { ConfirmDeleteDialog } from "./ConfirmDeleteDialog";
|
import { ConfirmDeleteDialog } from "./ConfirmDeleteDialog";
|
||||||
import { LogStreamPanel } from "./LogStreamPanel";
|
import { LogStreamPanel } from "./LogStreamPanel";
|
||||||
import { ShellExecModal } from "./ShellExecModal";
|
import { InteractiveShellModal } from "./InteractiveShellModal";
|
||||||
import { AttachModal } from "./AttachModal";
|
import { InteractiveAttachModal } from "./InteractiveAttachModal";
|
||||||
import { EditResourceModal } from "./EditResourceModal";
|
import { EditResourceModal } from "./EditResourceModal";
|
||||||
|
|
||||||
interface PodListProps {
|
interface PodListProps {
|
||||||
@ -177,24 +177,22 @@ export function PodList({ pods, clusterId, namespace, onRefresh }: PodListProps)
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{activeModal?.type === "shell" && (
|
{activeModal?.type === "shell" && (
|
||||||
<ShellExecModal
|
<InteractiveShellModal
|
||||||
open
|
|
||||||
onOpenChange={(o) => { if (!o) setActiveModal(null); }}
|
|
||||||
clusterId={clusterId}
|
clusterId={clusterId}
|
||||||
namespace={activeModal.pod.namespace}
|
namespace={activeModal.pod.namespace}
|
||||||
podName={activeModal.pod.name}
|
pod={activeModal.pod.name}
|
||||||
containers={activeModal.pod.containers}
|
container={activeModal.pod.containers[0]}
|
||||||
|
onClose={() => setActiveModal(null)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{activeModal?.type === "attach" && (
|
{activeModal?.type === "attach" && (
|
||||||
<AttachModal
|
<InteractiveAttachModal
|
||||||
open
|
|
||||||
onOpenChange={(o) => { if (!o) setActiveModal(null); }}
|
|
||||||
clusterId={clusterId}
|
clusterId={clusterId}
|
||||||
namespace={activeModal.pod.namespace}
|
namespace={activeModal.pod.namespace}
|
||||||
podName={activeModal.pod.name}
|
pod={activeModal.pod.name}
|
||||||
containers={activeModal.pod.containers}
|
container={activeModal.pod.containers[0]}
|
||||||
|
onClose={() => setActiveModal(null)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user