mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-18 02:29:49 +00:00
Run pre-commit hooks over existing codebase
Co-Authored-By: Ben Phelps <ben@phelps.io>
This commit is contained in:
parent
fa50bbad9c
commit
19c25713c4
387 changed files with 4785 additions and 4109 deletions
|
@ -45,8 +45,8 @@ export default function Component({ service }) {
|
|||
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];
|
||||
.filter((el) => (snapshotHost ? el.source.host === snapshotHost : true))
|
||||
.filter((el) => (snapshotPath ? el.source.path === snapshotPath : true))[0];
|
||||
|
||||
if (!statusData || !source) {
|
||||
return (
|
||||
|
@ -59,15 +59,19 @@ export default function Component({ service }) {
|
|||
);
|
||||
}
|
||||
|
||||
const lastRun = source.lastSnapshot.stats.errorCount === 0 ? new Date(source.lastSnapshot.startTime) : t("kopia.failed");
|
||||
const lastRun =
|
||||
source.lastSnapshot.stats.errorCount === 0 ? new Date(source.lastSnapshot.startTime) : t("kopia.failed");
|
||||
const nextTime = source.nextSnapshotTime ? new Date(source.nextSnapshotTime) : null;
|
||||
|
||||
return (
|
||||
<Container service={service}>
|
||||
<Block label="kopia.status" value={ source.status } />
|
||||
<Block label="kopia.size" value={t("common.bbytes", { value: source.lastSnapshot.stats.totalSize, maximumFractionDigits: 1 })} />
|
||||
<Block label="kopia.lastrun" value={ relativeDate(lastRun) } />
|
||||
{nextTime && <Block label="kopia.nextrun" value={ relativeDate(nextTime) } />}
|
||||
<Block label="kopia.status" value={source.status} />
|
||||
<Block
|
||||
label="kopia.size"
|
||||
value={t("common.bbytes", { value: source.lastSnapshot.stats.totalSize, maximumFractionDigits: 1 })}
|
||||
/>
|
||||
<Block label="kopia.lastrun" value={relativeDate(lastRun)} />
|
||||
{nextTime && <Block label="kopia.nextrun" value={relativeDate(nextTime)} />}
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -11,4 +11,4 @@ const widget = {
|
|||
},
|
||||
};
|
||||
|
||||
export default widget;
|
||||
export default widget;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue