From 538bb7824a5fe4afd6722f77cc19956f01b089ea Mon Sep 17 00:00:00 2001 From: Peter Hedenskog Date: Fri, 3 May 2024 22:01:29 +0200 Subject: [PATCH] Include hostname in runtime settings (#4148) --- lib/plugins/html/htmlBuilder.js | 4 ++-- lib/plugins/html/templates/settings.pug | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/plugins/html/htmlBuilder.js b/lib/plugins/html/htmlBuilder.js index fa1f87749..0ef793a1c 100644 --- a/lib/plugins/html/htmlBuilder.js +++ b/lib/plugins/html/htmlBuilder.js @@ -1,7 +1,7 @@ import { join } from 'node:path'; import osName from 'os-name'; import { promisify } from 'node:util'; -import { platform } from 'node:os'; +import { platform, hostname } from 'node:os'; import { createRequire } from 'node:module'; import { fileURLToPath } from 'node:url'; @@ -287,7 +287,6 @@ export class HTMLBuilder { options ) : []; - let rootPath = this.storageManager.rootPathFromUrl(url, daurlAlias); let data = { daurl: url, @@ -454,6 +453,7 @@ export class HTMLBuilder { pageTitle: name, pageDescription: '', browser, + hostname: hostname(), cpuBenchmark, windowSize, os: osInfo, diff --git a/lib/plugins/html/templates/settings.pug b/lib/plugins/html/templates/settings.pug index cbb1a8626..98851f834 100644 --- a/lib/plugins/html/templates/settings.pug +++ b/lib/plugins/html/templates/settings.pug @@ -26,6 +26,10 @@ block content tr td Emulated mobile td Yes + if hostname + tr + td Hostname + td #{hostname} if cpuBenchmark tr td CPU benchmark