[PR #124] [MERGED] feat: Add LXC Container Control Features #226

Closed
opened 2026-02-26 12:40:40 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE-Local/pull/124
Author: @michelroegl-brunner
Created: 10/13/2025
Status: Merged
Merged: 10/13/2025
Merged by: @michelroegl-brunner

Base: mainHead: feat/lxc_controlls


📝 Commits (10+)

  • 0fb452c feat: Add LXC container control functionality to Installed Scripts page
  • e0f4318 fix: Resolve linting errors in LXC control functionality
  • 99c6904 fix: Add missing execution_mode property to InstalledScript interface in ScriptInstallationCard
  • 33fca95 fix: Resolve status detection conflicts by using unified bulk fetching
  • 195288b fix: Stop infinite API call loops that were overwhelming the server
  • ef6c545 feat: Implement efficient pct list approach for container status checking
  • 7072417 fix: Remove duplicate container status display from STATUS column
  • 57f93e0 feat: Trigger status check when switching to installed scripts tab
  • e07bc0d cleanup: Remove all console.log statements from codebase
  • 1c30501 feat: Display detailed SSH error messages for container operations

📊 Changes

8 files changed (+1005 additions, -276 deletions)

View changed files

src/app/_components/ConfirmationModal.tsx (+111 -0)
src/app/_components/ErrorModal.tsx (+87 -0)
📝 src/app/_components/HelpModal.tsx (+23 -0)
📝 src/app/_components/InstalledScriptsTab.tsx (+309 -78)
📝 src/app/_components/ScriptInstallationCard.tsx (+47 -10)
📝 src/app/_components/ScriptsGrid.tsx (+0 -1)
📝 src/app/_components/VersionDisplay.tsx (+0 -1)
📝 src/server/api/routers/installedScripts.ts (+428 -186)

📄 Description

🚀 New Features

Container Control

  • Start/Stop Buttons: Directly control LXC containers via SSH with
  • Destroy Button: Permanently remove LXC containers with via SSH
  • Real-time Status: Live container status indicators (running/stopped/unknown)
  • Auto-stop Before Destroy: Automatically stops running containers before destruction

Enhanced Safety

  • Confirmation Modals: Type-to-confirm for destructive actions (destroy)
  • Simple Confirmations: OK/Cancel for start/stop operations
  • Data Loss Warnings: Clear warnings about potential data loss
  • Backup Recommendations: Suggests backing up data before operations

Improved UX

  • Custom Error Modals: Replaced ugly browser alerts with consistent UI
  • Instant Feedback: Immediate status updates for start/stop operations
  • Success Modals: Quick success feedback for container operations
  • Disabled States: Update button disabled when container is stopped
  • Loading States: Clear loading indicators during operations

Technical Improvements

  • SSH Integration: All commands executed remotely via configured SSH
  • Bulk Status Checks: Efficient VMID Status Lock Name
    109 stopped debian
    113 running debian
    116 stopped debian
    156 running pve-scripts-local per server instead of individual checks
  • Error Handling: Detailed SSH command output in error messages
  • Type Safety: Proper TypeScript types throughout
  • Code Cleanup: Removed all comments and cleaned up code

🔧 Backend Changes

  • New tRPC endpoints: , ,
  • Enhanced error handling with detailed SSH output
  • Automatic container stopping before destruction
  • Bulk status fetching for better performance

📱 Frontend Changes

  • New and components
  • Enhanced with container control features
  • Updated for mobile view
  • Improved help documentation

🛡️ Safety Features

  • Container ID verification for destructive actions
  • Clear warnings about data loss
  • Backup recommendations
  • Proper error handling and user feedback

🎯 User Experience

  • Consistent UI/UX across all modals and interactions
  • Real-time status updates
  • Clear visual feedback for all operations
  • Professional appearance matching the overall design

This PR adds comprehensive LXC container management capabilities while maintaining safety and providing excellent user experience.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/community-scripts/ProxmoxVE-Local/pull/124 **Author:** [@michelroegl-brunner](https://github.com/michelroegl-brunner) **Created:** 10/13/2025 **Status:** ✅ Merged **Merged:** 10/13/2025 **Merged by:** [@michelroegl-brunner](https://github.com/michelroegl-brunner) **Base:** `main` ← **Head:** `feat/lxc_controlls` --- ### 📝 Commits (10+) - [`0fb452c`](https://github.com/community-scripts/ProxmoxVE-Local/commit/0fb452c05b99657baabaaddaee172a1cfedcf552) feat: Add LXC container control functionality to Installed Scripts page - [`e0f4318`](https://github.com/community-scripts/ProxmoxVE-Local/commit/e0f4318250d6ae8393f31e5f19340514b687af25) fix: Resolve linting errors in LXC control functionality - [`99c6904`](https://github.com/community-scripts/ProxmoxVE-Local/commit/99c69045bf63d5650f4e2f2b1c5ec177cd8cc062) fix: Add missing execution_mode property to InstalledScript interface in ScriptInstallationCard - [`33fca95`](https://github.com/community-scripts/ProxmoxVE-Local/commit/33fca95561f58c4c6e1b4b422ff0d71b3ef497a2) fix: Resolve status detection conflicts by using unified bulk fetching - [`195288b`](https://github.com/community-scripts/ProxmoxVE-Local/commit/195288bb1d13547e8ac4f27d791fb5ab0d347525) fix: Stop infinite API call loops that were overwhelming the server - [`ef6c545`](https://github.com/community-scripts/ProxmoxVE-Local/commit/ef6c545edfd59636035b29c3ec7de214f2342f62) feat: Implement efficient pct list approach for container status checking - [`7072417`](https://github.com/community-scripts/ProxmoxVE-Local/commit/70724172859ee7f20b6d3fec3de4bac50fcf8a07) fix: Remove duplicate container status display from STATUS column - [`57f93e0`](https://github.com/community-scripts/ProxmoxVE-Local/commit/57f93e043eca8696b0efff3438c3e23eed664e0a) feat: Trigger status check when switching to installed scripts tab - [`e07bc0d`](https://github.com/community-scripts/ProxmoxVE-Local/commit/e07bc0d131d182afdf74db89dfb705dda37e27fd) cleanup: Remove all console.log statements from codebase - [`1c30501`](https://github.com/community-scripts/ProxmoxVE-Local/commit/1c30501b8b2bf098a8772d4371ef111852896987) feat: Display detailed SSH error messages for container operations ### 📊 Changes **8 files changed** (+1005 additions, -276 deletions) <details> <summary>View changed files</summary> ➕ `src/app/_components/ConfirmationModal.tsx` (+111 -0) ➕ `src/app/_components/ErrorModal.tsx` (+87 -0) 📝 `src/app/_components/HelpModal.tsx` (+23 -0) 📝 `src/app/_components/InstalledScriptsTab.tsx` (+309 -78) 📝 `src/app/_components/ScriptInstallationCard.tsx` (+47 -10) 📝 `src/app/_components/ScriptsGrid.tsx` (+0 -1) 📝 `src/app/_components/VersionDisplay.tsx` (+0 -1) 📝 `src/server/api/routers/installedScripts.ts` (+428 -186) </details> ### 📄 Description ## 🚀 New Features ### Container Control - **Start/Stop Buttons**: Directly control LXC containers via SSH with - **Destroy Button**: Permanently remove LXC containers with via SSH - **Real-time Status**: Live container status indicators (running/stopped/unknown) - **Auto-stop Before Destroy**: Automatically stops running containers before destruction ### Enhanced Safety - **Confirmation Modals**: Type-to-confirm for destructive actions (destroy) - **Simple Confirmations**: OK/Cancel for start/stop operations - **Data Loss Warnings**: Clear warnings about potential data loss - **Backup Recommendations**: Suggests backing up data before operations ### Improved UX - **Custom Error Modals**: Replaced ugly browser alerts with consistent UI - **Instant Feedback**: Immediate status updates for start/stop operations - **Success Modals**: Quick success feedback for container operations - **Disabled States**: Update button disabled when container is stopped - **Loading States**: Clear loading indicators during operations ### Technical Improvements - **SSH Integration**: All commands executed remotely via configured SSH - **Bulk Status Checks**: Efficient VMID Status Lock Name 109 stopped debian 113 running debian 116 stopped debian 156 running pve-scripts-local per server instead of individual checks - **Error Handling**: Detailed SSH command output in error messages - **Type Safety**: Proper TypeScript types throughout - **Code Cleanup**: Removed all comments and cleaned up code ## 🔧 Backend Changes - New tRPC endpoints: , , - Enhanced error handling with detailed SSH output - Automatic container stopping before destruction - Bulk status fetching for better performance ## 📱 Frontend Changes - New and components - Enhanced with container control features - Updated for mobile view - Improved help documentation ## 🛡️ Safety Features - Container ID verification for destructive actions - Clear warnings about data loss - Backup recommendations - Proper error handling and user feedback ## 🎯 User Experience - Consistent UI/UX across all modals and interactions - Real-time status updates - Clear visual feedback for all operations - Professional appearance matching the overall design This PR adds comprehensive LXC container management capabilities while maintaining safety and providing excellent user experience. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 12:40:40 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ProxmoxVE-Local#226
No description provided.