[PR #3765] [MERGED] core: move misc scripts to structured addon/pve paths | Refactor JSON Editor & Script Mapping #4515

Closed
opened 2026-02-26 14:31:13 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE/pull/3765
Author: @MickLesk
Created: 4/9/2025
Status: Merged
Merged: 4/9/2025
Merged by: @tremor021

Base: mainHead: addons_pve


📝 Commits (5)

📊 Changes

88 files changed (+1327 additions, -1481 deletions)

View changed files

📝 frontend/public/json/add-lxc-iptag.json (+42 -44)
📝 frontend/public/json/add-netbird-lxc.json (+42 -44)
📝 frontend/public/json/add-tailscale-lxc.json (+42 -44)
📝 frontend/public/json/all-templates.json (+36 -38)
📝 frontend/public/json/clean-lxcs.json (+36 -38)
📝 frontend/public/json/clean-orphaned-lvm.json (+35 -37)
📝 frontend/public/json/code-server.json (+35 -39)
📝 frontend/public/json/cron-update-lxcs.json (+38 -41)
📝 frontend/public/json/crowdsec.json (+36 -38)
📝 frontend/public/json/filebrowser.json (+45 -47)
📝 frontend/public/json/fstrim.json (+38 -40)
📝 frontend/public/json/glances.json (+39 -41)
📝 frontend/public/json/host-backup.json (+39 -41)
📝 frontend/public/json/kernel-clean.json (+35 -37)
📝 frontend/public/json/kernel-pin.json (+35 -37)
📝 frontend/public/json/lxc-delete.json (+35 -37)
📝 frontend/public/json/microcode.json (+38 -40)
📝 frontend/public/json/monitor-all.json (+62 -64)
📝 frontend/public/json/netdata.json (+36 -38)
📝 frontend/public/json/olivetin.json (+36 -38)

...and 68 more files

📄 Description

Summary

This PR includes structural and functional refactoring across the JSON editor, frontend logic, and tool script organization:


🔧 Frontend Changes

  • Improved InstallMethod handling:
    • Dynamically generates the script path based on type and slug
    • Correct path is now assigned immediately when adding a new install method
  • Enhanced updateScript logic in JSON editor:
    • Correct paths for types: ct, vm, pve, addon
  • Better UX and validation:
    • Zod error rendering improved
    • Various UI adjustments (ScriptInfoBlocks, ScriptItems, etc.)
  • Significant code cleanup (100+ lines removed)

🗂 File Structure Changes

  • Moved shell scripts from misc/ into:
    • tools/pve/
    • tools/addon/
  • File names retained – only the path structure changed
  • This enables precise script path mapping in generated JSON based on type

🗃 JSON Template Updates

  • Unified formatting across all JSON templates
  • Updated all script paths according to the new tools/... logic

📦 Additional Changes

  • Shell script updated: install/daemonsync-install.sh

Motivation

These changes improve:

  • Scalability of tool script organization
  • Reliability and validity of generated JSON metadata
  • Code clarity by reflecting script.type structurally

Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • [] No breaking changes – Existing functionality remains intact.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.
image

🔄 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/pull/3765 **Author:** [@MickLesk](https://github.com/MickLesk) **Created:** 4/9/2025 **Status:** ✅ Merged **Merged:** 4/9/2025 **Merged by:** [@tremor021](https://github.com/tremor021) **Base:** `main` ← **Head:** `addons_pve` --- ### 📝 Commits (5) - [`3dbc7f8`](https://github.com/community-scripts/ProxmoxVE/commit/3dbc7f80d2fd62ef8878842ac4a271c9b99fecc8) Move Scripts to Tools / Add-Ons - [`42b9a17`](https://github.com/community-scripts/ProxmoxVE/commit/42b9a1721800ec8dfe8cbc1f119d27de0fff0340) fix json editor slug generating - [`0a67b0f`](https://github.com/community-scripts/ProxmoxVE/commit/0a67b0ff53bee6ff0fa1eea83c51341ae3bde073) update type in jsons - [`bdb7f21`](https://github.com/community-scripts/ProxmoxVE/commit/bdb7f21e2f4b62e05b63a51294963ea72cf14e7a) remove wrong method - [`038f4e1`](https://github.com/community-scripts/ProxmoxVE/commit/038f4e144b5036b1870146536efee88b12a699fe) move copy-data to tools ### 📊 Changes **88 files changed** (+1327 additions, -1481 deletions) <details> <summary>View changed files</summary> 📝 `frontend/public/json/add-lxc-iptag.json` (+42 -44) 📝 `frontend/public/json/add-netbird-lxc.json` (+42 -44) 📝 `frontend/public/json/add-tailscale-lxc.json` (+42 -44) 📝 `frontend/public/json/all-templates.json` (+36 -38) 📝 `frontend/public/json/clean-lxcs.json` (+36 -38) 📝 `frontend/public/json/clean-orphaned-lvm.json` (+35 -37) 📝 `frontend/public/json/code-server.json` (+35 -39) 📝 `frontend/public/json/cron-update-lxcs.json` (+38 -41) 📝 `frontend/public/json/crowdsec.json` (+36 -38) 📝 `frontend/public/json/filebrowser.json` (+45 -47) 📝 `frontend/public/json/fstrim.json` (+38 -40) 📝 `frontend/public/json/glances.json` (+39 -41) 📝 `frontend/public/json/host-backup.json` (+39 -41) 📝 `frontend/public/json/kernel-clean.json` (+35 -37) 📝 `frontend/public/json/kernel-pin.json` (+35 -37) 📝 `frontend/public/json/lxc-delete.json` (+35 -37) 📝 `frontend/public/json/microcode.json` (+38 -40) 📝 `frontend/public/json/monitor-all.json` (+62 -64) 📝 `frontend/public/json/netdata.json` (+36 -38) 📝 `frontend/public/json/olivetin.json` (+36 -38) _...and 68 more files_ </details> ### 📄 Description ## ✨ Summary This PR includes structural and functional refactoring across the JSON editor, frontend logic, and tool script organization: --- ## 🔧 Frontend Changes - Improved `InstallMethod` handling: - Dynamically generates the `script` path based on `type` and `slug` - Correct path is now assigned immediately when adding a new install method - Enhanced `updateScript` logic in JSON editor: - Correct paths for types: `ct`, `vm`, `pve`, `addon` - Better UX and validation: - Zod error rendering improved - Various UI adjustments (`ScriptInfoBlocks`, `ScriptItems`, etc.) - Significant code cleanup (100+ lines removed) --- ## 🗂 File Structure Changes - Moved shell scripts from `misc/` into: - `tools/pve/` - `tools/addon/` - File names retained – only the path structure changed - This enables precise script path mapping in generated JSON based on `type` --- ## 🗃 JSON Template Updates - Unified formatting across all JSON templates - Updated all script paths according to the new `tools/...` logic --- ## 📦 Additional Changes - Shell script updated: `install/daemonsync-install.sh` --- ## ✅ Motivation These changes improve: - Scalability of tool script organization - Reliability and validity of generated JSON metadata - Code clarity by reflecting `script.type` structurally ## ✅ Prerequisites (**X** in brackets) - [x] **Self-review completed** – Code follows project standards. - [x] **Tested thoroughly** – Changes work as expected. - [] **No breaking changes** – Existing functionality remains intact. - [x] **No security risks** – No hardcoded secrets, unnecessary privilege escalations, or permission issues. --- ## 🛠️ Type of Change (**X** in brackets) - [ ] 🐞 **Bug fix** – Resolves an issue without breaking functionality. - [ ] ✨ **New feature** – Adds new, non-breaking functionality. - [ ] 💥 **Breaking change** – Alters existing functionality in a way that may require updates. - [ ] 🆕 **New script** – A fully functional and tested script or script set. - [ ] 🌍 **Website update** – Changes to website-related JSON files or metadata. - [x] 🔧 **Refactoring / Code Cleanup** – Improves readability or maintainability without changing functionality. - [ ] 📝 **Documentation update** – Changes to `README`, `AppName.md`, `CONTRIBUTING.md`, or other docs. <img width="291" alt="image" src="https://github.com/user-attachments/assets/72db2d30-8250-4595-8a44-35faf872c081" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 14:31:13 +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#4515
No description provided.