Merge branch 'benphelps:main' into main
This commit is contained in:
commit
47d6bd1fe2
@ -8,7 +8,9 @@ export default function Logo({ options }) {
|
|||||||
<Container options={options}>
|
<Container options={options}>
|
||||||
<Raw>
|
<Raw>
|
||||||
{options.icon ?
|
{options.icon ?
|
||||||
<ResolvedIcon icon={options.icon} width={48} height={48} /> :
|
<div className="mr-3">
|
||||||
|
<ResolvedIcon icon={options.icon} width={48} height={48} />
|
||||||
|
</div> :
|
||||||
// fallback to homepage logo
|
// fallback to homepage logo
|
||||||
<div className="w-12 h-12">
|
<div className="w-12 h-12">
|
||||||
<svg
|
<svg
|
||||||
|
|||||||
@ -291,6 +291,8 @@ export function cleanServiceGroups(groups) {
|
|||||||
volume, // diskstation widget,
|
volume, // diskstation widget,
|
||||||
enableQueue, // sonarr/radarr
|
enableQueue, // sonarr/radarr
|
||||||
node, // Proxmox
|
node, // Proxmox
|
||||||
|
snapshotHost, // kopia
|
||||||
|
snapshotPath,
|
||||||
} = cleanedService.widget;
|
} = cleanedService.widget;
|
||||||
|
|
||||||
let fieldsList = fields;
|
let fieldsList = fields;
|
||||||
@ -345,6 +347,10 @@ export function cleanServiceGroups(groups) {
|
|||||||
if (["diskstation", "qnap"].includes(type)) {
|
if (["diskstation", "qnap"].includes(type)) {
|
||||||
if (volume) cleanedService.widget.volume = volume;
|
if (volume) cleanedService.widget.volume = volume;
|
||||||
}
|
}
|
||||||
|
if (type === "kopia") {
|
||||||
|
if (snapshotHost) cleanedService.widget.snapshotHost = snapshotHost;
|
||||||
|
if (snapshotPath) cleanedService.widget.snapshotPath = snapshotPath;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return cleanedService;
|
return cleanedService;
|
||||||
|
|||||||
@ -41,7 +41,12 @@ export default function Component({ service }) {
|
|||||||
return <Container service={service} error={statusError} />;
|
return <Container service={service} error={statusError} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
const source = statusData?.sources[0];
|
const snapshotHost = service.widget?.snapshotHost;
|
||||||
|
const snapshotPath = service.widget?.snapshotPath;
|
||||||
|
|
||||||
|
const source = statusData?.sources
|
||||||
|
.filter(el => snapshotHost ? el.source.host === snapshotHost : true)
|
||||||
|
.filter(el => snapshotPath ? el.source.path === snapshotPath : true)[0];
|
||||||
|
|
||||||
if (!statusData || !source) {
|
if (!statusData || !source) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user