Commit Graph

426 Commits

Author SHA1 Message Date
Michel Roegl-Brunner
b52188083a Add update confirmation modal with changelog display
- Add UpdateConfirmationModal component that shows changelog before update
- Modify getVersionStatus to include release body (changelog) in response
- Update VersionDisplay to show confirmation modal instead of starting update directly
- Users must review changelog and click 'Proceed with Update' to start update
- Ensures users see potential breaking changes before updating
2025-11-26 10:20:06 +01:00
Michel Roegl-Brunner
53df7201d6 Fix critical bug: prevent reloads from stale updateLogsData.isComplete
- Add isUpdating guard before processing updateLogsData.isComplete
- Reset shouldSubscribe when update completes or fails
- Prevent stale isComplete data from triggering reloads during normal usage
2025-11-26 10:17:57 +01:00
Michel Roegl-Brunner
65bed15722 Fix random page reloads during normal app usage
- Memoize startReconnectAttempts with useCallback to prevent recreation on every render
- Fix useEffect dependency arrays to include memoized function
- Add stricter guards checking refs before starting reconnect attempts
- Ensure reconnect logic only runs when actually updating (not during normal usage)
- Add early return in fallback useEffect to prevent false triggers
- Add ref guards in ResyncButton to prevent multiple simultaneous sync operations
- Only reload after sync if it was user-initiated
2025-11-26 09:05:47 +01:00
Michel Roegl-Brunner
d3da1038db Fix WebSocket upgrade handling to preserve Next.js HMR handlers
- Save existing upgrade listeners before adding our own
- Call existing listeners for non-matching paths to allow Next.js HMR
- Only handle /ws/script-execution ourselves
- This ensures Next.js can handle its own WebSocket upgrades for HMR
2025-11-26 09:01:29 +01:00
Michel Roegl-Brunner
3d45e6d355 Revert WebSocket handling to simpler approach
- Go back to attaching WebSocketServer directly with path option
- Remove manual upgrade event handling that was causing errors
- The path option should filter to only /ws/script-execution
- Next.js should handle its own HMR WebSocket upgrades naturally
2025-11-26 09:00:25 +01:00
Michel Roegl-Brunner
b01c029b18 Fix WebSocket upgrade handling to properly route Next.js HMR
- Create WebSocketServer with noServer: true to avoid auto-attaching
- Manually handle upgrade events to route /ws/script-execution to our WebSocketServer
- Route all other WebSocket upgrades (including Next.js HMR) to Next.js handler
- This ensures Next.js HMR WebSocket connections are properly handled
- Fixes 400 errors for /_next/webpack-hmr WebSocket connections
2025-11-26 08:59:33 +01:00
Michel Roegl-Brunner
c77cd33019 Fix Next.js HMR WebSocket and static asset handling
- Add WebSocket upgrade detection to only intercept /ws/script-execution
- Pass all other WebSocket upgrades (including HMR) to Next.js handler
- Ensure _next routes and static assets are properly handled by Next.js
- Fixes 400 errors for Next.js HMR WebSocket connections
- Fixes 403 errors for static assets by ensuring proper routing
2025-11-26 08:57:45 +01:00
Michel Roegl-Brunner
c8825dddf9 Fix intermittent page reloads from VersionDisplay reconnect logic
- Add guards to prevent reload when not updating
- Use refs to track isUpdating and isNetworkError state in interval callbacks
- Add hasReloadedRef flag to prevent multiple reloads
- Clear reconnect interval when update completes or component unmounts
- Only start reconnect attempts when actually updating
- Prevents false positive reloads when server responds normally
2025-11-26 08:53:00 +01:00
Michel Roegl-Brunner
cd51945d27 Filter categories to only show those with scripts
- Add filter to exclude categories with count 0 from category sidebar
- Only categories with at least one script will be displayed
- Reduces UI clutter by hiding empty categories
2025-11-26 08:50:50 +01:00
Michel Roegl-Brunner
1d36f760a7 Fix downloaded scripts count to include vm/ and tools/ scripts
- Update matching logic to use same robust approach as DownloadedScriptsTab
- Add normalized slug matching to handle filename-based slugs vs JSON slugs
- Add multiple fallback matching strategies for better script detection
- Fixes issue where scripts in vm/ and tools/ directories weren't being counted
2025-11-26 08:48:23 +01:00
Michel Roegl-Brunner
d50aff366c Fix script viewer to support vm/ and tools/ scripts
- Update ScriptDetailModal to extract scriptName from any path (ct/, vm/, tools/)
- Refactor TextViewer to use actual script paths from install_methods
- Remove hardcoded path assumptions and use dynamic script paths
- Only show Install Script tab for ct/ scripts that have install scripts
- Rename CT Script tab to Script for better clarity
2025-11-26 08:47:07 +01:00
Michel Roegl-Brunner
2a9921a4e1 Merge pull request #348 from community-scripts/fix/update_script
fix: Detect script changes from remote repository to allow Script updates
2025-11-26 08:43:27 +01:00
Michel Roegl-Brunner
50f657ba00 Update Node.js version to 24.x in workflow 2025-11-26 08:33:50 +01:00
Michel Roegl-Brunner
5d5eba72de fix: detect script changes from remote repository
- Add refetchOnMount and staleTime: 0 to compareScriptContent query to bypass React Query cache
- Add visible refresh button in script detail modal to manually check for updates
- Improve comparison error handling and logging for better debugging
- Display error messages in UI when comparison fails
- Ensure comparison always checks remote repository when modal opens
2025-11-26 08:32:13 +01:00
Michel Roegl-Brunner
577b96518e package-lock.json 2025-11-26 08:19:39 +01:00
Michel Roegl-Brunner
c6c27271d6 Merge pull request #342 from community-scripts/node24_securityfix 2025-11-24 21:34:06 +01:00
ProxmoxVE Developer
72c0246d8c chore(deps): upgrade to Next.js 16, Vitest 4, and Node.js 24
BREAKING CHANGES:
- Upgrade Next.js from 15.1.6 to 16.0.4
- Use Webpack instead of Turbopack for compatibility with server-side modules
- Upgrade Node.js requirement to >=24.0.0

