Raplce UPS action
This commit is contained in:
parent
f5110e542d
commit
1007492961
@ -263,6 +263,7 @@ namespace EduNetworkBuilder
|
|||||||
case NBAction.replace:
|
case NBAction.replace:
|
||||||
break;
|
break;
|
||||||
case NBAction.replaceUPS:
|
case NBAction.replaceUPS:
|
||||||
|
myNet.RegisterUPSAdded(source.hostname);
|
||||||
break;
|
break;
|
||||||
case NBAction.poweroff:
|
case NBAction.poweroff:
|
||||||
source.PowerOff = true;
|
source.PowerOff = true;
|
||||||
@ -270,6 +271,7 @@ namespace EduNetworkBuilder
|
|||||||
break;
|
break;
|
||||||
case NBAction.poweron:
|
case NBAction.poweron:
|
||||||
source.PowerOff = false;
|
source.PowerOff = false;
|
||||||
|
//We might see about exploding the device here.
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1214,11 +1214,12 @@ namespace EduNetworkBuilder
|
|||||||
{
|
{
|
||||||
if (ItemClickedOn == null) return;
|
if (ItemClickedOn == null) return;
|
||||||
//Changing a UPS makes sure the power is off when done.
|
//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"
|
//Mark the replace test as "done"
|
||||||
myNetwork.RegisterDeviceReset(ItemClickedOn.hostname); //replacing something powers it off
|
//myNetwork.RegisterDeviceReset(ItemClickedOn.hostname); //replacing something powers it off
|
||||||
|
NB.DoActionReplaceDeviceUPS(ItemClickedOn.GetUniqueIdentifier);
|
||||||
myNetwork.RegisterUPSAdded(ItemClickedOn.hostname); //Add the UPS.
|
//myNetwork.RegisterUPSAdded(ItemClickedOn.hostname); //Add the UPS.
|
||||||
UpdateVisuals();
|
UpdateVisuals();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user