Compare commits

..

10 Commits

Author SHA1 Message Date
Michael Shamoon
04fbf315ee Fix startup errors on completely empty settings file
Closes #564
2022-11-27 19:35:45 -08:00
Jason Fischer
41639752e8 Merge pull request #561 from JazzFisch/docker-health
Add container health details to status
2022-11-27 15:03:20 -08:00
Jason Fischer
e0edc2735d Add healthy status if available 2022-11-27 14:54:29 -08:00
Michael Shamoon
e1f217ad80 fix all the byte units display labels to binary
see https://en.wikipedia.org/wiki/Kilobyte
2022-11-27 14:34:49 -08:00
Michael Shamoon
aadedd1864 Fix MiBps label
Closes https://github.com/benphelps/homepage/issues/562

See https://en.wikipedia.org/wiki/Kilobyte
2022-11-27 14:26:36 -08:00
Jason Fischer
07385dc91e Add container health details to status 2022-11-27 09:46:18 -08:00
Michael Shamoon
2631e15275 add optional logs to report 2022-11-27 07:33:25 -08:00
Nonoss117
4f3f25457e Translated using Weblate (French)
Currently translated at 100.0% (253 of 253 strings)

Translation: Homepage/Homepage
Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/fr/
2022-11-27 06:22:01 +01:00
FunsKiTo
c1291b43a4 Translated using Weblate (Spanish)
Currently translated at 100.0% (253 of 253 strings)

Translation: Homepage/Homepage
Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/es/
2022-11-27 06:22:01 +01:00
Michael Shamoon
f16bd91978 fix version number missing 2022-11-26 15:12:15 -08:00
8 changed files with 44 additions and 20 deletions

View File

@@ -59,6 +59,16 @@ body:
label: Configuration
description: Please provide any relevant service, widget or otherwise related configuration here
render: yaml
- type: textarea
id: container-logs
attributes:
label: Container Logs
description: Please review and provide any logs from the container, if relevant
- type: textarea
id: browser-logs
attributes:
label: Browser Logs
description: Please review and provide any relevant logs from the browser, if relevant
- type: textarea
id: other
attributes:

View File

@@ -103,7 +103,7 @@ module.exports = {
const bits = options.bits ? value : value / 8;
const k = 1024;
const dm = options.decimals ? options.decimals : 0;
const sizes = ["Bps", "Kbps", "Mbps", "Gbps", "Tbps", "Pbps", "Ebps", "Zbps", "Ybps"];
const sizes = ["Bps", "KiBps", "MiBps", "GiBps", "TiBps", "PiBps", "EiBps", "ZiBps", "YiBps"];
const i = Math.floor(Math.log(bits) / Math.log(k));

View File

@@ -344,9 +344,9 @@
"total": "Total"
},
"deluge": {
"download": "Download",
"upload": "Upload",
"download": "Descarga",
"upload": "Subida",
"leech": "Leech",
"seed": "Seed"
"seed": "Semilla"
}
}

View File

@@ -344,8 +344,8 @@
"total": "Total"
},
"deluge": {
"download": "Download",
"upload": "Upload",
"download": "Récep.",
"upload": "Envoi",
"leech": "Leech",
"seed": "Seed"
}

View File

@@ -13,9 +13,25 @@ export default function Status({ service }) {
}
if (data && data.status === "running") {
if (data.health === "starting") {
return (
<div className="w-auto px-1.5 py-0.5 text-center bg-theme-500/10 dark:bg-theme-900/50 rounded-b-[3px] overflow-hidden" title={data.health}>
<div className="text-[8px] font-bold text-blue-500/80 uppercase">{data.health}</div>
</div>
);
}
if (data.health === "unhealthy") {
return (
<div className="w-auto px-1.5 py-0.5 text-center bg-theme-500/10 dark:bg-theme-900/50 rounded-b-[3px] overflow-hidden" title={data.health}>
<div className="text-[8px] font-bold text-orange-400/50 dark:text-orange-400/80 uppercase">{data.health}</div>
</div>
);
}
return (
<div className="w-auto px-1.5 py-0.5 text-center bg-theme-500/10 dark:bg-theme-900/50 rounded-b-[3px] overflow-hidden" title={data.status}>
<div className="text-[8px] font-bold text-emerald-500/80 uppercase">{data.status}</div>
<div className="w-auto px-1.5 py-0.5 text-center bg-theme-500/10 dark:bg-theme-900/50 rounded-b-[3px] overflow-hidden" title={data.health ?? data.status}>
<div className="text-[8px] font-bold text-emerald-500/80 uppercase">{data.health ?? data.status}</div>
</div>
);
}

View File

@@ -36,17 +36,14 @@ export default function Version() {
{version} ({revision.substring(0, 7)}, {formatDate(buildTime)})
</>
) : (
releaseData &&
compareVersions(latestRelease.tag_name, version) > 0 && (
<a
href={`https://github.com/benphelps/homepage/releases/tag/${version}`}
target="_blank"
rel="noopener noreferrer"
className="ml-2 text-xs text-theme-500 dark:text-theme-400 flex flex-row items-center"
>
{version} ({revision.substring(0, 7)}, {formatDate(buildTime)})
</a>
)
<a
href={`https://github.com/benphelps/homepage/releases/tag/${version}`}
target="_blank"
rel="noopener noreferrer"
className="ml-2 text-xs text-theme-500 dark:text-theme-400 flex flex-row items-center"
>
{version} ({revision.substring(0, 7)}, {formatDate(buildTime)})
</a>
)}
</span>
{version === "main" || version === "dev" || version === "nightly"

View File

@@ -40,6 +40,7 @@ export default async function handler(req, res) {
return res.status(200).json({
status: info.State.Status,
health: info.State.Health?.Status
});
} catch {
return res.status(500).send({

View File

@@ -32,5 +32,5 @@ export function getSettings() {
const settingsYaml = join(process.cwd(), "config", "settings.yaml");
const fileContents = readFileSync(settingsYaml, "utf8");
return yaml.load(fileContents);
return yaml.load(fileContents) ?? {};
}