FEATURES:
- Upgrade Vitest to 4.0.13 with improved testing capabilities
- Update all vitest-related packages (@vitest/ui, @vitest/coverage-v8)
- Upgrade react-syntax-highlighter to 16.1.0
- Update node-cron to 4.2.1
- Update lucide-react to 0.554.0

SECURITY:
- Resolve glob command injection vulnerability (CVE) via v10.5.0
- Fix all npm audit vulnerabilities (0 vulnerabilities found)
- Update prisma/client to 6.19.0
- Update all dependencies to latest secure versions

FIXES:
- Configure next.config.js for webpack with proper server-side module handling
- Update tsconfig.json for Next.js 16 compatibility (jsx: react-jsx)
- Add engines field to require Node.js >=24.0.0
- Remove deprecated webpack config in favor of Next.js 16 compatibility
2025-11-24 21:27:38 +01:00
github-actions[bot]
06d4786e0a chore: add VERSION v0.4.13 (#341)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-11-24 20:08:21 +00: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
github-actions[bot]
213a606fc0 chore: add VERSION v0.4.12 (#336)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-11-20 17:59:41 +00: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
553eae6ce7 docs: add LXC Backups section to help modal 2025-11-18 09:22:13 +01:00
Michel Roegl-Brunner
c2ca88f033 Merge pull request #328 from community-scripts/dependabot/npm_and_yarn/types/node-24.10.1
build(deps-dev): Bump @types/node from 24.9.1 to 24.10.1
2025-11-18 09:20:49 +01:00
Michel Roegl-Brunner
67d44a6a5f Merge pull request #329 from community-scripts/dependabot/npm_and_yarn/eslint-9.39.1
build(deps-dev): Bump eslint from 9.38.0 to 9.39.1
2025-11-18 09:20:40 +01:00
Michel Roegl-Brunner
fe6cca5c63 Merge pull request #331 from community-scripts/feat/lxc_backups
feat: Add LXC container backup functionality
2025-11-18 09:20:21 +01:00
Michel Roegl-Brunner
3a8088ded6 chore: add missing migration for backups and pbs_storage_credentials tables 2025-11-18 09:16:31 +01:00
Michel Roegl-Brunner
5d48c7b61c Merge branch 'main' into feat/lxc_backups 2025-11-18 09:15:03 +01:00
Michel Roegl-Brunner
5be88d361f chore: cleanup debug output from backup modals 2025-11-18 09:11:56 +01:00
dependabot[bot]
014e5b69e9 build(deps-dev): Bump eslint from 9.38.0 to 9.39.1
Bumps [eslint](https://github.com/eslint/eslint) from 9.38.0 to 9.39.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v9.38.0...v9.39.1)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 9.39.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-17 19:48:23 +00:00
dependabot[bot]
f37b2cb26f build(deps-dev): Bump @types/node from 24.9.1 to 24.10.1
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 24.9.1 to 24.10.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 24.10.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-17 19:48:15 +00:00
Michel Roegl-Brunner
81c00f5d40 Merge pull request #327 from community-scripts/dependabot/npm_and_yarn/npm_and_yarn-3c67cbb9cd 2025-11-16 23:21:24 +01:00
dependabot[bot]
9bae95d0aa build(deps-dev): Bump js-yaml
Bumps the npm_and_yarn group with 1 update in the / directory: [js-yaml](https://github.com/nodeca/js-yaml).


Updates `js-yaml` from 4.1.0 to 4.1.1
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-16 10:12:09 +00:00
Michel Roegl-Brunner
088d354fd2 Merge pull request #322 from community-scripts/dependabot/npm_and_yarn/jsdom-27.2.0 2025-11-16 11:11:11 +01:00
Michel Roegl-Brunner
0d47fa5d2a Merge pull request #324 from community-scripts/dependabot/npm_and_yarn/types/react-19.2.4 2025-11-16 11:10:59 +01:00
dependabot[bot]
57fd5f802b build(deps-dev): Bump @types/react from 19.2.2 to 19.2.4
Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 19.2.2 to 19.2.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-version: 19.2.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-14 19:24:46 +00:00
dependabot[bot]
a1825302fa build(deps-dev): Bump jsdom from 27.1.0 to 27.2.0
Bumps [jsdom](https://github.com/jsdom/jsdom) from 27.1.0 to 27.2.0.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Changelog](https://github.com/jsdom/jsdom/blob/main/Changelog.md)
- [Commits](https://github.com/jsdom/jsdom/compare/27.1.0...27.2.0)

---
updated-dependencies:
- dependency-name: jsdom
  dependency-version: 27.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-14 19:24:26 +00:00
Michel Roegl-Brunner
570eea41b9 Implement real-time restore progress updates with polling
- Add restore.log file writing in restoreService.ts for progress tracking
- Create getRestoreProgress query endpoint for polling restore logs
- Implement polling-based progress updates in BackupsTab (1 second interval)
- Update LoadingModal to display all progress logs with auto-scroll
- Remove console.log debug output from restoreService
- Add static 'Restore in progress' text under spinner
- Show success checkmark when restore completes
- Prevent modal dismissal during restore, allow ESC/X button when complete
- Remove step prefixes from log messages for cleaner output
- Keep success/error modals open until user dismisses manually
2025-11-14 15:43:33 +01:00
Michel Roegl-Brunner
33a5b8e4d0 PBS restore working :) 2025-11-14 15:19:34 +01:00
Michel Roegl-Brunner
63174d2ea1 Fix PBS backup discovery command and authentication
- Fix PBS login to use PBS_PASSWORD environment variable instead of stdin
- Change backup discovery command from 'snapshots host/<CT_ID>' to 'snapshot list ct/<CT_ID>'
- Use full repository string (root@pam@IP:DATASTORE) instead of storage name
- Parse table format output correctly (snapshot | size | files)
- Extract snapshot name, size, and date from table output
- Convert size units (MiB/GiB) to bytes for storage
- Fix TypeScript errors with proper null checks
2025-11-14 13:21:53 +01:00
Michel Roegl-Brunner
eda41e5101 Implement PBS authentication support for backup discovery
- Add PBSStorageCredential model to database schema (fingerprint now required)
- Create PBS credentials API router with CRUD operations
- Add PBS login functionality to backup service before discovery
- Create PBSCredentialsModal component for managing credentials
- Integrate PBS credentials management into ServerStoragesModal
- Update storage service to extract PBS IP and datastore info
- Add helpful hint about finding fingerprint on PBS dashboard
- Auto-accept fingerprint during login using stored credentials
2025-11-14 13:12:39 +01:00
Michel Roegl-Brunner
4a50da4968 Add backup discovery tab with support for local and storage backups
- Add Backup model to Prisma schema with fields for container_id, server_id, hostname, backup info
- Create backupService with discovery methods for local (/var/lib/vz/dump/) and storage (/mnt/pve/<storage>/dump/) backups
- Add database methods for backup CRUD operations and grouping by container
- Create backupsRouter with getAllBackupsGrouped and discoverBackups procedures
- Add BackupsTab component with collapsible cards grouped by CT_ID and hostname
- Integrate backups tab into main page navigation
- Filter storages by node hostname matching to only show applicable storages
- Skip PBS backups discovery (temporarily disabled)
- Add comprehensive logging for backup discovery process
2025-11-14 13:04:59 +01:00
Michel Roegl-Brunner
d50ea55e6d Add LXC container backup functionality
- Add backup capability before updates or as standalone action
- Implement storage service to fetch and parse backup-capable storages from PVE nodes
- Add backup storage selection modal for user choice
- Support backup+update flow with sequential execution
- Add standalone backup option in Actions menu
- Add storage viewer in server section to show available storages
- Parse /etc/pve/storage.cfg to identify backup-capable storages
- Cache storage data for performance
- Handle backup failures gracefully (warn but allow update to proceed)
2025-11-14 10:30:27 +01:00
Michel Roegl-Brunner
f558aa4f43 Fix selectedRepositories undefined error with generic filter validation (#321)
- Create filterUtils.ts with getDefaultFilters() and mergeFiltersWithDefaults()
- Update ScriptsGrid, DownloadedScriptsTab, and FilterBar to use utility functions
- Prevents crashes when loading old saved filters missing new properties
- Future-proof: new filter properties automatically get defaults
- Fixes TypeError: can't access property 'length', selectedRepositories is undefined
2025-11-14 09:37:13 +01:00
Michel Roegl-Brunner
4ea49be97d Initial for Backup function 2025-11-14 08:44:33 +01:00
github-actions[bot]
e8c27077fd chore: add VERSION v0.4.11 (#319)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-11-13 14:45:10 +00:00
Michel Roegl-Brunner
e21d1a6eb6 Merge pull request #318 from community-scripts/feat/add_repo
feat: Add multi-repository support with repository filtering
2025-11-13 15:42:18 +01:00
Michel Roegl-Brunner
9608affcf6 Change Position of text 2025-11-13 15:37:20 +01:00
Michel Roegl-Brunner
ac23d015e0 Add helper Text 2025-11-13 15:32:18 +01:00
Michel Roegl-Brunner
5cb7bc95fa Add filter Buttons 2025-11-13 15:26:49 +01:00