mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 09:35:54 -08:00
Add Proxmox Backup Server Widget (#879)
* Add Proxmox Backup Server Widget * Clarification added to Failed Tasks * Refactor pbs to proxmoxbackupserver * Removing property instead of recreating object * minor code styling of proxmoxbackupserver widget --------- Co-authored-by: Eizock <> Co-authored-by: Michael Shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
22
src/widgets/proxmoxbackupserver/widget.js
Normal file
22
src/widgets/proxmoxbackupserver/widget.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import credentialedProxyHandler from "utils/proxy/handlers/credentialed";
|
||||
|
||||
const since = Date.now() - (24 * 60 * 60 * 1000);
|
||||
|
||||
const widget = {
|
||||
api: "{url}/api2/json/{endpoint}",
|
||||
proxyHandler: credentialedProxyHandler,
|
||||
|
||||
mappings: {
|
||||
"status/datastore-usage": {
|
||||
endpoint: "status/datastore-usage",
|
||||
},
|
||||
"nodes/localhost/tasks": {
|
||||
endpoint: `nodes/localhost/tasks?errors=true&limit=100&since=${since}`,
|
||||
},
|
||||
"nodes/localhost/status": {
|
||||
endpoint: "nodes/localhost/status",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default widget;
|
||||
Reference in New Issue
Block a user