|
119 | 119 | @if((ConnHandler.ActConn.InterfaceIsRequested && ConnHandler.ActConn.SrcFromInterface) || (ConnHandler.ActConn.IsRequested && ConnHandler.ActConn.SourceFilled())) |
120 | 120 | { |
121 | 121 | @((MarkupString)ModellingHandlerBase.DisplayReqInt(userConfig, ConnHandler.ActConn.TicketId, ConnHandler.ActConn.InterfaceIsRequested, |
122 | | - ConnHandler.ActConn.GetBoolProperty(ConState.InterfaceRejected.ToString()) || ConnHandler.ActConn.GetBoolProperty(ConState.Rejected.ToString()))) |
| 122 | + ConnHandler.ActConn.GetBoolProperty(ConState.InterfaceRejected.ToString()) || ConnHandler.ActConn.GetBoolProperty(ConState.Rejected.ToString()))) |
123 | 123 | } |
124 | 124 | else |
125 | 125 | { |
|
217 | 217 | @if(ConnHandler.ActConn.InterfaceIsRequested || ConnHandler.ActConn.IsRequested) |
218 | 218 | { |
219 | 219 | @((MarkupString)ModellingHandlerBase.DisplayReqInt(userConfig, ConnHandler.ActConn.TicketId, ConnHandler.ActConn.InterfaceIsRequested, |
220 | | - ConnHandler.ActConn.GetBoolProperty(ConState.InterfaceRejected.ToString()) || ConnHandler.ActConn.GetBoolProperty(ConState.Rejected.ToString()))) |
| 220 | + ConnHandler.ActConn.GetBoolProperty(ConState.InterfaceRejected.ToString()) || ConnHandler.ActConn.GetBoolProperty(ConState.Rejected.ToString()))) |
221 | 221 | } |
222 | 222 | else |
223 | 223 | { |
|
277 | 277 | @if((ConnHandler.ActConn.InterfaceIsRequested && ConnHandler.ActConn.DstFromInterface) || (ConnHandler.ActConn.IsRequested && ConnHandler.ActConn.DestinationFilled())) |
278 | 278 | { |
279 | 279 | @((MarkupString)ModellingHandlerBase.DisplayReqInt(userConfig, ConnHandler.ActConn.TicketId, ConnHandler.ActConn.InterfaceIsRequested, |
280 | | - ConnHandler.ActConn.GetBoolProperty(ConState.InterfaceRejected.ToString()) || ConnHandler.ActConn.GetBoolProperty(ConState.Rejected.ToString()))) |
| 280 | + ConnHandler.ActConn.GetBoolProperty(ConState.InterfaceRejected.ToString()) || ConnHandler.ActConn.GetBoolProperty(ConState.Rejected.ToString()))) |
281 | 281 | } |
282 | 282 | else |
283 | 283 | { |
|
487 | 487 |
|
488 | 488 | private async Task HandleSrcDrop() |
489 | 489 | { |
490 | | - if (ConnHandler is null || !ConnHandler.NetworkAreaUseAllowed(Container)) |
491 | | - { |
492 | | - Container.Clear(); |
493 | | - return; |
494 | | - } |
495 | | - |
496 | 490 | if(Container.ConnElement != null) |
497 | 491 | { |
498 | 492 | if(ConnHandler!.ActConn.IsInterface) |
|
512 | 506 | } |
513 | 507 | if(Container.AreaElements.Count > 0) |
514 | 508 | { |
515 | | - ConnHandler?.AreasToSource(Container.AreaElements); |
| 509 | + if (ConnHandler is not null && !ConnHandler.NetworkAreaUseAllowed(Container.AreaElements, out string reason)) |
| 510 | + { |
| 511 | + DisplayMessageInUi(default, "Add Network Area", reason, true); |
| 512 | + Container.Clear(); |
| 513 | + return; |
| 514 | + } |
| 515 | + |
| 516 | + ConnHandler?.AreasToSource(Container.AreaElements); |
516 | 517 | } |
517 | 518 | if(Container.NwGroupElements.Count > 0) |
518 | 519 | { |
|
528 | 529 |
|
529 | 530 | private async Task HandleDstDrop() |
530 | 531 | { |
531 | | - if (ConnHandler is null || !ConnHandler.NetworkAreaUseAllowed(Container)) |
532 | | - { |
533 | | - Container.Clear(); |
534 | | - return; |
535 | | - } |
536 | | - |
537 | 532 | if(Container.ConnElement != null) |
538 | 533 | { |
539 | 534 | if(ConnHandler!.ActConn.IsInterface) |
|
553 | 548 | } |
554 | 549 | if(Container.AreaElements.Count > 0) |
555 | 550 | { |
| 551 | + if (ConnHandler is not null && !ConnHandler.NetworkAreaUseAllowed(Container.AreaElements, out string reason)) |
| 552 | + { |
| 553 | + DisplayMessageInUi(default, "Add Network Area", reason, true); |
| 554 | + Container.Clear(); |
| 555 | + return; |
| 556 | + } |
| 557 | + |
556 | 558 | ConnHandler?.AreasToDestination(Container.AreaElements); |
557 | 559 | } |
558 | 560 | if(Container.NwGroupElements.Count > 0) |
|
0 commit comments