diff --git a/src/utils/config/service-helpers.js b/src/utils/config/service-helpers.js index 901ae5f62..83b4b07bc 100644 --- a/src/utils/config/service-helpers.js +++ b/src/utils/config/service-helpers.js @@ -297,6 +297,7 @@ export function cleanServiceGroups(groups) { repositoryId, metric, // glances stream, // mjpeg + fit, } = cleanedService.widget; let fieldsList = fields; @@ -365,6 +366,7 @@ export function cleanServiceGroups(groups) { } if (type === "mjpeg") { if (stream) cleanedService.widget.stream = stream; + if (fit) cleanedService.widget.fit = fit; } } diff --git a/src/widgets/mjpeg/component.jsx b/src/widgets/mjpeg/component.jsx index dd29f0a5d..30907c311 100644 --- a/src/widgets/mjpeg/component.jsx +++ b/src/widgets/mjpeg/component.jsx @@ -2,13 +2,13 @@ import Image from "next/image"; export default function Component({ service }) { const { widget } = service; - const { stream } = widget; + const { stream, fit = "contain" } = widget; return (