diff --git a/ts/cli/ups-handler.ts b/ts/cli/ups-handler.ts index f92d542..051f021 100644 --- a/ts/cli/ups-handler.ts +++ b/ts/cli/ups-handler.ts @@ -123,9 +123,6 @@ export class UpsHandler { // Gather SNMP settings await this.gatherSnmpSettings(newUps.snmp, prompt); - // Gather threshold settings - await this.gatherThresholdSettings(newUps.thresholds, prompt); - // Gather UPS model settings await this.gatherUpsModelSettings(newUps.snmp, prompt); @@ -820,39 +817,6 @@ export class UpsHandler { snmpConfig.privKey = privKey.trim() || defaultPrivKey; } - /** - * Gather threshold settings - * @param thresholds Thresholds configuration object to update - * @param prompt Function to prompt for user input - */ - private async gatherThresholdSettings( - thresholds: any, - prompt: (question: string) => Promise, - ): Promise { - logger.log(''); - logger.info('Shutdown Thresholds:'); - - // Battery threshold - const defaultBatteryThreshold = thresholds.battery || 60; - const batteryThresholdInput = await prompt( - `Battery percentage threshold [${defaultBatteryThreshold}%]: `, - ); - const batteryThreshold = parseInt(batteryThresholdInput, 10); - thresholds.battery = batteryThresholdInput.trim() && !isNaN(batteryThreshold) - ? batteryThreshold - : defaultBatteryThreshold; - - // Runtime threshold - const defaultRuntimeThreshold = thresholds.runtime || 20; - const runtimeThresholdInput = await prompt( - `Runtime minutes threshold [${defaultRuntimeThreshold} minutes]: `, - ); - const runtimeThreshold = parseInt(runtimeThresholdInput, 10); - thresholds.runtime = runtimeThresholdInput.trim() && !isNaN(runtimeThreshold) - ? runtimeThreshold - : defaultRuntimeThreshold; - } - /** * Gather UPS model settings * @param snmpConfig SNMP configuration object to update