Skip to content

Commit ffcc944

Browse files
[+] Modelling connection check foreign interfaces and NA
[+] UI Message Texts
1 parent c7306c4 commit ffcc944

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

roles/database/files/sql/idempotent/fworch-texts.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,6 +1162,8 @@ INSERT INTO txt VALUES ('direction_contain_nwarea','German','Quelle und Ziel d&u
11621162
INSERT INTO txt VALUES ('direction_contain_nwarea','English','Source and destination must not contain a network area at the same time');
11631163
INSERT INTO txt VALUES ('only_common_service', 'German', 'Dieser Netzbereich kann nur in der Registerkarte Gemeinsame Dienste verwendet werden.');
11641164
INSERT INTO txt VALUES ('only_common_service', 'English', 'This network area can only be used in common services tab');
1165+
INSERT INTO txt VALUES ('foreign_interface_na', 'German', 'Netzbereiche können nicht zusammen mit Schnittstellen anderer Apps genutzt werden.');
1166+
INSERT INTO txt VALUES ('foreign_interface_na', 'English', 'Network areas cannot be used together with interfaces from foreign apps.');
11651167
INSERT INTO txt VALUES ('delete_interface', 'German', 'Schnittstelle löschen');
11661168
INSERT INTO txt VALUES ('delete_interface', 'English', 'Delete Interface');
11671169
INSERT INTO txt VALUES ('insert_forbidden', 'German', 'Einfügen verboten');

roles/ui/files/FWO.UI/Pages/NetworkModelling/EditConn.razor

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@
491491
{
492492
if (!ConnHandler.InterfaceAllowedWithNetworkArea(Container.ConnElement))
493493
{
494-
DisplayMessageInUi(default, userConfig.GetText("edit_connection"), "", true);
494+
DisplayMessageInUi(default, userConfig.GetText("edit_connection"), userConfig.GetText("foreign_interface_na"), true);
495495
Container.Clear();
496496
return;
497497
}
@@ -515,7 +515,7 @@
515515
{
516516
if (!ConnHandler.InterfaceAllowedWithNetworkArea())
517517
{
518-
DisplayMessageInUi(default, userConfig.GetText("edit_connection"), "", true);
518+
DisplayMessageInUi(default, userConfig.GetText("edit_connection"), userConfig.GetText("foreign_interface_na"), true);
519519
Container.Clear();
520520
return;
521521
}
@@ -547,7 +547,7 @@
547547
{
548548
if (!ConnHandler.InterfaceAllowedWithNetworkArea(Container.ConnElement))
549549
{
550-
DisplayMessageInUi(default, userConfig.GetText("edit_connection"), "", true);
550+
DisplayMessageInUi(default, userConfig.GetText("edit_connection"), userConfig.GetText("foreign_interface_na"), true);
551551
Container.Clear();
552552
return;
553553
}
@@ -571,7 +571,7 @@
571571
{
572572
if (!ConnHandler.InterfaceAllowedWithNetworkArea())
573573
{
574-
DisplayMessageInUi(default, userConfig.GetText("edit_connection"), "", true);
574+
DisplayMessageInUi(default, userConfig.GetText("edit_connection"), userConfig.GetText("foreign_interface_na"), true);
575575
Container.Clear();
576576
return;
577577
}

roles/ui/files/FWO.UI/Pages/NetworkModelling/EditConnLeftSide.razor

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,13 @@
358358
}
359359
if(areas.Count > 0)
360360
{
361+
if (!ConnHandler.InterfaceAllowedWithNetworkArea())
362+
{
363+
DisplayMessageInUi(default, userConfig.GetText("edit_connection"), userConfig.GetText("foreign_interface_na"), true);
364+
Container.Clear();
365+
return;
366+
}
367+
361368
Direction direction = toSource ? Direction.Source : Direction.Destination;
362369

363370
if (ConnHandler is not null && !ConnHandler.NetworkAreaUseAllowed(areas, direction, out (string Title, string Text) reason))

0 commit comments

Comments
 (0)