Use a better method to share common page layout
This commit is contained in:
@ -11,8 +11,6 @@
|
||||
|
||||
@attribute [Authorize]
|
||||
|
||||
@layout AuthorizedLayout
|
||||
|
||||
@implements IDisposable
|
||||
|
||||
@inject NavigationManager NavigationManager
|
||||
@ -21,37 +19,41 @@
|
||||
|
||||
<PageTitle>Тестирование экспорта</PageTitle>
|
||||
|
||||
<RadzenSplitter Orientation="Orientation.Vertical" Style="height: 100%; border: 1px solid rgba(0,0,0,.08);">
|
||||
<RadzenSplitterPane Size="200px">
|
||||
<div style="height: 100%;overflow: auto;">
|
||||
<RadzenCardGroup Responsive="true">
|
||||
<RadzenCard Variant="Variant.Filled">
|
||||
<RadzenStack JustifyContent="JustifyContent.SpaceBetween" Gap="1rem">
|
||||
<RadzenStack Orientation="Orientation.Vertical" AlignItems="AlignItems.Start" JustifyContent="JustifyContent.Normal">
|
||||
<RadzenText TextStyle="TextStyle.H6">Сервис nsi</RadzenText>
|
||||
<RadzenButton Click=@(() => OnNsiExportItem1Click()) Disabled=@inputDisabled Text="Экспорт НСИ 1" ButtonStyle="ButtonStyle.Primary" />
|
||||
</RadzenStack>
|
||||
</RadzenStack>
|
||||
</RadzenCard>
|
||||
</RadzenCardGroup>
|
||||
</div>
|
||||
</RadzenSplitterPane>
|
||||
<RadzenSplitterPane>
|
||||
<RadzenTabs RenderMode="TabRenderMode.Client" Style="height: 100%;">
|
||||
<Tabs>
|
||||
<RadzenTabsItem Text="Запрос">
|
||||
<RadzenTextArea @ref=@messageTextArea Value=@messageBody Disabled="true" ReadOnly="true" Style="resize: none; white-space: pre; overflow-wrap: normal; overflow-x: auto;" class="rz-w-stretch" />
|
||||
</RadzenTabsItem>
|
||||
<RadzenTabsItem Text="Результат">
|
||||
<RadzenTextArea @ref=@responseTextArea Value=@responseBody Disabled="true" ReadOnly="true" Style="resize: none; white-space: pre; overflow-wrap: normal; overflow-x: auto;" class="rz-w-stretch" />
|
||||
</RadzenTabsItem>
|
||||
</Tabs>
|
||||
</RadzenTabs>
|
||||
</RadzenSplitterPane>
|
||||
<RadzenSplitterPane Size="auto" Resizable="false">
|
||||
<EventConsole @ref=@console />
|
||||
</RadzenSplitterPane>
|
||||
</RadzenSplitter>
|
||||
<AuthorizedContent Roles="@AppRole.OPERATOR_TYPE">
|
||||
<Content>
|
||||
<RadzenSplitter Orientation="Orientation.Vertical" Style="height: 100%; border: 1px solid rgba(0,0,0,.08);">
|
||||
<RadzenSplitterPane Size="200px">
|
||||
<div style="height: 100%;overflow: auto;">
|
||||
<RadzenCardGroup Responsive="true">
|
||||
<RadzenCard Variant="Variant.Filled">
|
||||
<RadzenStack JustifyContent="JustifyContent.SpaceBetween" Gap="1rem">
|
||||
<RadzenStack Orientation="Orientation.Vertical" AlignItems="AlignItems.Start" JustifyContent="JustifyContent.Normal">
|
||||
<RadzenText TextStyle="TextStyle.H6">Сервис nsi</RadzenText>
|
||||
<RadzenButton Click=@(() => OnNsiExportItem1Click()) Disabled=@inputDisabled Text="Экспорт НСИ 1" ButtonStyle="ButtonStyle.Primary" />
|
||||
</RadzenStack>
|
||||
</RadzenStack>
|
||||
</RadzenCard>
|
||||
</RadzenCardGroup>
|
||||
</div>
|
||||
</RadzenSplitterPane>
|
||||
<RadzenSplitterPane>
|
||||
<RadzenTabs RenderMode="TabRenderMode.Client" Style="height: 100%;">
|
||||
<Tabs>
|
||||
<RadzenTabsItem Text="Запрос">
|
||||
<RadzenTextArea @ref=@messageTextArea Value=@messageBody Disabled="true" ReadOnly="true" Style="resize: none; white-space: pre; overflow-wrap: normal; overflow-x: auto;" class="rz-w-stretch" />
|
||||
</RadzenTabsItem>
|
||||
<RadzenTabsItem Text="Результат">
|
||||
<RadzenTextArea @ref=@responseTextArea Value=@responseBody Disabled="true" ReadOnly="true" Style="resize: none; white-space: pre; overflow-wrap: normal; overflow-x: auto;" class="rz-w-stretch" />
|
||||
</RadzenTabsItem>
|
||||
</Tabs>
|
||||
</RadzenTabs>
|
||||
</RadzenSplitterPane>
|
||||
<RadzenSplitterPane Size="auto" Resizable="false">
|
||||
<EventConsole @ref=@console />
|
||||
</RadzenSplitterPane>
|
||||
</RadzenSplitter>
|
||||
</Content>
|
||||
</AuthorizedContent>
|
||||
|
||||
@code {
|
||||
EventConsole console = default!;
|
||||
@ -66,16 +68,6 @@
|
||||
FileMessageCapturer messageCapturer;
|
||||
bool catchMessageBody;
|
||||
|
||||
[CascadingParameter]
|
||||
public AuthorizedLayout Layout { get; set; }
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
base.OnInitialized();
|
||||
|
||||
Layout.Roles = AppRole.ADMINISTRATOR_TYPE;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (messageCapturer != null)
|
||||
|
||||
Reference in New Issue
Block a user