feat(cli): remove ALL ugly boxes from status output - now fully beautiful
Removed the last remaining ugly ASCII boxes: - Version info box (┌─┐│└┘) that appeared at top - Async version check box that ended randomly in middle - Configuration error box Now status output is 100% clean and beautiful with just colored text: ● Service: active (running) PID: 9120 Memory: 45.7M CPU: 190ms UPS Devices (2): ⚠ Test UPS (SNMP v1) - On Battery Battery: 100% ✓ Runtime: 48 min Host: 192.168.187.140:161 ◯ Test UPS (SNMP v3) - Unknown Battery: 0% ⚠ Runtime: 0 min Host: 192.168.187.140:161 No boxes, just beautiful colored output with symbols! Bumped to v4.1.0 to mark completion of beautiful CLI feature.
This commit is contained in:
@@ -50,11 +50,11 @@ WantedBy=multi-user.target
|
||||
try {
|
||||
await fs.access(configPath);
|
||||
} catch (error) {
|
||||
const boxWidth = 50;
|
||||
logger.logBoxTitle('Configuration Error', boxWidth);
|
||||
logger.logBoxLine(`No configuration file found at ${configPath}`);
|
||||
logger.logBoxLine("Please run 'nupst add' first to create a UPS configuration.");
|
||||
logger.logBoxEnd();
|
||||
console.log('');
|
||||
console.log(`${symbols.error} ${theme.error('No configuration found')}`);
|
||||
console.log(` ${theme.dim('Config file:')} ${configPath}`);
|
||||
console.log(` ${theme.dim('Run')} ${theme.command('nupst ups add')} ${theme.dim('to create a configuration')}`);
|
||||
console.log('');
|
||||
throw new Error('Configuration not found');
|
||||
}
|
||||
}
|
||||
@@ -138,16 +138,12 @@ WantedBy=multi-user.target
|
||||
try {
|
||||
// Enable debug mode if requested
|
||||
if (debugMode) {
|
||||
const boxWidth = 45;
|
||||
logger.logBoxTitle('Debug Mode', boxWidth);
|
||||
logger.logBoxLine('SNMP debugging enabled - detailed logs will be shown');
|
||||
logger.logBoxEnd();
|
||||
console.log('');
|
||||
logger.info('Debug Mode: SNMP debugging enabled');
|
||||
console.log('');
|
||||
this.daemon.getNupstSnmp().enableDebug();
|
||||
}
|
||||
|
||||
// Display version information
|
||||
this.daemon.getNupstSnmp().getNupst().logVersionInfo();
|
||||
|
||||
// Check if config exists first
|
||||
try {
|
||||
await this.checkConfigExists();
|
||||
|
Reference in New Issue
Block a user