Commit Graph

46 Commits

Author SHA1 Message Date
Michel Roegl-Brunner
f4aa8661c4 Bump all .func scripts to be inline with the new core 2025-12-04 10:06:17 +01:00
CanbiZ
bc31896586 core: remove uv cache clean | remove log rotation (#340)
* core: remove uv cache clean

* Initialize functions on core.func source

Added function initialization call when sourcing core.func
2025-11-24 20:52:31 +01:00
CanbiZ
3579f2258e Update supported Proxmox VE versions to include 9.1 (#335)
The pve_check function now allows Proxmox VE 9.1 in addition to 9.0 and 8.x. Error messages and comments have been updated to reflect the expanded support.
2025-11-20 18:57:55 +01:00
Michel Roegl-Brunner
5b861ade05 add missing api.func to FUNCTIONS_FILE_PATH 2025-11-18 09:26:39 +01:00
Michel Roegl-Brunner
5cb7bc95fa Add filter Buttons 2025-11-13 15:26:49 +01:00
Michel Roegl-Brunner
72ffc5597f feat: Add multi-repository support for script synchronization
- Add Repository model to Prisma schema with migration
- Create repositoryService for managing repositories
- Add repositories API router with CRUD operations
- Update GitHubJsonService to support multiple repositories
- Update ScriptDownloaderService to use repository URL from scripts
- Add repository_url field to Script and ScriptCard types
- Add repository management UI tab to GeneralSettingsModal
- Display repository source on script cards and detail modal
- Implement repository deletion with JSON file cleanup
- Initialize default repositories (main and dev) on server startup
2025-11-13 14:12:01 +01:00
Michel Roegl-Brunner
f88479f6f6 Merge pull request #315 from community-scripts/MickLesk-patch-2
Bump tools.func - includes refactor: deb822 | new functions: setup_mariadb_db, setup_postgresql_db | fixes: setup_uv output, setup_rust (update-handling), setup_java (output bugfix)
2025-11-13 13:26:56 +01:00
CanbiZ
36033add28 Bump tools.func: include:
Refactor service stopping logic to handle failures and improve readability. Update repository setup function to streamline parameter validation and cleanup.
2025-11-13 11:44:19 +01:00
CanbiZ
f092de2934 Update core.func 2025-11-13 09:41:42 +01:00
CanbiZ
c92c737c2b core.func: push changes from upstream
Added cleanup_lxc function to manage cache and temporary files for various package managers and programming environments.
2025-11-13 09:41:02 +01:00
Michel Roegl-Brunner
2735d7ecc9 Add missing api.func 2025-11-10 13:32:10 +01:00
Michel Roegl-Brunner
e478a66c75 Hotfix: upload corrected build.func 2025-11-10 13:29:59 +01:00
Michel Roegl-Brunner
826ee26cdf Bump tools.func - update helper functions and package management utilities 2025-11-07 13:11:47 +01:00
Michel Roegl-Brunner
011cbd23b2 Fix autosync continuing to run after being disabled
- Add destroy() method to properly stop cron jobs
- Add additional safety checks in cron job execution
- Add debugging logs to track cron job lifecycle
- Ensure isRunning is set to false even when no cron job exists
- Add null check for cronJob before execution

This should prevent autosync from continuing to run after being disabled.
2025-10-24 22:29:37 +02:00
Michel Roegl-Brunner
19e18b4ebf Fix multiple autosync instances running simultaneously
- Add global lock to prevent multiple autosync instances from running
- Add initialization check to prevent multiple service creation
- Add global lock checks in cron job execution
- Prevent multiple notifications from being sent
- Fix TypeScript errors with error field types

This fixes the issue where 6+ autosync instances were running simultaneously,
causing multiple notifications and rate limit issues.
2025-10-24 22:27:40 +02:00
Michel Roegl-Brunner
5acaf144fb Fix autosync toggle disable functionality
- Fix service instance management to use global instance for stopping autosync
- Add automatic saving when toggle is changed (no manual save required)
- Fix validation issue where custom sync type without cron expression caused 400 error
- Add comprehensive debugging and error handling
- Ensure .env file is properly updated with AUTO_SYNC_ENABLED value
- Improve service lifecycle management with proper state cleanup
- Add fallback logic for invalid sync interval configurations

Resolves issue where disabling autosync in GUI didn't update .env file or stop service
2025-10-24 22:15:24 +02:00
Michel Roegl-Brunner
5faa7f3646 remove debian 2025-10-24 09:20:00 +02:00
Michel Roegl-Brunner
bc52256301 fix: Container ID display not showing after whiptail input
- Move echo statement outside whiptail output capture block
- Fix output redirection interference with Container ID display
- Ensure Container ID is properly displayed regardless of user input
- Consolidate duplicate echo statements into single display
2025-10-24 09:19:34 +02:00
Michel Roegl-Brunner
c89638021c feat: implement light/dark mode theme system (#182)
* feat: implement light/dark mode theme system

- Add semantic color CSS variables (success, warning, info, error) for both themes
- Create ThemeProvider with React context and localStorage persistence
- Add ThemeToggle component with sun/moon icons for header region
- Add theme switcher in General Settings modal
- Replace 200+ hardcoded Tailwind colors with CSS variables across 30+ components
- Update layout.tsx to remove forced dark mode
- Keep terminal colors unchanged as requested
- Default to dark mode, with seamless light/dark switching

Components updated:
- High-priority: InstalledScriptsTab, ScriptInstallationCard, LXCSettingsModal, ScriptsGrid
- All remaining component files with hardcoded colors
- UI components: button, toggle, badge variants
- Modal components: ErrorModal, ConfirmationModal, AuthModal, SetupModal
- Form components: ServerForm, FilterBar, CategorySidebar
- Display components: ScriptCard, ScriptCardList, DiffViewer, TextViewer

Theme switchers:
- Header: Small nuanced toggle in top-right
- Settings: Detailed Light/Dark selection in General Settings

* fix: resolve ESLint warnings

- Fix missing dependencies in useCallback and useEffect hooks
- Prefix unused parameter with underscore to satisfy ESLint rules
- Build now completes without warnings

* fix: improve toggle component styling for better visibility

- Use explicit gray colors instead of CSS variables for toggle background
- Ensure proper contrast in both light and dark modes
- Toggle switches now display correctly with proper visual states

* fix: improve toggle visual states for better UX

- Use explicit conditional styling instead of peer classes
- Active toggles now clearly show primary color background
- Inactive toggles show gray background for clear distinction
- Much easier to tell which toggles are on/off at a glance

* fix: improve toggle contrast in dark mode

- Change inactive toggle background from gray-700 to gray-600 for better visibility
- Add darker border color (gray-500) for toggle handle in dark mode
- Toggles now have proper contrast against dark backgrounds
- Both light and dark modes now have clear visual distinction

* fix: resolve dependency loop and improve dropdown styling

- Fix circular dependency in InstalledScriptsTab status check
- Remove fetchContainerStatuses function and inline logic in useEffect
- Make all dropdown menu items grey with consistent hover effects
- Update both ScriptInstallationCard and InstalledScriptsTab dropdowns
- Remove unused useCallback import
- Build now completes without warnings or errors

* fix: restore proper button colors and eliminate dependency loop

- Restore red color for Stop/Destroy buttons and green for Start buttons
- Fix circular dependency by using ref for containerStatusMutation
- Update both InstalledScriptsTab and ScriptInstallationCard dropdowns
- Maintain grey color for other menu items (Update, Shell, Open UI, etc.)
- Build now completes without warnings or dependency loops

* feat: add missing hover utility classes for semantic colors

- Add hover states for success, warning, info, error colors
- Add hover:bg-success/20, hover:bg-error/20, etc. classes
- Add hover:text-success-foreground, hover:text-error-foreground classes
- Start/Stop and Destroy buttons now have proper hover effects
- All dropdown menu items now have consistent hover behavior

* feat: improve status cards with useful LXC container information

- Replace useless 'Successful/Failed/In Progress' cards with meaningful data
- Show 'Running LXC' count in green (actual running containers)
- Show 'Stopped LXC' count in red (actual stopped containers)
- Keep 'Total Installations' for overall count
- Change layout from 4 columns to 3 columns for better spacing
- Status cards now show real-time container states instead of installation status

* style: center content in status cards

- Add text-center class to each individual status card
- Numbers and labels now centered within each card
- Improves visual balance and readability
- All three cards (Total, Running LXC, Stopped LXC) now have centered content
2025-10-17 15:26:59 +02:00
Michel Roegl-Brunner
a5b67b183b Delete scripts/vm/openwrt-vm.sh 2025-10-14 09:55:04 +02:00
Michel Roegl-Brunner
ec9bdf54ba Update OpenWrt script structure (#142)
- Move openwrt.json to openwrt-vm.sh in scripts/vm/ directory
- Remove petio.json (no longer needed)
- Reorganize script structure for better organization
2025-10-14 09:36:54 +02:00
Michel Roegl-Brunner
24afce49a3 feat: Multi-select script download with progress tracking (#121)
* feat: Add multi-select script download with progress tracking

- Add checkbox selection to script cards (both card and list views)
- Implement individual script downloads with real-time progress
- Add progress bar with visual indicators (✓ success, ✗ failed, ⟳ in-progress)
- Add batch download buttons (Download Selected, Download All Filtered)
- Add user-friendly error messages with specific guidance
- Add persistent progress bar with manual dismiss option
- Clear selection when switching between card/list views
- Update card download status immediately after completion

Features:
- Multi-select with checkboxes on script cards
- Real-time progress tracking during downloads
- Detailed error reporting with actionable messages
- Visual progress indicators for each script
- Batch download functionality for selected or filtered scripts
- Persistent progress bar until manually dismissed
- Automatic card status updates after download completion

* fix: Resolve ESLint errors

- Replace logical OR operators (||) with nullish coalescing (??) for safer null/undefined handling
- Replace for loop with for-of loop for better iteration
- Remove unused variable 'results'
- Fix all TypeScript ESLint warnings and errors

* fix: Resolve TypeScript error in loadMultipleScripts

- Use type guard to check for 'error' property before accessing
- Fix 'Property error does not exist' TypeScript error
- Ensure safe access to error property in result object
2025-10-13 14:17:11 +02:00
Michel Roegl-Brunner
ca2cbd5a7f Fix terminal colors and functionality issues (#86)
* Fix terminal colors and stop button functionality

- Updated terminal theme to GitHub Dark with proper ANSI color support
- Fixed terminal background and foreground colors for better readability
- Removed aggressive CSS overrides that were breaking ANSI color handling
- Fixed stop button restarting script execution issue
- Added isStopped state to prevent automatic script restart after stop
- Improved WebSocket connection stability to prevent duplicate executions
- Fixed cursor rendering issues in whiptail sessions
- Enhanced terminal styling with proper color palette configuration

* Fix downloaded scripts terminal functionality

- Add install functionality to DownloadedScriptsTab component
- Pass onInstallScript prop from main page to DownloadedScriptsTab
- Enable terminal display when installing from downloaded scripts tab
- Maintain consistency with available scripts tab functionality
- Fix missing terminal integration for downloaded script installations

* Improve mobile terminal focus behavior

- Add terminal ref to main page for precise scrolling
- Update scroll behavior to focus terminal instead of page top
- Add mobile-specific offset for better terminal visibility
- Remove generic page scroll from ScriptDetailModal
- Ensure terminal is properly focused when starting installations on mobile
2025-10-09 09:19:55 +02:00
Michel Roegl-Brunner
3530d78c78 feat: Add Downloaded Scripts tab (#51)
* feat: Add Downloaded Scripts tab

- Create new DownloadedScriptsTab component that shows only downloaded scripts
- Add tab navigation between Available Scripts and Installed Scripts
- Include filtering, searching, and categorization features
- Display statistics for downloaded scripts
- Remove unused script files (2fauth.sh, debian.sh and their install scripts)
- Update main page to include the new tab in navigation

* fix: Resolve ESLint errors in DownloadedScriptsTab

- Fix unescaped apostrophe in empty state message
- Fix empty arrow function by adding proper comment structure
2025-10-07 12:38:54 +02:00
Michel Roegl-Brunner
b366a33f07 Remove execution_mode dependencies from InstalledScriptsTab (#50)
- Remove ExecutionModeBadge import and usage
- Update filtering logic to use server_name presence instead of execution_mode
- Simplify update script logic by removing mode property
- Update Terminal component call to determine mode based on server presence
- Replace ExecutionModeBadge in table with simple text display
- Maintain backend API compatibility by keeping execution_mode in mutations
- Use nullish coalescing operator (??) for better null handling
2025-10-07 09:59:10 +02:00
Michel Roegl-Brunner
e09c1bbf5d Merge development into main (#42)
* feat: improve button layout and UI organization (#35)

- Reorganize control buttons into a structured container with proper spacing
- Add responsive design for mobile and desktop layouts
- Improve SettingsButton and ResyncButton component structure
- Enhance visual hierarchy with better typography and spacing
- Add background container with shadow and border for better grouping
- Make layout responsive with proper flexbox arrangements

* Add category sidebar and filtering to scripts grid (#36)

* Add category sidebar and filtering to scripts grid

Introduces a CategorySidebar component with icon mapping and category selection. Updates metadata.json to include icons for each category. Enhances ScriptsGrid to support category-based filtering and integrates the sidebar, improving script navigation and discoverability. Also refines ScriptDetailModal layout for better modal presentation.

* Add category metadata to scripts and improve filtering

Introduces category metadata loading and exposes it via new API endpoints. Script cards are now enhanced with category information, allowing for accurate category-based filtering and counting in the ScriptsGrid component. Removes hardcoded category logic and replaces it with dynamic data from metadata.json.

* Add reusable Badge component and refactor badge usage (#37)

Introduces a new Badge component with variants for type, updateable, privileged, status, execution mode, and note. Refactors ScriptCard, ScriptDetailModal, and InstalledScriptsTab to use the new Badge components, improving consistency and maintainability. Also updates DarkModeProvider and layout.tsx for better dark mode handling and fallback.

* Add advanced filtering and sorting to ScriptsGrid (#38)

Introduces a new FilterBar component for ScriptsGrid, enabling filtering by search query, updatable status, script types, and sorting by name or creation date. Updates scripts API to include creation date in card data, improves deduplication and category counting logic, and adds error handling for missing script directories.

* refactore installed scipts tab (#41)

* feat: Add inline editing and manual script entry functionality

- Add inline editing for script names and container IDs in installed scripts table
- Add manual script entry form for pre-installed containers
- Update database and API to support script_name editing
- Improve dark mode hover effects for table rows
- Add form validation and error handling
- Support both local and SSH execution modes for manual entries

* feat: implement installed scripts functionality and clean up test files

- Add installed scripts tab with filtering and execution capabilities
- Update scripts grid with better type safety and error handling
- Remove outdated test files and update test configuration
- Fix TypeScript and ESLint issues in components
- Update .gitattributes for proper line ending handling

* fix: resolve TypeScript error with categoryNames type mismatch

- Fixed categoryNames type from (string | undefined)[] to string[] in scripts router
- Added proper type filtering and assertion in getScriptCardsWithCategories
- Added missing ScriptCard import in scripts router
- Ensures type safety for categoryNames property throughout the application

---------

Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com>
2025-10-06 16:24:19 +02:00
Michel Roegl-Brunner
a05185db1b Revert "feat: Add inline editing and manual script entry functionality (#39)" (#40)
This reverts commit a410aeacf7.
2025-10-06 16:21:49 +02:00
Michel Roegl-Brunner
a410aeacf7 feat: Add inline editing and manual script entry functionality (#39)
* feat: improve button layout and UI organization (#35)

- Reorganize control buttons into a structured container with proper spacing
- Add responsive design for mobile and desktop layouts
- Improve SettingsButton and ResyncButton component structure
- Enhance visual hierarchy with better typography and spacing
- Add background container with shadow and border for better grouping
- Make layout responsive with proper flexbox arrangements

* Add category sidebar and filtering to scripts grid (#36)

* Add category sidebar and filtering to scripts grid

Introduces a CategorySidebar component with icon mapping and category selection. Updates metadata.json to include icons for each category. Enhances ScriptsGrid to support category-based filtering and integrates the sidebar, improving script navigation and discoverability. Also refines ScriptDetailModal layout for better modal presentation.

* Add category metadata to scripts and improve filtering

Introduces category metadata loading and exposes it via new API endpoints. Script cards are now enhanced with category information, allowing for accurate category-based filtering and counting in the ScriptsGrid component. Removes hardcoded category logic and replaces it with dynamic data from metadata.json.

* Add reusable Badge component and refactor badge usage (#37)

Introduces a new Badge component with variants for type, updateable, privileged, status, execution mode, and note. Refactors ScriptCard, ScriptDetailModal, and InstalledScriptsTab to use the new Badge components, improving consistency and maintainability. Also updates DarkModeProvider and layout.tsx for better dark mode handling and fallback.

* Add advanced filtering and sorting to ScriptsGrid (#38)

Introduces a new FilterBar component for ScriptsGrid, enabling filtering by search query, updatable status, script types, and sorting by name or creation date. Updates scripts API to include creation date in card data, improves deduplication and category counting logic, and adds error handling for missing script directories.

* feat: Add inline editing and manual script entry functionality

- Add inline editing for script names and container IDs in installed scripts table
- Add manual script entry form for pre-installed containers
- Update database and API to support script_name editing
- Improve dark mode hover effects for table rows
- Add form validation and error handling
- Support both local and SSH execution modes for manual entries

* feat: implement installed scripts functionality and clean up test files

- Add installed scripts tab with filtering and execution capabilities
- Update scripts grid with better type safety and error handling
- Remove outdated test files and update test configuration
- Fix TypeScript and ESLint issues in components
- Update .gitattributes for proper line ending handling

* fix: resolve TypeScript error with categoryNames type mismatch

- Fixed categoryNames type from (string | undefined)[] to string[] in scripts router
- Added proper type filtering and assertion in getScriptCardsWithCategories
- Added missing ScriptCard import in scripts router
- Ensures type safety for categoryNames property throughout the application

---------

Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com>
2025-10-06 16:20:07 +02:00
Michel Roegl-Brunner
a2f830a0a1 Delete scripts/install/debian-install.sh 2025-10-03 13:18:03 +02:00
Michel Roegl-Brunner
33d71abec0 Delete scripts/install/2fauth-install.sh 2025-10-03 13:17:56 +02:00
Michel Roegl-Brunner
72e3a2f12c Delete scripts/ct/debian.sh 2025-10-03 13:17:46 +02:00
Michel Roegl-Brunner
e791832a65 Delete scripts/ct/2fauth.sh 2025-10-03 13:17:39 +02:00
Michel Roegl-Brunner
024ffcbf09 feat: Add script installation tracking and update functionality (#36)
* feat: Add script installation tracking with Container ID detection

- Add installed_scripts table to database schema
- Implement Container ID parsing from terminal output
- Add installation tracking for both local and SSH executions
- Create InstalledScriptsTab component with filtering and search
- Add tab navigation to main page (Scripts | Installed Scripts)
- Add tRPC endpoints for installed scripts CRUD operations
- Track installation status, server info, and output logs
- Support both local and SSH execution modes

* fix: Resolve SQL syntax error in database queries

- Change table alias from 'is' to 'inst' in SQL queries
- 'is' is a reserved keyword in SQLite causing syntax errors
- Fixes getAllInstalledScripts, getInstalledScriptById, and getInstalledScriptsByServer methods

* feat: Enhance Container ID detection and add manual editing

- Add comprehensive Container ID detection patterns for various script formats
- Add debug logging to help identify detection issues
- Add manual Container ID editing feature in the frontend
- Add updateInstalledScript tRPC mutation for updating records
- Improve Container ID column with inline editing UI
- Test and verify Container ID detection is working (detected 132 from 2fauth script)

* fix: Improve Container ID detection with ANSI code handling

- Add ANSI color code stripping before pattern matching
- Add primary pattern for exact format: 🆔  Container ID: 113
- Test patterns on both original and cleaned output
- Add better debug logging to show matched text
- This should fix Container ID detection for Proxmox scripts

* feat: Add script update functionality with terminal output

- Add Update button for each installed script (only shows when container_id exists)
- Add WebSocket support for update action (pct enter <ct-id> -- update)
- Add updateScript tRPC endpoint for initiating updates
- Add startScriptUpdate, startLocalScriptUpdate, startSSHScriptUpdate methods
- Modify Terminal component to handle update operations
- Display real-time terminal output for update commands
- Support both local and SSH execution modes for updates
- Show 'Update Container <ID>' in terminal title for update operations

* fix: Fix SSH update functionality

- Replace sshService.executeScript with direct sshpass command
- Use bash -c to execute SSH command: sshpass -p 'password' ssh -o StrictHostKeyChecking=no user@ip 'pct enter <ct-id> -- update'
- This fixes the 'Permission denied' and rsync errors
- SSH updates now work properly for remote containers

* fix: Fix WebSocket update action handling

- Add containerId to WebSocketMessage typedef
- Extract containerId from message in handleMessage function
- Remove debug logging from Terminal component
- This fixes the 'containerId is not defined' error
- Update action should now work properly without creating script records

* feat: Add Update functionality for installed scripts

- Add Update button to InstalledScriptsTab for scripts with Container ID
- Modify Terminal component to handle update operations with isUpdate and containerId props
- Add startUpdateExecution method to WebSocket handler
- Implement local update execution using 'pct enter <CT ID> -c update'
- Implement SSH update execution for remote servers
- Update WebSocket message parsing to handle update parameters
- Users can now update installed scripts by entering the LXC container and running update command

* fix: Fix SSH update execution by using direct command execution

- Add executeCommand method to SSH service for direct command execution
- Update startSSHUpdateExecution to use executeCommand instead of executeScript
- This fixes the rsync permission denied error when updating scripts via SSH
- Update functionality now works properly for both local and SSH installations

* fix: Add server credentials fetching for SSH updates

- Create servers router with getServerById endpoint
- Update handleUpdateScript to fetch full server details including credentials
- This fixes the permission denied error by providing user/password for SSH authentication
- SSH updates now have access to complete server configuration

* fix: Simplify server credentials fetching for SSH updates

- Add server_user and server_password to database query
- Update InstalledScript interface to include server credentials
- Simplify handleUpdateScript to use data already available
- Remove complex tRPC server fetching that was causing errors
- SSH updates now work with complete server authentication data

* fix: Correct pct enter command sequence for updates

- Change from 'pct enter <CT ID> -c "update"' to proper sequence
- First run 'pct enter <CT ID>' to enter container shell
- Then send 'update' command after entering the container
- Apply fix to both local and SSH update execution methods
- Add 1-second delay to ensure container shell is ready before sending update command

* fix: Increase delay to 4 seconds before sending update command

- Change delay from 1 second to 4 seconds for both local and SSH updates
- Ensures container shell is fully ready before sending update command
- Prevents premature command execution that could fail

* cleanup: Remove all debug console.log statements

- Remove debug logging from server.js WebSocket handlers
- Remove debug logging from Terminal component
- Remove debug logging from page.tsx
- Remove debug logging from ExecutionModeModal component
- Remove debug logging from githubJsonService.ts
- Keep only essential server startup messages and error logging
- Clean up codebase for production readiness

* fix: Resolve all build and linter errors

- Fix React Hook useEffect missing dependencies in Terminal.tsx
- Fix TypeScript unsafe argument error in installedScripts.ts by properly typing updateData
- Add missing isUpdate and containerId properties to WebSocketMessage type definition
- Add proper type annotations for callback parameters in server.js
- Fix TypeScript errors with execution.process by adding type assertions
- Remove duplicate updateInstalledScript method in installedScripts.ts
- Build now passes successfully with no errors or warnings
2025-10-03 13:05:25 +02:00
Michel Roegl-Brunner
433d8121e8 Fix TypeScript and ESLint errors (#31)
- Add proper type annotations for WebSocketMessage and ServerInfo types
- Fix type imports to use type-only imports where appropriate
- Replace logical OR operators with nullish coalescing operators
- Fix floating promises by adding void operator
- Add proper type assertions for database results
- Fix useEffect dependencies in Terminal component
- Remove unused variables and fix unescaped entities
- Add JSDoc type annotations for database methods
- Fix singleton instance type annotations
2025-09-30 11:30:43 +02:00
Michel Roegl-Brunner
82dc4643de feat: optimize JSON sync with 1 API call + raw URLs
- Replace GitHub API calls (390+) with 1 API call + raw URL downloads
- Create GitHubJsonService for efficient JSON file syncing
- Reduce API rate limiting issues by 99.7%
- Add automatic page reload after successful sync
- Update tests to use new service
- Maintain same functionality with better performance

Performance improvement:
- Before: 390+ GitHub API calls (1 per JSON file)
- After: 1 GitHub API call + 389 raw URL downloads
- Raw URLs have no rate limits, making sync much more reliable
2025-09-15 14:30:07 +02:00
Michel Roegl-Brunner
a9fec63e88 remove test scripts 2025-09-11 11:42:19 +02:00
Michel Roegl-Brunner
a053275d70 Remove debug console.log statements from WebSocket handler
- Removed verbose debug output from WebSocket connection logs
- Removed script execution debug messages
- Removed input handling debug logs
- Kept important error logging and server startup messages
- WebSocket functionality remains fully intact
2025-09-11 10:38:31 +02:00
Michel Roegl-Brunner
89ab32e1b0 feat: improve script execution and local file handling
- Fix lxc-attach command in build.func line 1341 to use pct exec for consistency
- Add alternative lxc-attach method for script execution using local files
- Fix FUNCTIONS_FILE_PATH to include core.func, tools.func, and install.func content
- Replace GitHub curl downloads with local file sources in build.func
- Update install.func to work with FUNCTIONS_FILE_PATH approach
- Add support for local config-file.func and alpine-install.func
- Add new install scripts: 2fauth-install.sh and alpine-install.sh
- Add new CT scripts: 2fauth.sh and alpine.sh

This improves script execution reliability and removes dependency on GitHub downloads.
2025-09-11 09:28:43 +02:00
Michel Roegl-Brunner
57293b9e59 Fix script execution issues and improve container creation
- Fixed syntax errors in build.func (duplicate export, unmatched quotes)
- Fixed color variable initialization by calling load_functions in core.func
- Replaced undefined function calls (post_to_api, post_update_to_api) with echo statements
- Fixed install script execution by copying scripts into container first
- Made create_lxc.sh executable
- Improved error handling and script sourcing
- Added missing core functions and tools
- Enhanced script downloader and local script management
2025-09-10 16:26:29 +02:00
Michel Roegl-Brunner
7258f7bcfd fix: Update local scripts tab to scan /scripts/ct directory
- Add getCtScripts() method to ScriptManager to scan ct subdirectory
- Add getCtScripts tRPC endpoint for local scripts tab
- Update ScriptsList component to use getCtScripts instead of getScripts
- Fix script path construction to use relative paths for terminal
- Local scripts tab now correctly shows scripts from /scripts/ct folder
2025-09-10 15:10:10 +02:00
Michel Roegl-Brunner
c60e5e6a1d feat: Add Install button to script detail modal
- Add Install button that appears when script files are loaded
- Integrate with existing terminal component for script execution
- Pass correct script path to terminal (scripts/ct/script.sh)
- Close modal when installation starts
- Add proper TypeScript handling for union types
- Install button only shows when CT script is available locally
2025-09-10 15:04:02 +02:00
Michel Roegl-Brunner
17e0cea16b fix: Update script files status after successful loading
- Add refetchScriptFiles to checkScriptFiles query
- Call refetchScriptFiles after successful script loading
- This ensures the status indicators update immediately after loading
2025-09-10 15:00:41 +02:00
Michel Roegl-Brunner
bd1af66828 added json files 2025-09-10 14:47:48 +02:00
Michel Roegl-Brunner
996fce1e11 feat: Add GitHub script list functionality with cards and modal
- Add JSON_FOLDER environment variable for GitHub repo JSON path
- Create TypeScript types for script JSON structure
- Implement GitHub API service to fetch scripts from repository
- Add tRPC routes for script management (getScriptCards, getAllScripts, getScriptBySlug, resyncScripts)
- Create ScriptCard component for displaying script information
- Create ScriptDetailModal for full script details view
- Create ScriptsGrid component with loading and error states
- Add ResyncButton component for refreshing scripts from upstream
- Update main page with tabbed interface (GitHub Scripts vs Local Scripts)
- Add proper error handling and loading states throughout
2025-09-10 14:37:37 +02:00
Michel Roegl-Brunner
030cd9ec9a Got the terminal working 2025-09-09 16:03:17 +02:00
Rögl-Brunner Michel
6ee5c5c017 PoC 2025-09-09 14:24:36 +02:00