mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-06 21:57:48 +01:00
glances widget test 1
This commit is contained in:
@@ -294,7 +294,8 @@ export function cleanServiceGroups(groups) {
|
||||
snapshotHost, // kopia
|
||||
snapshotPath,
|
||||
userEmail, // azuredevops
|
||||
repositoryId
|
||||
repositoryId,
|
||||
metric, // glances
|
||||
} = cleanedService.widget;
|
||||
|
||||
let fieldsList = fields;
|
||||
@@ -358,6 +359,9 @@ export function cleanServiceGroups(groups) {
|
||||
if (snapshotHost) cleanedService.widget.snapshotHost = snapshotHost;
|
||||
if (snapshotPath) cleanedService.widget.snapshotPath = snapshotPath;
|
||||
}
|
||||
if (type === "glances") {
|
||||
if (metric) cleanedService.widget.metric = metric;
|
||||
}
|
||||
}
|
||||
|
||||
return cleanedService;
|
||||
|
||||
@@ -64,6 +64,8 @@ export default async function credentialedProxyHandler(req, res, map) {
|
||||
}
|
||||
else if (widget.type === "azuredevops") {
|
||||
headers.Authorization = `Basic ${Buffer.from(`$:${widget.key}`).toString("base64")}`;
|
||||
} else if (widget.type === "glances") {
|
||||
headers.Authorization = `Basic ${Buffer.from(`${widget.username}:${widget.password}`).toString("base64")}`;
|
||||
} else {
|
||||
headers["X-API-Key"] = `${widget.key}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user