From 10753354979b958dcd8ef0cb7d89ea60ed7683c5 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Fri, 28 Mar 2025 22:27:21 +0000 Subject: [PATCH] fix(cli): Improve table header formatting in group and UPS listings --- changelog.md | 6 ++++++ ts/00_commitinfo_data.ts | 2 +- ts/cli/group-handler.ts | 2 +- ts/cli/ups-handler.ts | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index f8117f0..a30f889 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 2025-03-28 - 3.1.1 - fix(cli) +Improve table header formatting in group and UPS listings + +- Adjusted column padding in group listing for proper alignment +- Fixed UPS table header spacing for consistent CLI output + ## 2025-03-28 - 3.1.0 - feat(cli) Refactor CLI commands to use dedicated handlers for UPS, group, and service management diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index a6af9b4..1e78123 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@serve.zone/nupst', - version: '3.1.0', + version: '3.1.1', description: 'Node.js UPS Shutdown Tool for SNMP-enabled UPS devices' } diff --git a/ts/cli/group-handler.ts b/ts/cli/group-handler.ts index e3fdb6b..481043d 100644 --- a/ts/cli/group-handler.ts +++ b/ts/cli/group-handler.ts @@ -59,7 +59,7 @@ export class GroupHandler { } else { logger.logBoxLine(`Found ${config.groups.length} group(s)`); logger.logBoxLine(''); - logger.logBoxLine('ID | Name | Mode | UPS Devices'); + logger.logBoxLine('ID | Name | Mode | UPS Devices'); logger.logBoxLine('-----------+----------------------+--------------+----------------'); for (const group of config.groups) { diff --git a/ts/cli/ups-handler.ts b/ts/cli/ups-handler.ts index e58dba8..13709e7 100644 --- a/ts/cli/ups-handler.ts +++ b/ts/cli/ups-handler.ts @@ -400,7 +400,7 @@ export class UpsHandler { } else { logger.logBoxLine(`Found ${config.upsDevices.length} UPS device(s)`); logger.logBoxLine(''); - logger.logBoxLine('ID | Name | Host | Mode | Groups'); + logger.logBoxLine('ID | Name | Host | Mode | Groups'); logger.logBoxLine('-----------+----------------------+----------------+--------------+----------------'); for (const ups of config.upsDevices) {