[성현모] Operation 레이아웃, 페이지 설정
This commit is contained in:
15
Projects/Config/WebClient.Operation.Config.json
Normal file
15
Projects/Config/WebClient.Operation.Config.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"ApplicationName": "CPXV2 Web Tools",
|
||||||
|
"Server": {
|
||||||
|
"Address": "https://*",
|
||||||
|
"Port": 9100,
|
||||||
|
"IIS": false
|
||||||
|
},
|
||||||
|
"API": [
|
||||||
|
{
|
||||||
|
"Id": 1,
|
||||||
|
"ApiName": "CPMetaWbms",
|
||||||
|
"Host": "192.168.0.126:9000"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -9,12 +9,16 @@
|
|||||||
<link rel="stylesheet" href="app.css" />
|
<link rel="stylesheet" href="app.css" />
|
||||||
<link rel="stylesheet" href="Web.Operation.styles.css" />
|
<link rel="stylesheet" href="Web.Operation.styles.css" />
|
||||||
<link rel="icon" type="image/png" href="favicon.png" />
|
<link rel="icon" type="image/png" href="favicon.png" />
|
||||||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&icon_names=search" />
|
||||||
<HeadOutlet />
|
<HeadOutlet />
|
||||||
|
<RadzenTheme Theme="material-dark" @rendermode="InteractiveServer" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<Routes />
|
<Routes />
|
||||||
<script src="_framework/blazor.web.js"></script>
|
<script src="_framework/blazor.web.js"></script>
|
||||||
|
<script src="_framework/blazor.web.js"></script>
|
||||||
|
<script src="_content/Radzen.Blazor/Radzen.Blazor.js?v=@(typeof(Radzen.Colors).Assembly.GetName().Version)"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -1,23 +1,41 @@
|
|||||||
@inherits LayoutComponentBase
|
@inherits LayoutComponentBase
|
||||||
|
|
||||||
<div class="page">
|
<RadzenLayout>
|
||||||
<div class="sidebar">
|
<RadzenHeader Style="height: 5rem; font-size: 2rem;" class="rz-px-5">
|
||||||
<NavMenu />
|
<RadzenStack Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center" JustifyContent="JustifyContent.SpaceBetween" Gap="0">
|
||||||
|
<RadzenStack Style="height: 5rem;" Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center" JustifyContent="JustifyContent.Center">
|
||||||
|
<RadzenLabel Text="@($"{ApplicationName}")" />
|
||||||
|
</RadzenStack>
|
||||||
|
<div class="rz-mr-2">
|
||||||
|
<RadzenAppearanceToggle />
|
||||||
</div>
|
</div>
|
||||||
|
</RadzenStack>
|
||||||
<main>
|
</RadzenHeader>
|
||||||
<div class="top-row px-4">
|
<RadzenSidebar @bind-Expanded="@sidebarExpanded">
|
||||||
<a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a>
|
<RadzenPanelMenu>
|
||||||
</div>
|
<RadzenPanelMenuItem Text="Home" Icon="home" Path="/"/>
|
||||||
|
<RadzenPanelMenuItem Text="CPMeta" Icon="assignment" Path="/CpMeta"/>
|
||||||
<article class="content px-4">
|
</RadzenPanelMenu>
|
||||||
|
</RadzenSidebar>
|
||||||
|
<RadzenBody Style="margin:0; padding:1rem; overflow:hidden; font-size: 2rem;">
|
||||||
@Body
|
@Body
|
||||||
</article>
|
</RadzenBody>
|
||||||
</main>
|
</RadzenLayout>
|
||||||
</div>
|
<RadzenComponents @rendermode="InteractiveServer" />
|
||||||
|
|
||||||
<div id="blazor-error-ui">
|
@code {
|
||||||
An unhandled error has occurred.
|
bool sidebarExpanded = true;
|
||||||
<a href="" class="reload">Reload</a>
|
string ApplicationName = string.Empty;
|
||||||
<a class="dismiss">🗙</a>
|
string Page = string.Empty;
|
||||||
</div>
|
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
ApplicationName = configService?.GetConfig()?.ApplicationName;
|
||||||
|
Page = NavigationManager.ToBaseRelativePath(NavigationManager.Uri);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnClickMenu(MenuItemEventArgs args)
|
||||||
|
{
|
||||||
|
Page = args.Text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -0,0 +1,7 @@
|
|||||||
|
@page "/CpMeta"
|
||||||
|
|
||||||
|
<h3>CPMeta</h3>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
|
||||||
|
}
|
||||||
@ -8,3 +8,13 @@
|
|||||||
@using Microsoft.JSInterop
|
@using Microsoft.JSInterop
|
||||||
@using Web.Operation
|
@using Web.Operation
|
||||||
@using Web.Operation.Components
|
@using Web.Operation.Components
|
||||||
|
|
||||||
|
|
||||||
|
@using Radzen
|
||||||
|
@using Radzen.Blazor
|
||||||
|
|
||||||
|
@using SystemX.Core.Services
|
||||||
|
@using WebClient.Library.Config
|
||||||
|
|
||||||
|
@inject ConfigService<WebClientConfig> configService
|
||||||
|
@inject NavigationManager NavigationManager
|
||||||
22
Projects/WebClient/Web.Operation/Dialog/Loading.razor
Normal file
22
Projects/WebClient/Web.Operation/Dialog/Loading.razor
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
@page "/loading/{Message?}"
|
||||||
|
|
||||||
|
<div style="text-align: center;">
|
||||||
|
<div class="lds-ring">
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
</div>
|
||||||
|
<div class="message">
|
||||||
|
@Message
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@code {
|
||||||
|
[Parameter]
|
||||||
|
public string? Message { get; set; }
|
||||||
|
|
||||||
|
protected override void OnParametersSet()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,13 +1,82 @@
|
|||||||
|
using Radzen;
|
||||||
|
using SystemX.Core.Config.Model;
|
||||||
|
using SystemX.Core.DB;
|
||||||
|
using SystemX.Core.Services;
|
||||||
using Web.Operation.Components;
|
using Web.Operation.Components;
|
||||||
|
using Web.Operation.Services;
|
||||||
|
using WebClient.Library.Config;
|
||||||
|
using WebClient.Library.Model;
|
||||||
|
|
||||||
|
|
||||||
|
string configDir = @"../../Config";
|
||||||
|
string configFileName = "WebClient.Operation.Config.json";
|
||||||
|
|
||||||
|
//raed log4net configs
|
||||||
|
if (LogXnet.ReadConfig(@$"{configDir}/LogXnetConfig.json") == true)
|
||||||
|
{
|
||||||
|
LogXnet.WriteLine("LogXnet Init Success");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("LogXnet Init Failed");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
|
builder.Services.AddRadzenComponents();
|
||||||
|
|
||||||
|
//singleton
|
||||||
|
builder.Services.AddSingleton<ConfigService<WebClientConfig>>();
|
||||||
|
|
||||||
|
|
||||||
|
//scoped
|
||||||
|
builder.Services.AddScoped<PopupService>();
|
||||||
|
|
||||||
|
//db
|
||||||
|
builder.Services.AddSingleton<DbContextProvider>(); // Generic <20><><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
|
||||||
// Add services to the container.
|
// Add services to the container.
|
||||||
builder.Services.AddRazorComponents()
|
builder.Services.AddRazorComponents()
|
||||||
.AddInteractiveServerComponents();
|
.AddInteractiveServerComponents();
|
||||||
|
|
||||||
|
//config preload, auth set
|
||||||
|
ConfigService<WebClientConfig> preloadConfig = new ConfigService<WebClientConfig>();
|
||||||
|
if (preloadConfig.OpenConfig($@"{configDir}/{configFileName}") == true)
|
||||||
|
{
|
||||||
|
var config = preloadConfig.GetConfig();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogXnet.WriteLine("Config Preload Load Error.", LogXLabel.Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
|
//read api config and set
|
||||||
|
string serverUrl = string.Empty;
|
||||||
|
var configService = app.Services.GetService<ConfigService<WebClientConfig>>();
|
||||||
|
bool isIIS = false;
|
||||||
|
|
||||||
|
if (configService?.OpenConfig($@"{configDir}/{configFileName}") == true)
|
||||||
|
{
|
||||||
|
LogXnet.WriteLine("WebClient Config Success.");
|
||||||
|
var apiConfig = ConfigService<WebClientConfig>.Config;
|
||||||
|
if (apiConfig != null)
|
||||||
|
{
|
||||||
|
serverUrl = $"{apiConfig?.Server?.Address}:{apiConfig?.Server?.Port}";
|
||||||
|
isIIS = apiConfig!.Server.IIS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogXnet.WriteLine("WebClient Config Error.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Configure the HTTP request pipeline.
|
// Configure the HTTP request pipeline.
|
||||||
if (!app.Environment.IsDevelopment())
|
if (!app.Environment.IsDevelopment())
|
||||||
{
|
{
|
||||||
@ -24,4 +93,13 @@ app.UseAntiforgery();
|
|||||||
app.MapRazorComponents<App>()
|
app.MapRazorComponents<App>()
|
||||||
.AddInteractiveServerRenderMode();
|
.AddInteractiveServerRenderMode();
|
||||||
|
|
||||||
|
if (isIIS == true)
|
||||||
|
{
|
||||||
app.Run();
|
app.Run();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogXnet.WriteLine($"Operation Url: {serverUrl}");
|
||||||
|
app.Run($"{serverUrl}");
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
43
Projects/WebClient/Web.Operation/Services/PopupService.cs
Normal file
43
Projects/WebClient/Web.Operation/Services/PopupService.cs
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
using Radzen;
|
||||||
|
using Web.Operation.Dialog;
|
||||||
|
|
||||||
|
namespace Web.Operation.Services
|
||||||
|
{
|
||||||
|
public class PopupService
|
||||||
|
{
|
||||||
|
public DialogService _dialogService;
|
||||||
|
|
||||||
|
public PopupService(DialogService dialogService)
|
||||||
|
{
|
||||||
|
_dialogService = dialogService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<bool> Confirm(string title, string message)
|
||||||
|
{
|
||||||
|
bool result = false;
|
||||||
|
result = await _dialogService.Confirm(message, title, new ConfirmOptions
|
||||||
|
{
|
||||||
|
OkButtonText = "OK",
|
||||||
|
CancelButtonText = "Cancel",
|
||||||
|
}) ?? false;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OpenIndicator(string message = "")
|
||||||
|
{
|
||||||
|
_dialogService.Open<Loading>("",
|
||||||
|
new Dictionary<string, object>() { { "Message", message } },
|
||||||
|
new DialogOptions
|
||||||
|
{
|
||||||
|
ShowClose = false,
|
||||||
|
ShowTitle = false,
|
||||||
|
Style = "box-shadow: none; background: transparent; min-width:0; min-height:0; width:auto;"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CloseIndicator()
|
||||||
|
{
|
||||||
|
_dialogService.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -6,4 +6,21 @@
|
|||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Radzen.Blazor" Version="7.3.2" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\WebClient.Library\WebClient.Library.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="SystemX.Core">
|
||||||
|
<HintPath>..\..\DLL\SystemX.Core.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="SystemX.Core.DB">
|
||||||
|
<HintPath>..\..\DLL\SystemX.Core.DB.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
html, body {
|
html, body {
|
||||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||||
|
font-size: 62.5% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
a, .btn-link {
|
a, .btn-link {
|
||||||
@ -49,3 +50,53 @@ h1:focus {
|
|||||||
.darker-border-checkbox.form-check-input {
|
.darker-border-checkbox.form-check-input {
|
||||||
border-color: #929292;
|
border-color: #929292;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*calendar*/
|
||||||
|
|
||||||
|
.rz-datepicker-popup-container {
|
||||||
|
width: 30rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rz-calendar-header {
|
||||||
|
height: 5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rz-calendar-view rz-calendar-month-view {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rz-calendar-month-dropdown {
|
||||||
|
height: 3.0rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rz-calendar-year-dropdown {
|
||||||
|
width: 9rem !important;
|
||||||
|
height: 3.0rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rz-calendar-view-container {
|
||||||
|
font-size: 2.0rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rz-inputtext {
|
||||||
|
font-size: 1.5rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rz-state-default {
|
||||||
|
font-size: 1.5rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*data grid*/
|
||||||
|
.rz-dropdown {
|
||||||
|
height: 3.0rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rz-textbox {
|
||||||
|
font-size: 1.5rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*common*/
|
||||||
|
span {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
|||||||
@ -20,5 +20,8 @@ namespace WebClient.Library.Config
|
|||||||
|
|
||||||
[JsonPropertyName("GridDisableFilter")]
|
[JsonPropertyName("GridDisableFilter")]
|
||||||
public List<GridDisableFilter>? GridDisableFilter { get; set; }
|
public List<GridDisableFilter>? GridDisableFilter { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("API")]
|
||||||
|
public List<API>? Api { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
15
Projects/WebClient/WebClient.Library/Model/API.cs
Normal file
15
Projects/WebClient/WebClient.Library/Model/API.cs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace WebClient.Library.Model
|
||||||
|
{
|
||||||
|
public class API
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string ApiName { get; set; }
|
||||||
|
public string Host { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user