[PR #1990] [MERGED] [API] Massive update to api (remove many, optimize website for users) #3343

Closed
opened 2025-11-20 06:04:17 -05:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE/pull/1990
Author: @michelroegl-brunner
Created: 2/3/2025
Status: Merged
Merged: 2/4/2025
Merged by: @MickLesk

Base: mainHead: add_error_to_api


📝 Commits (10+)

📊 Changes

4 files changed (+165 additions, -126 deletions)

View changed files

📝 frontend/src/app/data/page.tsx (+28 -52)
misc/api.func (+125 -0)
📝 misc/build.func (+7 -73)
📝 misc/install.func (+5 -1)

📄 Description

✍️ Description

A few changes to the api:

Factor out API in its own file

This allows the use of the api in install.func to collect error messages during container creation.
This also enables the use of the API not only in LXC, but also in VMs

/frontend/data/page.tsx

Removed the auto reload.
Also added the "Type" field to see if it is a LXC or VM

install.func

In error _hanlder(): source the API Source Code and call the API with the error Message.
change the Line in the if to 44, wich represents the $STD function

###build.func

remove the API implementation and just source the file.


Prerequisites

The following steps must be completed for the pull request to be considered:

  • Self-review performed (I have reviewed my code to ensure it follows established patterns and conventions.)
  • Testing performed (I have thoroughly tested my changes and verified expected functionality.)

🛠️ Type of Change

Please check the relevant options:

  • [] Bug fix (non-breaking change that resolves an issue)
  • [] New feature (non-breaking change that adds functionality)
  • [] Breaking change (fix or feature that would cause existing functionality to change unexpectedly)
  • [] New script (a fully functional and thoroughly tested script or set of scripts)

📋 Additional Information (optional)

Provide any extra context or screenshots about the feature or fix here.


🔄 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/1990 **Author:** [@michelroegl-brunner](https://github.com/michelroegl-brunner) **Created:** 2/3/2025 **Status:** ✅ Merged **Merged:** 2/4/2025 **Merged by:** [@MickLesk](https://github.com/MickLesk) **Base:** `main` ← **Head:** `add_error_to_api` --- ### 📝 Commits (10+) - [`ee10080`](https://github.com/community-scripts/ProxmoxVE/commit/ee10080caa02bfb8bf73d47e33037e932c22580d) Masiv refactor of the api - [`ec2d25e`](https://github.com/community-scripts/ProxmoxVE/commit/ec2d25ed131b2ce74e9b442d22c740501dc1c92c) Masiv refactor of the api - [`156c9ff`](https://github.com/community-scripts/ProxmoxVE/commit/156c9ff4c96340daa2239b2416513a53b8ed53d5) Format page.tsx - [`fa7f50d`](https://github.com/community-scripts/ProxmoxVE/commit/fa7f50dcc025793846a7f05940518d9e329f83b6) Format page.tsx - [`fe9d59e`](https://github.com/community-scripts/ProxmoxVE/commit/fe9d59e69815b805bd9a4c06901496555b1359b1) testing - [`d245a41`](https://github.com/community-scripts/ProxmoxVE/commit/d245a41aa9ff1e5a88ed07da3b4f229dd64cf66f) update build.func - [`27352e9`](https://github.com/community-scripts/ProxmoxVE/commit/27352e9d29071e63841ddd5ba9196cfab43a024b) Change urls to Repo - [`534666b`](https://github.com/community-scripts/ProxmoxVE/commit/534666b96eeccee4c43e1f5abd10e4f1678d6b9b) Change urls to Repo - [`081d856`](https://github.com/community-scripts/ProxmoxVE/commit/081d856f12a6590212487565643db16d13111dbb) update install.func - [`95e608a`](https://github.com/community-scripts/ProxmoxVE/commit/95e608a412d11738201ea4288e11dfe6e29173ed) Add post_to_api_vm ### 📊 Changes **4 files changed** (+165 additions, -126 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/app/data/page.tsx` (+28 -52) ➕ `misc/api.func` (+125 -0) 📝 `misc/build.func` (+7 -73) 📝 `misc/install.func` (+5 -1) </details> ### 📄 Description ## ✍️ Description A few changes to the api: ### Factor out API in its own file This allows the use of the api in install.func to collect error messages during container creation. This also enables the use of the API not only in LXC, but also in VMs ### /frontend/data/page.tsx Removed the auto reload. Also added the "Type" field to see if it is a LXC or VM ### install.func In error _hanlder(): source the API Source Code and call the API with the error Message. change the Line in the if to 44, wich represents the $STD function ###build.func remove the API implementation and just source the file. - - - ## ✅ Prerequisites The following steps must be completed for the pull request to be considered: - [X] Self-review performed (I have reviewed my code to ensure it follows established patterns and conventions.) - [X] Testing performed (I have thoroughly tested my changes and verified expected functionality.) ## 🛠️ Type of Change Please check the relevant options: - [] Bug fix (non-breaking change that resolves an issue) - [] New feature (non-breaking change that adds functionality) - [] Breaking change (fix or feature that would cause existing functionality to change unexpectedly) - [] New script (a fully functional and thoroughly tested script or set of scripts) --- ## 📋 Additional Information (optional) Provide any extra context or screenshots about the feature or fix here. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2025-11-20 06:04:17 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#3343