We can replace a switch if it has a bad nic.

This commit is contained in:
Tim Young 2018-03-24 09:04:37 -05:00
parent 762ff62a32
commit 10ef0a426f
2 changed files with 17 additions and 2 deletions

View File

@ -1986,6 +1986,10 @@ namespace EduNetworkBuilder
{ {
one.SetDone(); one.SetDone();
} }
if (one.sHost == source && one.TheTest == NetTestType.DeviceNICSprays)
{
one.SetDone();
}
} }
} }

View File

@ -1026,9 +1026,20 @@ namespace EduNetworkBuilder
pbNetworkView.ContextMenuStrip.Items.Add(NB.Translate("NB_PowerOff")); pbNetworkView.ContextMenuStrip.Items.Add(NB.Translate("NB_PowerOff"));
pbNetworkView.ContextMenuStrip.Items[index++].Click += pbNetworkView_PowerOff_Click; pbNetworkView.ContextMenuStrip.Items[index++].Click += pbNetworkView_PowerOff_Click;
} }
if (myNetwork.ItemHasTest(ReleasedOn.hostname, NetTestType.DeviceBlowsUpWithPower) || ReleasedOn.IsBurned) if (myNetwork.ItemHasTest(ReleasedOn.hostname, NetTestType.DeviceBlowsUpWithPower) ||
myNetwork.ItemHasTest(ReleasedOn.hostname, NetTestType.DeviceNICSprays) ||
ReleasedOn.IsBurned)
{ {
if (!myNetwork.ItemTestIsComplete(ReleasedOn.hostname, NetTestType.DeviceBlowsUpWithPower)) bool toDo = false;
if (ReleasedOn.IsBurned) toDo = true;
if(myNetwork.ItemHasTest(ReleasedOn.hostname, NetTestType.DeviceBlowsUpWithPower))
toDo = !myNetwork.ItemTestIsComplete(ReleasedOn.hostname, NetTestType.DeviceBlowsUpWithPower);
if (myNetwork.ItemHasTest(ReleasedOn.hostname, NetTestType.DeviceNICSprays))
{
if (ReleasedOn.ForwardsPackets())
toDo = true; //with PCs and the like, we replace the individual nic
}
if (toDo)
{ {
//If the item is bad and has not been replaced, then add a context menu to replace it //If the item is bad and has not been replaced, then add a context menu to replace it
pbNetworkView.ContextMenuStrip.Items.Add(NB.Translate("NB_Replace")); pbNetworkView.ContextMenuStrip.Items.Add(NB.Translate("NB_Replace"));