mirror of
https://github.com/gethomepage/homepage.git
synced 2026-04-06 10:11:22 -07:00
Normalize widget version in URLs
This commit is contained in:
@@ -10,6 +10,7 @@ import { getKubeConfig } from "utils/config/kubernetes";
|
||||
import * as shvl from "utils/config/shvl";
|
||||
import kubernetes from "utils/kubernetes/export";
|
||||
import createLogger from "utils/logger";
|
||||
import { parseVersionForUrl } from "utils/proxy/api-helpers";
|
||||
|
||||
const logger = createLogger("service-helpers");
|
||||
|
||||
@@ -113,7 +114,7 @@ export async function servicesFromDocker() {
|
||||
}
|
||||
let substitutedVal = substituteEnvironmentVars(containerLabels[label]);
|
||||
if (value === "widget.version" || /^widgets\[\d+\]\.version$/.test(value)) {
|
||||
substitutedVal = parseInt(substitutedVal, 10);
|
||||
substitutedVal = parseVersionForUrl(substitutedVal);
|
||||
}
|
||||
shvl.set(constructedService, value, substitutedVal);
|
||||
}
|
||||
@@ -590,7 +591,7 @@ export function cleanServiceGroups(groups) {
|
||||
"vikunja",
|
||||
].includes(type)
|
||||
) {
|
||||
if (version) widget.version = parseInt(version, 10);
|
||||
widget.version = parseVersionForUrl(version);
|
||||
}
|
||||
if (type === "glances") {
|
||||
if (metric) widget.metric = metric;
|
||||
|
||||
Reference in New Issue
Block a user