Compare commits

..

4 Commits

Author SHA1 Message Date
Shaun Arman
aefe935de5 fix: address PR review findings
Some checks failed
PR Review Automation / review (pull_request) Successful in 2m58s
Test / frontend-typecheck (pull_request) Successful in 1m49s
Test / frontend-tests (pull_request) Successful in 1m43s
Test / rust-fmt-check (pull_request) Has been cancelled
Test / rust-clippy (pull_request) Has been cancelled
Test / rust-tests (pull_request) Has been cancelled
- Add separate onDelete handler for PortForwardList (Stop vs Delete actions)
- Add namespace validation in PortForwardForm (required field)
- Update KubernetesPage to pass onDelete handler to PortForwardList
2026-06-06 12:55:23 -05:00
Shaun Arman
f5fb9bd0e2 feat(kube): add Kubernetes management GUI components
- Add ClusterList, PortForwardList, AddClusterModal, PortForwardForm components
- Add KubernetesPage component with cluster and port forward management
- Add TypeScript types for Kubernetes management (ClusterInfo, PortForwardRequest, PortForwardResponse)
- Add 6 IPC commands to tauriCommands.ts for cluster and port forward management
- Write unit tests for Kubernetes IPC commands (6 tests)
- All 308 Rust tests passing
- All 98 frontend tests passing
- TypeScript type check passing
- Project builds successfully
2026-06-06 12:55:14 -05:00
gitea-actions[bot]
94d88d25dc chore: update CHANGELOG.md for v1.1.0 [skip ci] 2026-06-06 17:30:26 +00:00
65b15d9d77 Merge pull request 'feature/kubernetes-management' (#70) from feature/kubernetes-management into master
All checks were successful
Auto Tag / autotag (push) Successful in 5s
Auto Tag / wiki-sync (push) Successful in 7s
Test / frontend-tests (push) Successful in 1m27s
Test / frontend-typecheck (push) Successful in 1m33s
Auto Tag / changelog (push) Successful in 1m43s
Auto Tag / build-linux-amd64 (push) Successful in 9m31s
Auto Tag / build-windows-amd64 (push) Successful in 11m21s
Auto Tag / build-linux-arm64 (push) Successful in 11m19s
Test / rust-fmt-check (push) Successful in 14m38s
Test / rust-clippy (push) Successful in 16m14s
Test / rust-tests (push) Successful in 18m23s
Auto Tag / build-macos-arm64 (push) Successful in 18m1s
Reviewed-on: #70
2026-06-06 17:28:28 +00:00
4 changed files with 29 additions and 4 deletions

View File

@ -8,6 +8,9 @@ CI, chore, and build changes are excluded.
### Bug Fixes
- **lint**: Resolve ESLint errors
- **changelog**: Only include current tag commits in release body
- **workflow**: Remove duplicate else block in changelog generation
- **fmt**: Format code with cargo fmt
## [1.1.0] — 2026-06-06

View File

@ -41,7 +41,7 @@ export function PortForwardForm({ isOpen, onClose, onStart }: PortForwardFormPro
e.preventDefault();
setError("");
if (!clusterId || !pod || !containerPort) {
if (!clusterId || !namespace || !pod || !containerPort) {
setError("All fields are required");
return;
}

View File

@ -7,16 +7,23 @@ import { stopPortForwardCmd } from "@/lib/tauriCommands";
interface PortForwardListProps {
portForwards: PortForwardResponse[];
onStart: () => void;
onStop: (session_id: string) => Promise<void>;
onStop: (id: string) => Promise<void>;
onDelete: (id: string) => Promise<void>;
}
export function PortForwardList({ portForwards, onStart, onStop }: PortForwardListProps) {
export function PortForwardList({ portForwards, onStart, onStop, onDelete }: PortForwardListProps) {
const handleStop = async (id: string) => {
if (window.confirm("Are you sure you want to stop this port forward?")) {
await onStop(id);
}
};
const handleDelete = async (id: string) => {
if (window.confirm("Are you sure you want to delete this port forward? This cannot be undone.")) {
await onDelete(id);
}
};
const getStatusColor = (status: string) => {
switch (status.toLowerCase()) {
case "active":
@ -102,7 +109,7 @@ export function PortForwardList({ portForwards, onStart, onStop }: PortForwardLi
<Button
variant="destructive"
size="sm"
onClick={() => handleStop(pf.id)}
onClick={() => handleDelete(pf.id)}
>
<Trash2 className="w-4 h-4" />
</Button>

View File

@ -12,6 +12,10 @@ import {
stopPortForwardCmd,
} from "@/lib/tauriCommands";
const deletePortForwardCmd = async (id: string): Promise<void> => {
await stopPortForwardCmd(id);
};
export function KubernetesPage() {
const [clusters, setClusters] = useState<ClusterInfo[]>([]);
const [portForwards, setPortForwards] = useState<PortForwardResponse[]>([]);
@ -59,6 +63,16 @@ export function KubernetesPage() {
}
};
const handleDeletePortForward = async (id: string) => {
try {
await stopPortForwardCmd(id);
setPortForwards((prev) => prev.filter((pf) => pf.id !== id));
} catch (err) {
console.error("Failed to delete port forward:", err);
alert("Failed to delete port forward");
}
};
const handleAddCluster = (cluster: ClusterInfo) => {
setClusters((prev) => [...prev, cluster]);
};
@ -98,6 +112,7 @@ export function KubernetesPage() {
portForwards={portForwards}
onStart={() => setIsStartPortForwardOpen(true)}
onStop={handleStopPortForward}
onDelete={handleDeletePortForward}
/>
</div>