Skip to content

Commit c40c905

Browse files
authored
Merge pull request CactuseSecurity#3301 from CactuseSecurity/develop
Develop to main
2 parents 2feee6e + 7fa82da commit c40c905

File tree

2 files changed

+117
-117
lines changed

2 files changed

+117
-117
lines changed

.github/workflows/test-install.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ name: Build
44
on:
55

66
push:
7-
branches-ignore:
8-
- importer-rework
7+
# branches-ignore:
8+
# - importer-rework
9+
branches:
10+
- main
11+
- develop
912
paths-ignore:
1013
- 'documentation/**'
1114
- 'design/**'

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

Lines changed: 112 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -9,139 +9,136 @@
99
@inject IEventMediator EventMediator
1010

1111
@if (AppRoleHandler != null && Display)
12-
{
13-
@if(!workInProgress)
14-
{
15-
<PopUp Title="@(AppRoleHandler.ReadOnly ? "" : (AppRoleHandler.AddMode ? userConfig.GetText("add_app_role") : userConfig.GetText("edit_app_role")))"
16-
Size="@(AppRoleHandler.ReadOnly? PopupSize.Medium: PopupSize.Large)" Show="@Display" OnClose="Close">
17-
<Body>
18-
<div class="row mt-2">
19-
@if (!AppRoleHandler.ReadOnly)
20-
{
21-
<div class="col-sm-6">
22-
<EditAppRoleLeftSide @bind-Container="Container" @bind-Width="sidebarLeftWidth" @bind-AppRoleHandler="AppRoleHandler" />
23-
</div>
24-
}
25-
<div class="@(AppRoleHandler.ReadOnly ? "h-90 col-sm-12" : "col-sm-6")">
26-
<h3>@(userConfig.GetText("app_role"))</h3>
27-
<div class="border rounded m-2 p-2">
28-
@if (AppRoleHandler.NamingConvention.NetworkAreaRequired)
29-
{
30-
<div class="form-group row">
31-
<label class="col-sm-3 col-form-label col-form-label-sm">@(userConfig.GetText("area"))*:</label>
32-
@if (AppRoleHandler.AddMode && !AppRoleHandler.ReadOnly)
33-
{
34-
<div class="col-sm-8">
35-
<Dropdown ElementType="ModellingNetworkArea" SelectedElement="AppRoleHandler.ActAppRole.Area" ElementToString="@(a => a.Display() + DisplayObjectCount(a))"
36-
SelectedElementChanged="OnSelectedAreaChanged" Elements="areas" Nullable="true">
37-
<ElementTemplate Context="area">
38-
@((MarkupString)DisplayAreaWithObjectCount(area))
39-
</ElementTemplate>
40-
</Dropdown>
41-
</div>
42-
}
43-
else
44-
{
45-
<label class="col-sm-8 bg-secondary">@AppRoleHandler.ActAppRole.Area?.Display()</label>
46-
}
47-
</div>
48-
}
49-
<div class="form-group row mt-2">
50-
<label class="col-sm-3 col-form-label col-form-label-sm">@(userConfig.GetText("id"))*:</label>
51-
@if (AppRoleHandler.ReadOnly)
52-
{
53-
<label class="col-sm-8">@AppRoleHandler.ActAppRole.IdString</label>
54-
}
55-
else if (AppRoleHandler.NamingConvention.NetworkAreaRequired)
56-
{
57-
<input type="text" class="col-sm-4" readonly @bind="AppRoleHandler.ActAppRole.ManagedIdString.CombinedFixPart" />
58-
<span class="col-sm-1">@AppRoleHandler.ActAppRole.ManagedIdString.Separator</span>
59-
<input type="text" class="col-sm-3" @bind="AppRoleHandler.ActAppRole.ManagedIdString.FreePart" />
60-
}
61-
else
62-
{
63-
<input type="text" class=" col-sm-8" @bind="AppRoleHandler.ActAppRole.IdString" />
64-
}
65-
</div>
66-
<div class="form-group row mt-2">
67-
<label class="col-sm-3 col-form-label col-form-label-sm">@(userConfig.GetText("name"))*:</label>
68-
@if (AppRoleHandler.ReadOnly)
69-
{
70-
<label class="col-sm-8">@AppRoleHandler.ActAppRole.Name</label>
71-
}
72-
else
73-
{
74-
<input type="text" class="col-sm-8" @bind="AppRoleHandler.ActAppRole.Name" />
75-
}
76-
</div>
77-
<div class="form-group row mt-2">
78-
<label class="col-sm-3 col-form-label col-form-label-sm">@(userConfig.GetText("comment")):</label>
79-
@if (AppRoleHandler.ReadOnly)
12+
{
13+
<PopUp Title="@(AppRoleHandler.ReadOnly ? "" : (AppRoleHandler.AddMode ? userConfig.GetText("add_app_role") : userConfig.GetText("edit_app_role")))"
14+
Size="@(AppRoleHandler.ReadOnly? PopupSize.Medium: PopupSize.Large)" Show="@Display" OnClose="Close">
15+
<Body>
16+
<div class="row mt-2">
17+
@if (!AppRoleHandler.ReadOnly)
18+
{
19+
<div class="col-sm-6">
20+
<EditAppRoleLeftSide @bind-Container="Container" @bind-Width="sidebarLeftWidth" @bind-AppRoleHandler="AppRoleHandler" />
21+
</div>
22+
}
23+
<div class="@(AppRoleHandler.ReadOnly ? "h-90 col-sm-12" : "col-sm-6")">
24+
<h3>@(userConfig.GetText("app_role"))</h3>
25+
<div class="border rounded m-2 p-2">
26+
@if (AppRoleHandler.NamingConvention.NetworkAreaRequired)
27+
{
28+
<div class="form-group row">
29+
<label class="col-sm-3 col-form-label col-form-label-sm">@(userConfig.GetText("area"))*:</label>
30+
@if (AppRoleHandler.AddMode && !AppRoleHandler.ReadOnly)
8031
{
81-
<label class="col-sm-8">@AppRoleHandler.ActAppRole.Comment</label>
32+
<div class="col-sm-8">
33+
<Dropdown ElementType="ModellingNetworkArea" SelectedElement="AppRoleHandler.ActAppRole.Area" ElementToString="@(a => a.Display() + DisplayObjectCount(a))"
34+
SelectedElementChanged="OnSelectedAreaChanged" Elements="areas" Nullable="true">
35+
<ElementTemplate Context="area">
36+
@((MarkupString)DisplayAreaWithObjectCount(area))
37+
</ElementTemplate>
38+
</Dropdown>
39+
</div>
8240
}
8341
else
8442
{
85-
<input type="text" class="col-sm-8" @bind="AppRoleHandler.ActAppRole.Comment" />
43+
<label class="col-sm-8 bg-secondary">@AppRoleHandler.ActAppRole.Area?.Display()</label>
8644
}
8745
</div>
88-
<br>
89-
<div class="col-sm-12">
90-
<h6>@(userConfig.GetText("app_server"))</h6>
91-
@if (AppRoleHandler.ReadOnly)
92-
{
93-
foreach (var appserver in ModellingAppServerWrapper.Resolve(AppRoleHandler.ActAppRole.AppServers))
94-
{
95-
<div class="mh-13 col-sm-11 mt-1 border bg-transparent">@((MarkupString)appserver.DisplayWithIcon())</div>
96-
}
97-
}
98-
else
46+
}
47+
<div class="form-group row mt-2">
48+
<label class="col-sm-3 col-form-label col-form-label-sm">@(userConfig.GetText("id"))*:</label>
49+
@if (AppRoleHandler.ReadOnly)
50+
{
51+
<label class="col-sm-8">@AppRoleHandler.ActAppRole.IdString</label>
52+
}
53+
else if (AppRoleHandler.NamingConvention.NetworkAreaRequired)
54+
{
55+
<input type="text" class="col-sm-4" readonly @bind="AppRoleHandler.ActAppRole.ManagedIdString.CombinedFixPart" />
56+
<span class="col-sm-1">@AppRoleHandler.ActAppRole.ManagedIdString.Separator</span>
57+
<input type="text" class="col-sm-3" @bind="AppRoleHandler.ActAppRole.ManagedIdString.FreePart" />
58+
}
59+
else
60+
{
61+
<input type="text" class=" col-sm-8" @bind="AppRoleHandler.ActAppRole.IdString" />
62+
}
63+
</div>
64+
<div class="form-group row mt-2">
65+
<label class="col-sm-3 col-form-label col-form-label-sm">@(userConfig.GetText("name"))*:</label>
66+
@if (AppRoleHandler.ReadOnly)
67+
{
68+
<label class="col-sm-8">@AppRoleHandler.ActAppRole.Name</label>
69+
}
70+
else
71+
{
72+
<input type="text" class="col-sm-8" @bind="AppRoleHandler.ActAppRole.Name" />
73+
}
74+
</div>
75+
<div class="form-group row mt-2">
76+
<label class="col-sm-3 col-form-label col-form-label-sm">@(userConfig.GetText("comment")):</label>
77+
@if (AppRoleHandler.ReadOnly)
78+
{
79+
<label class="col-sm-8">@AppRoleHandler.ActAppRole.Comment</label>
80+
}
81+
else
82+
{
83+
<input type="text" class="col-sm-8" @bind="AppRoleHandler.ActAppRole.Comment" />
84+
}
85+
</div>
86+
<br>
87+
<div class="col-sm-12">
88+
<h6>@(userConfig.GetText("app_server"))</h6>
89+
@if (AppRoleHandler.ReadOnly)
90+
{
91+
foreach (var appserver in ModellingAppServerWrapper.Resolve(AppRoleHandler.ActAppRole.AppServers))
9992
{
100-
<OrderByDropdown CssClass="bg-secondary" @ref="orderByDropdown" TCollectionItem="ModellingAppServer" CollectionReordered="OnCollectionReordered" ElementProperties="orderByDropdownProperties" CustomSort="true" />
101-
<div class="dropzone-scrollable dropzone bg-secondary"
102-
ondragover="event.preventDefault();"
103-
ondragstart="event.dataTransfer.setData('', event.target.id);"
104-
@ondrop="HandleServerDrop">
105-
<EditList ElementType="ModellingAppServer" Elements="ModellingAppServerWrapper.Resolve(AppRoleHandler.ActAppRole.AppServers)" ElementsToAdd="AppRoleHandler.AppServerToAdd" ElementsToDelete="AppRoleHandler.AppServerToDelete" StdLayout="false" ElementsRemoved="OnAppServerRemovedFromEditList">
106-
<Display>
107-
<div class="row">
108-
<div class="col-sm-12 ms-2 bg-transparent">@((MarkupString)context.DisplayWithIcon())</div>
109-
</div>
110-
</Display>
111-
</EditList>
112-
</div>
93+
<div class="mh-13 col-sm-11 mt-1 border bg-transparent">@((MarkupString)appserver.DisplayWithIcon())</div>
11394
}
114-
</div>
115-
@if (!AppRoleHandler.AddMode)
95+
}
96+
else
11697
{
117-
<label class="col-sm-12 small mt-2">@(userConfig.GetText("created_by")): @(AppRoleHandler.ActAppRole.Creator), @(userConfig.GetText("creation_date")): @(AppRoleHandler.ActAppRole.CreationDate)</label>
98+
<OrderByDropdown CssClass="bg-secondary" @ref="orderByDropdown" TCollectionItem="ModellingAppServer" CollectionReordered="OnCollectionReordered" ElementProperties="orderByDropdownProperties" CustomSort="true" />
99+
<div class="dropzone-scrollable dropzone bg-secondary"
100+
ondragover="event.preventDefault();"
101+
ondragstart="event.dataTransfer.setData('', event.target.id);"
102+
@ondrop="HandleServerDrop">
103+
<EditList ElementType="ModellingAppServer" Elements="ModellingAppServerWrapper.Resolve(AppRoleHandler.ActAppRole.AppServers)" ElementsToAdd="AppRoleHandler.AppServerToAdd" ElementsToDelete="AppRoleHandler.AppServerToDelete" StdLayout="false" ElementsRemoved="OnAppServerRemovedFromEditList">
104+
<Display>
105+
<div class="row">
106+
<div class="col-sm-12 ms-2 bg-transparent">@((MarkupString)context.DisplayWithIcon())</div>
107+
</div>
108+
</Display>
109+
</EditList>
110+
</div>
118111
}
119112
</div>
113+
@if (!AppRoleHandler.AddMode)
114+
{
115+
<label class="col-sm-12 small mt-2">@(userConfig.GetText("created_by")): @(AppRoleHandler.ActAppRole.Creator), @(userConfig.GetText("creation_date")): @(AppRoleHandler.ActAppRole.CreationDate)</label>
116+
}
120117
</div>
121118
</div>
122-
</Body>
123-
<Footer>
124-
<div class="btn-group">
125-
@if (AppRoleHandler.ReadOnly)
119+
</div>
120+
</Body>
121+
<Footer>
122+
<div class="btn-group">
123+
@if (AppRoleHandler.ReadOnly)
124+
{
125+
<button type="button" class="btn btn-sm btn-primary" @onclick="Close">@(userConfig.GetText("ok"))</button>
126+
}
127+
else
128+
{
129+
@if (AppRoleHandler.IsOwner)
126130
{
127-
<button type="button" class="btn btn-sm btn-primary" @onclick="Close">@(userConfig.GetText("ok"))</button>
131+
<button type="button" class="btn btn-sm btn-primary" @onclick="Save">@(userConfig.GetText("save"))</button>
128132
}
129133
else
130134
{
131-
@if (AppRoleHandler.IsOwner)
132-
{
133-
<button type="button" class="btn btn-sm btn-primary" @onclick="Save">@(userConfig.GetText("save"))</button>
134-
}
135-
else
136-
{
137-
<button type="button" class="btn btn-sm btn-primary" disabled>@(userConfig.GetText("save"))</button>
138-
}
139-
<button type="button" class="btn btn-sm btn-secondary" @onclick="Close">@(userConfig.GetText("cancel"))</button>
135+
<button type="button" class="btn btn-sm btn-primary" disabled>@(userConfig.GetText("save"))</button>
140136
}
141-
</div>
142-
</Footer>
143-
</PopUp>
144-
}
137+
<button type="button" class="btn btn-sm btn-secondary" @onclick="Close">@(userConfig.GetText("cancel"))</button>
138+
}
139+
</div>
140+
</Footer>
141+
</PopUp>
145142
<InProgress Display="workInProgress" />
146143
<Confirm @bind-Display="ShowAreaChangeConfirmation" AllowedRoles="@Roles.Modeller" RenderMessageAsHtml="true"
147144
Message="@(userConfig.GetText("nwareachange_clear_app_servers"))" PerformAction="AreaChangeConfirmation" Title="@(userConfig.GetText("confirm"))" />

0 commit comments

Comments
 (0)