Raplce UPS action

This commit is contained in:
Tim Young 2018-05-18 08:13:31 -05:00
parent f5110e542d
commit 1007492961
2 changed files with 7 additions and 4 deletions

View File

@ -263,6 +263,7 @@ namespace EduNetworkBuilder
case NBAction.replace:
break;
case NBAction.replaceUPS:
myNet.RegisterUPSAdded(source.hostname);
break;
case NBAction.poweroff:
source.PowerOff = true;
@ -270,6 +271,7 @@ namespace EduNetworkBuilder
break;
case NBAction.poweron:
source.PowerOff = false;
//We might see about exploding the device here.
break;
}
}

View File

@ -1214,11 +1214,12 @@ namespace EduNetworkBuilder
{
if (ItemClickedOn == null) return;
//Changing a UPS makes sure the power is off when done.
ItemClickedOn.PowerOff = true;
//ItemClickedOn.PowerOff = true;
NB.DoActionPowerOff(ItemClickedOn.GetUniqueIdentifier);
//Mark the replace test as "done"
myNetwork.RegisterDeviceReset(ItemClickedOn.hostname); //replacing something powers it off
myNetwork.RegisterUPSAdded(ItemClickedOn.hostname); //Add the UPS.
//myNetwork.RegisterDeviceReset(ItemClickedOn.hostname); //replacing something powers it off
NB.DoActionReplaceDeviceUPS(ItemClickedOn.GetUniqueIdentifier);
//myNetwork.RegisterUPSAdded(ItemClickedOn.hostname); //Add the UPS.
UpdateVisuals();
}
}