Skip to content

Commit ef88b7f

Browse files
committed
fix some review issues
1 parent 32c5744 commit ef88b7f

File tree

3 files changed

+21
-36
lines changed

3 files changed

+21
-36
lines changed

roles/lib/files/FWO.Services/ModellingVarianceAnalysis.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,12 @@ public async Task<bool> AnalyseConnsForStatusAsync(List<ModellingConnection> con
8888
return true;
8989
}
9090

91-
public async Task<ModellingVarianceResult> AnalyseRulesVsModelledConnections(List<ModellingConnection> connections, ModellingFilter modellingFilter, bool fullAnalysis = true)
91+
public async Task<ModellingVarianceResult> AnalyseRulesVsModelledConnections(List<ModellingConnection> connections,
92+
ModellingFilter modellingFilter, bool fullAnalysis = true, bool ignoreGroups = false)
9293
{
9394
await InitManagements();
9495
varianceResult = new() { Managements = RelevantManagements };
95-
if(ruleRecognitionOption.NwSeparateGroupAnalysis && fullAnalysis)
96+
if(ruleRecognitionOption.NwSeparateGroupAnalysis && fullAnalysis && !ignoreGroups)
9697
{
9798
await GetNwObjectsProductionState();
9899
PreAnalyseAllAppRoles(connections);

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

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
</div>
4242
<div class="col-sm-6">
4343
<div class="btn-group">
44-
<button type="button" class="ms-5 btn btn-sm btn-primary" @onclick="Report">
44+
<button type="button" class="btn btn-sm btn-primary" @onclick="Report">
4545
@(DisplayService.DisplayButton(userConfig, "generate_report", Icons.GenerateReport))
4646
</button>
4747
<button type="button" class="btn btn-sm btn-dark" @onclick="ShowHistory">
@@ -51,13 +51,13 @@
5151
{
5252
<AuthorizeView Roles="@($"{Roles.Modeller}, {Roles.Requester}, {Roles.Implementer}, {Roles.Admin}, {Roles.Auditor}")">
5353
<Authorized>
54-
<button type="button" class="ms-5 btn btn-sm btn-primary" @onclick="RequestFwChange">
54+
<button type="button" class="btn btn-sm btn-primary" @onclick="RequestFwChange">
5555
@(DisplayService.DisplayButtonWithTooltip(userConfig, "request_fw_change", Icons.RequestFwChange, UserConfig.PureLineStat(ChangeStatus)))
5656
</button>
5757
</Authorized>
5858
<NotAuthorized>
5959
<div data-toggle="tooltip" title="@(userConfig.PureLine("C9012"))">
60-
<button type="button" class="ms-5 btn btn-sm btn-primary" disabled>
60+
<button type="button" class="btn btn-sm btn-primary" disabled>
6161
@(DisplayService.DisplayButton(userConfig, "request_fw_change", Icons.RequestFwChange))
6262
</button>
6363
</div>
@@ -68,13 +68,13 @@
6868
{
6969
<AuthorizeView Roles="@($"{Roles.Modeller}, {Roles.Admin}, {Roles.Auditor}")">
7070
<Authorized>
71-
<button type="button" class="ms-5 btn btn-sm btn-primary" @onclick="Recertify">
71+
<button type="button" class="btn btn-sm btn-success" @onclick="Recertify">
7272
@(DisplayService.DisplayButtonWithTooltip(userConfig, "recertify", Icons.Recertify, UserConfig.PureLineStat(RecertStatus)))
7373
</button>
7474
</Authorized>
7575
<NotAuthorized>
7676
<div data-toggle="tooltip" title="@(userConfig.PureLine("C9012"))">
77-
<button type="button" class="ms-5 btn btn-sm btn-primary" disabled>
77+
<button type="button" class="btn btn-sm btn-success" disabled>
7878
@(DisplayService.DisplayButton(userConfig, "recertify", Icons.Recertify))
7979
</button>
8080
</div>
@@ -97,13 +97,11 @@
9797
</button>
9898
<AuthorizeView Roles="@($"{Roles.Admin}, {Roles.Auditor}")">
9999
<Authorized>
100-
&nbsp;
101-
<button type="button" class="btn btn-sm btn-dark" @onclick="ManualAppServer">
100+
<button type="button" class="btn btn-sm btn-warning" @onclick="ManualAppServer">
102101
@(DisplayService.DisplayButton(userConfig, "edit_app_server", Icons.Edit, "", Icons.Host))
103102
</button>
104103
</Authorized>
105104
</AuthorizeView>
106-
&nbsp;
107105
@if(userConfig.VarianceAnalysisRefresh)
108106
{
109107
<button type="button" class="btn btn-sm btn-primary" @onclick="RefreshState">
@@ -117,15 +115,15 @@
117115
<div class="mx-2 mt-2">
118116
<TabSet WholeWidth="false" DarkMode="false" KeepPanelsAlive="false" @ref="appHandler!.Tabset">
119117
<Tab Title="@(userConfig.GetText("connections"))" Position=0>
120-
<button type="button" class="btn btn-sm btn-success mb-2" @onclick="appHandler!.AddConnection">
118+
<button type="button" class="btn btn-sm btn-success" @onclick="appHandler!.AddConnection">
121119
@(DisplayService.DisplayButton(userConfig, "add_connection", Icons.Add))
122120
</button>
123121
<ConnectionTable UseResponsiveTable="true" ShowPageSizeInput="true" Connections="@appHandler!.GetRegularConnections()" @bind-AppHandler="appHandler" AppActive="appActive" ShowModellingState="true" ShowProductionState="true" />
124122
</Tab>
125123
<Tab Title="@(userConfig.GetText("provided_interfaces"))" Position=1>
126124
<div class="d-flex justify-content-between">
127125
<div>
128-
<button type="button" class="btn btn-sm btn-success mb-2" @onclick="appHandler!.AddInterface">
126+
<button type="button" class="btn btn-sm btn-success" @onclick="appHandler!.AddInterface">
129127
@(DisplayService.DisplayButton(userConfig, "add_interface", Icons.Add))
130128
</button>
131129
</div>
@@ -143,10 +141,10 @@
143141
@if (selectedApp.CommSvcPossible)
144142
{
145143
<Tab Title="@(userConfig.GetText("common_services"))" Position=2>
146-
<button type="button" class="btn btn-sm btn-success mb-2"
144+
<button type="button" class="btn btn-sm btn-success"
147145
@onclick="appHandler!.AddCommonService">@(DisplayService.DisplayButton(userConfig, "add_common_service", Icons.Add))
148146
</button>
149-
<ConnectionTable UseResponsiveTable="true" Connections="@appHandler!.GetCommonServices()" @bind-AppHandler="appHandler" AppActive="appActive" ShowModellingState="true" ShowProductionState="true" />
147+
<ConnectionTable UseResponsiveTable="true" ShowPageSizeInput="true" Connections="@appHandler!.GetCommonServices()" @bind-AppHandler="appHandler" AppActive="appActive" ShowModellingState="true" ShowProductionState="true" />
150148
</Tab>
151149
}
152150
</TabSet>
@@ -448,9 +446,8 @@ else
448446
{
449447
if(lastResponse != null && IsTempError(lastResponse))
450448
{
451-
string tooltip = userConfig.GetText("temp_error_extended") + ": " + lastResponse;
452-
//ChangeStatus = $"<div data-toggle=\"tooltip\" title=\"{tooltip}\">{userConfig.GetText("temp_error")}</div>";
453-
ChangeStatus = $"{userConfig.GetText("temp_error")}: {tooltip}</div>";
449+
string errorText = userConfig.GetText("temp_error_extended") + ": " + lastResponse;
450+
ChangeStatus = $"{userConfig.GetText("temp_error")}: {errorText}";
454451
}
455452
else
456453
{
@@ -461,9 +458,8 @@ else
461458
{
462459
if(lastResponse != null)
463460
{
464-
string tooltip = states.Name[intTicket.StateId] + ": " + lastResponse;
465-
//ChangeStatus = $"<div data-toggle=\"tooltip\" title=\"{tooltip}\">{userConfig.GetText("implementation_error")}</div>";
466-
ChangeStatus = $"{userConfig.GetText("implementation_error")}: {tooltip}</div>";
461+
string errorText = states.Name[intTicket.StateId] + ": " + lastResponse;
462+
ChangeStatus = $"{userConfig.GetText("implementation_error")}: {errorText}";
467463
}
468464
else
469465
{

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

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,6 @@
6464
<br>
6565
@(userConfig.GetText("U9029"))
6666
<br>
67-
@if(MissingAppRoles.Count > 0)
68-
{
69-
<br>
70-
<h5>@(userConfig.GetText("app_roles_not_implemented"))</h5>
71-
<AppRoleTable AppRoles="MissingAppRoles" DiffMode="false" Split="false"/>
72-
}
73-
@if(DifferingAppRoles.Count > 0)
74-
{
75-
<br>
76-
<h5>@(userConfig.GetText("app_roles_with_diffs"))</h5>
77-
<AppRoleTable AppRoles="DifferingAppRoles" DiffMode="false" Split="false"/>
78-
}
7967
@if(VarianceResult.ConnsNotImplemented.Count > 0)
8068
{
8169
<br>
@@ -103,15 +91,15 @@
10391
<Authorized>
10492
@if (userConfig.User.Ownerships.Contains(AppHandler.Application.Id))
10593
{
106-
<button type="button" class="btn btn-sm btn-primary" @onclick="StartRecert">@(DisplayService.DisplayButton(userConfig, "recertify", Icons.Recertify))</button>
94+
<button type="button" class="btn btn-sm btn-success" @onclick="StartRecert">@(DisplayService.DisplayButton(userConfig, "recertify", Icons.Recertify))</button>
10795
}
10896
else
10997
{
110-
<button type="button" class="btn btn-sm btn-primary" disabled>@(DisplayService.DisplayButton(userConfig, "recertify", Icons.Recertify))</button>
98+
<button type="button" class="btn btn-sm btn-success" disabled>@(DisplayService.DisplayButton(userConfig, "recertify", Icons.Recertify))</button>
11199
}
112100
</Authorized>
113101
<NotAuthorized>
114-
<button type="button" class="btn btn-sm btn-primary" disabled>@(DisplayService.DisplayButton(userConfig, "recertify", Icons.Recertify))</button>
102+
<button type="button" class="btn btn-sm btn-success" disabled>@(DisplayService.DisplayButton(userConfig, "recertify", Icons.Recertify))</button>
115103
</NotAuthorized>
116104
</AuthorizeView>
117105
}
@@ -226,7 +214,7 @@
226214
{
227215
ExtStateHandler extStateHandler = new(apiConnection);
228216
ModellingVarianceAnalysis varianceAnalysis = new(apiConnection, extStateHandler, userConfig, AppHandler!.Application, DisplayMessageInUi);
229-
VarianceResult = await varianceAnalysis.AnalyseRulesVsModelledConnections(AppHandler!.Connections, new(){ AnalyseRemainingRules = true });
217+
VarianceResult = await varianceAnalysis.AnalyseRulesVsModelledConnections(AppHandler!.Connections, new(){ AnalyseRemainingRules = true }, true, true);
230218
MissingAppRoles = [];
231219
foreach(var mgt in VarianceResult.MissingAppRoles.Keys)
232220
{

0 commit comments

Comments
 (0)