feat(snmp): add configurable SNMP runtime units with v4.3 migration support
This commit is contained in:
@@ -142,7 +142,7 @@ export class NupstDaemon {
|
||||
|
||||
/** Default configuration */
|
||||
private readonly DEFAULT_CONFIG: INupstConfig = {
|
||||
version: '4.2',
|
||||
version: '4.3',
|
||||
upsDevices: [
|
||||
{
|
||||
id: 'default',
|
||||
@@ -162,6 +162,7 @@ export class NupstDaemon {
|
||||
privKey: '',
|
||||
// UPS model for OID selection
|
||||
upsModel: 'cyberpower',
|
||||
runtimeUnit: 'ticks',
|
||||
},
|
||||
groups: [],
|
||||
actions: [
|
||||
@@ -260,7 +261,7 @@ export class NupstDaemon {
|
||||
|
||||
// Ensure version is always set and remove legacy fields before saving
|
||||
const configToSave: INupstConfig = {
|
||||
version: '4.2',
|
||||
version: '4.3',
|
||||
upsDevices: config.upsDevices,
|
||||
groups: config.groups,
|
||||
checkInterval: config.checkInterval,
|
||||
|
||||
Reference in New Issue
Block a user