From d8c2e2c0262a770dd23f2b5e6965f11b41bb7c8e Mon Sep 17 00:00:00 2001 From: Shukri Adams Date: Thu, 29 Dec 2022 13:45:22 +0100 Subject: [PATCH] minor fixes - fixed path root on new views - better plurals - layout tweaks --- src/package-lock.json | 4 ++-- src/package.json | 2 +- src/public/css/overrides.css | 1 + src/routes/watcher.js | 2 +- src/views/helpers/pluralizer.js | 2 +- src/views/pages/invalidDashboard.hbs | 2 +- src/views/pages/watcher.hbs | 2 +- src/views/partials/layout.hbs | 1 + 8 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/package-lock.json b/src/package-lock.json index 89fa427..a9f1588 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -5699,8 +5699,8 @@ } }, "timebelt": { - "version": "git+https://github.com/shukriadams/timebelt.git#cebfc5b234e450dd9fab051d1b0d55f666a1132d", - "from": "git+https://github.com/shukriadams/timebelt.git#0.1.16" + "version": "git+https://github.com/shukriadams/timebelt.git#7774b0c9186d9f2341284723b19a8642a0dc30a4", + "from": "git+https://github.com/shukriadams/timebelt.git#0.1.17" }, "traverse": { "version": "0.3.9", diff --git a/src/package.json b/src/package.json index 01973bd..f8d2570 100644 --- a/src/package.json +++ b/src/package.json @@ -39,7 +39,7 @@ "dotenv": "9.0.2", "ping": "0.4.1", "@slack/bolt": "3.4.0", - "timebelt": "https://github.com/shukriadams/timebelt.git#0.1.16", + "timebelt": "https://github.com/shukriadams/timebelt.git#0.1.17", "winston-wrapper": "https://github.com/shukriadams/winston-wrapper.git#0.1.0", "madscience-fsUtils": "https://github.com/shukriadams/node-fsUtils.git#0.0.12", "madscience-httputils": "https://github.com/shukriadams/node-httpUtils.git#0.0.8", diff --git a/src/public/css/overrides.css b/src/public/css/overrides.css index 21ea986..d290037 100644 --- a/src/public/css/overrides.css +++ b/src/public/css/overrides.css @@ -104,6 +104,7 @@ x-columns { background-color: var(--color-ebonyClay); position: relative; z-index: 1; /* menu in headers can float over body content */ + overflow: hidden; } .layout-header a { diff --git a/src/routes/watcher.js b/src/routes/watcher.js index c29775d..51182f1 100644 --- a/src/routes/watcher.js +++ b/src/routes/watcher.js @@ -125,7 +125,7 @@ module.exports = express => { totalDownTime : timebelt.minutesToPeriodString(totalDownTime), watcherRuntime : startDate ? timebelt.timespanString(new Date(), startDate, ' days', ' hours', ' minutes', ' seconds') : null, page : arrayHelper.toPage(files, page, settings.pageSize), - baseurl : `/watcher/${watcher.__safeId}?`, + baseurl : `${settings.rootpath}watcher/${watcher.__safeId}?`, rootpath: settings.rootpath })) diff --git a/src/views/helpers/pluralizer.js b/src/views/helpers/pluralizer.js index b87d59c..e6661e6 100644 --- a/src/views/helpers/pluralizer.js +++ b/src/views/helpers/pluralizer.js @@ -1,5 +1,5 @@ module.exports = Handlebars => { Handlebars.registerHelper('pluralizer', (count, word)=>{ - return `${word}${count > 1 ? 's': ''}` + return `${word}${count === 1 ? '': 's'}` }) } \ No newline at end of file diff --git a/src/views/pages/invalidDashboard.hbs b/src/views/pages/invalidDashboard.hbs index c03475c..4eb680d 100644 --- a/src/views/pages/invalidDashboard.hbs +++ b/src/views/pages/invalidDashboard.hbs @@ -1,7 +1,7 @@ {{#extend "layout"}} {{#content "body"}}
- "{{title}}" isn't a valid dashboard. Would you like to try {{dashboard.name}} instead? + "{{title}}" isn't a valid dashboard. Would you like to try {{dashboard.name}} instead?
{{/content}} {{/extend}} \ No newline at end of file diff --git a/src/views/pages/watcher.hbs b/src/views/pages/watcher.hbs index 17b6b4c..6feb7e4 100644 --- a/src/views/pages/watcher.hbs +++ b/src/views/pages/watcher.hbs @@ -26,7 +26,7 @@ {{#if dashboardsWithWatcher}}
On dashboards
{{#each dashboardsWithWatcher}} - {{name}} + {{name}} {{/each}} {{/if}} diff --git a/src/views/partials/layout.hbs b/src/views/partials/layout.hbs index ff87acb..c53a1ce 100644 --- a/src/views/partials/layout.hbs +++ b/src/views/partials/layout.hbs @@ -39,6 +39,7 @@ +