Compare commits
No commits in common. "005645de9c734bd8d70a4386211186391becf350" and "a3604d7333acc63a413701ebabbf8b7997642c07" have entirely different histories.
005645de9c
...
a3604d7333
File diff suppressed because one or more lines are too long
|
|
@ -29,10 +29,6 @@
|
||||||
<Reference Include="AyCode.Core">
|
<Reference Include="AyCode.Core">
|
||||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\$(Configuration)\net9.0\AyCode.Core.dll</HintPath>
|
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\$(Configuration)\net9.0\AyCode.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<!-- FbLogItem : AcLogItemClient — a hub TLogItem-constraintjéhez kell a bázistípus assembly-je (a DLL-referencia nem tranzitív). -->
|
|
||||||
<Reference Include="AyCode.Entities">
|
|
||||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\$(Configuration)\net9.0\AyCode.Entities.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="AyCode.Interfaces">
|
<Reference Include="AyCode.Interfaces">
|
||||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\$(Configuration)\net9.0\AyCode.Interfaces.dll</HintPath>
|
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\$(Configuration)\net9.0\AyCode.Interfaces.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,11 +1,8 @@
|
||||||
using AyCode.Services.Server.SignalRs;
|
using AyCode.Services.Server.SignalRs;
|
||||||
using FruitBank.Common.Loggers;
|
|
||||||
using FruitBank.Common.Server.Services.Loggers;
|
using FruitBank.Common.Server.Services.Loggers;
|
||||||
|
|
||||||
namespace FruitBank.Common.Server.Services.SignalRs;
|
namespace FruitBank.Common.Server.Services.SignalRs;
|
||||||
|
|
||||||
|
|
||||||
// LogItemClient: a kliens-writerrel (SignaRClientLogItemWriter : AcSignaRClientLogItemWriter<LogItemClient>) azonos
|
public class LoggerSignalRHub(LoggerToLoggerApiController logger) : AcLoggerSignalRHub<LoggerToLoggerApiController>(logger)
|
||||||
// wire-típus — a SignalR erre deserializál, AcBinary-nál a LogItemClient generált serializere fut.
|
|
||||||
public class LoggerSignalRHub(LoggerToLoggerApiController logger) : AcLoggerSignalRHub<LoggerToLoggerApiController, LogItemClient>(logger)
|
|
||||||
{ }
|
{ }
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -7,20 +7,18 @@ public static class FruitBankConstClient
|
||||||
{
|
{
|
||||||
public static string DefaultLocale = "en-US";
|
public static string DefaultLocale = "en-US";
|
||||||
|
|
||||||
// A nop szerver base URL-je. Induláskor a host tölti fel az appsettings "AyCode:Urls:BaseUrl"-ből
|
//public static string BaseUrl = "https://localhost:59579"; //FrutiBank nop
|
||||||
// (ld. Program.cs / MauiProgram.cs). Az fbHub ÉS a loggerHub is EBBŐL az egy értékből származik (+/fbHub, +/loggerHub).
|
//public static string BaseUrl = "https://localhost:44372"; //FrutiBank nop
|
||||||
// Default: null — ha nincs beállítva, az OLVASÁS exception-t dob, nem megy tovább csendben hiányzó/rossz URL-lel.
|
public static string BaseUrl = "https://shop.fruitbank.hu"; //FrutiBank nop
|
||||||
// A környezet-váltás az appsettings-ben történik:
|
//public static string BaseUrl = "https://fruitbank.mangoweb.hu"; //FrutiBank nop test
|
||||||
// dev: https://localhost:59579 | prod: https://shop.fruitbank.hu | test: https://fruitbank.mangoweb.hu | android: http://10.0.2.2:59579
|
#if RELEASE
|
||||||
private static string? _baseUrl;
|
//public static string BaseUrl = "https://shop.fruitbank.hu"; //FrutiBank nop
|
||||||
public static string BaseUrl
|
#endif
|
||||||
{
|
|
||||||
get => !string.IsNullOrWhiteSpace(_baseUrl)
|
//public static string BaseUrl = "http://localhost:59579"; //FrutiBank nop
|
||||||
? _baseUrl
|
//public static string BaseUrl = "http://10.0.2.2:59579"; //FrutiBank (android) nop
|
||||||
: throw new InvalidOperationException("FruitBankConstClient.BaseUrl nincs beállítva — a host indulásakor hidratáld az appsettings 'AyCode:Urls:BaseUrl' értékéből (Program.cs / MauiProgram.cs).");
|
//public static string BaseUrl = "https://localhost:7144"; //HybridApp
|
||||||
|
|
||||||
set => _baseUrl = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string DefaultHubName = "fbHub";
|
public static string DefaultHubName = "fbHub";
|
||||||
public static string LoggerHubName = "loggerHub";
|
public static string LoggerHubName = "loggerHub";
|
||||||
|
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
using AyCode.Core.Serializers.Attributes;
|
|
||||||
using AyCode.Entities.LogItems;
|
|
||||||
|
|
||||||
namespace FruitBank.Common.Loggers;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// A FruitBank kliens↔szerver log-feltöltés wire-típusa (writer és loggerHub ugyanezt használja — szimmetrikus wire).
|
|
||||||
/// Az AcLogItemClient az AyCode.Entities generator-mentes rétegében él; itt, a FruitBank.Common-ban (ahol az
|
|
||||||
/// AcBinary source-generator fut) kap generált serializert — így a loggerHub AcBinary-protokollal mehet.
|
|
||||||
/// A generator az örökölt propertyket is felveszi (derived → base sorrend, runtime-kompatibilis).
|
|
||||||
/// Feature-ök kikapcsolva (false): kis, lapos POCO — id/ref/intern/metadata nem kell, a sorosítás így a leggyorsabb.
|
|
||||||
/// </summary>
|
|
||||||
[AcBinarySerializable(false)]
|
|
||||||
public class LogItemClient : AcLogItemClient
|
|
||||||
{
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,38 +1,17 @@
|
||||||
using AyCode.Core.Enums;
|
using AyCode.Core.Enums;
|
||||||
using AyCode.Core.Loggers;
|
using AyCode.Core.Loggers;
|
||||||
using AyCode.Core.Serializers.Binaries;
|
|
||||||
using AyCode.Services.Loggers;
|
using AyCode.Services.Loggers;
|
||||||
using AyCode.Services.SignalRs;
|
|
||||||
using Microsoft.Extensions.Logging.Abstractions;
|
|
||||||
|
|
||||||
namespace FruitBank.Common.Loggers
|
namespace FruitBank.Common.Loggers
|
||||||
{
|
{
|
||||||
/// <summary>
|
public class SignaRClientLogItemWriter : AcSignaRClientLogItemWriter
|
||||||
/// FruitBank log-feltöltő: LogItemClient wire-típussal, AcBinary-protokollon (egységes a fbHub-bal).
|
|
||||||
/// Cél: {BaseUrl}/loggerHub — a BaseUrl-t a host hidratálja az appsettings-ből.
|
|
||||||
/// </summary>
|
|
||||||
public class SignaRClientLogItemWriter : AcSignaRClientLogItemWriter<LogItemClient>
|
|
||||||
{
|
{
|
||||||
public SignaRClientLogItemWriter() : this(AppType.Web, LogLevel.Detail, null)
|
public SignaRClientLogItemWriter() : this(AppType.Web, LogLevel.Detail, null)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
public SignaRClientLogItemWriter(AppType appType, LogLevel logLevel, string? categoryName = null)
|
public SignaRClientLogItemWriter(AppType appType, LogLevel logLevel, string? categoryName = null) : base($"{FruitBankConstClient.BaseUrl}/{FruitBankConstClient.LoggerHubName}", appType, logLevel, categoryName)
|
||||||
: base($"{FruitBankConstClient.BaseUrl}/{FruitBankConstClient.LoggerHubName}", appType, logLevel, categoryName, CreateProtocolOptions())
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ⚠️ VÉGTELEN-CIKLUS VESZÉLY — NE ADJ LOGGERT A PROTOKOLLNAK! ⚠️
|
|
||||||
// Ez a writer maga A log-feltöltő csatorna. Ha a protokoll loggert kapna (LoggerClient, ILogger, bármi,
|
|
||||||
// ami ebbe a writerbe torkollik), akkor minden feltöltés sorosítása ÚJABB log-sorokat termelne
|
|
||||||
// (Serialize start / WriteArgument / ...), amiket ez a writer megint felküldene → sorosítás → log → ...
|
|
||||||
// → robbanó visszacsatolás, a kliens másodpercek alatt megfullad.
|
|
||||||
// Ezért a Logger EXPLICIT NullLogger.Instance (nem null! — a null-t az AddAcBinaryProtocol ??= fallbackje
|
|
||||||
// a DI ILogger<AcBinaryHubProtocol>-jával pótolná, ami visszahozná a hurkot).
|
|
||||||
// Ugyanezért erre a hub-builderre AddAcDefaults/ConfigureLogging SOHA nem kerülhet.
|
|
||||||
private static AcBinaryHubProtocolOptions CreateProtocolOptions() => new()
|
|
||||||
{
|
|
||||||
ProtocolMode = BinaryProtocolMode.Bytes, // WASM-safe, ugyanaz, mint az fbHub-on
|
|
||||||
Logger = NullLogger.Instance, // süket logger — ld. a fenti figyelmeztetést
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,7 @@
|
||||||
<AfterColumnsTemplate Context="ctx">
|
<AfterColumnsTemplate Context="ctx">
|
||||||
@if (ctx.DataItem is not ShippingDocument && ctx.DataItem is not ShippingItem) return;
|
@if (ctx.DataItem is not ShippingDocument && ctx.DataItem is not ShippingItem) return;
|
||||||
|
|
||||||
@* ShippingItems: not null — add után a kijelölt sor a szerver-válasz NYERS entitása lehet (relációk betöltése
|
@if (ctx is { DataItem: ShippingDocument doc, IsEditMode: false })
|
||||||
nélkül, ShippingItems == null), amíg a grid-reload le nem cseréli; a tétel-táblázat addig nem renderelődik. *@
|
|
||||||
@if (ctx is { DataItem: ShippingDocument { ShippingItems: not null } doc, IsEditMode: false })
|
|
||||||
{
|
{
|
||||||
<table class="table table-sm table-bordered table-striped" style="margin-top: 35px;">
|
<table class="table table-sm table-bordered table-striped" style="margin-top: 35px;">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,8 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
"AcHubConnection": {
|
"AcHubConnection": {
|
||||||
// Az Url innen KIVÉVE: az fbHub és a loggerHub is az AyCode:Urls:BaseUrl-ből származik (kódban: +/fbHub, +/loggerHub).
|
"Url": "https://localhost:59579/fbHub",
|
||||||
|
//"Url": "https://shop.fruitbank.hu/fbHub",
|
||||||
"TransportMaxBufferSize": 30000000,
|
"TransportMaxBufferSize": 30000000,
|
||||||
"ApplicationMaxBufferSize": 30000000,
|
"ApplicationMaxBufferSize": 30000000,
|
||||||
"CloseTimeout": "00:00:10",
|
"CloseTimeout": "00:00:10",
|
||||||
|
|
|
||||||
|
|
@ -18,11 +18,6 @@ using Microsoft.Extensions.Options;
|
||||||
|
|
||||||
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
||||||
|
|
||||||
// Hub-URL-ek EGY forrásból: az fbHub és a loggerHub is az AyCode:Urls:BaseUrl-ből származik.
|
|
||||||
// A loggerHub writer a FruitBankConstClient.BaseUrl-t olvassa, ezért induláskor onnan hidratáljuk.
|
|
||||||
FruitBankConstClient.BaseUrl = builder.Configuration["AyCode:Urls:BaseUrl"]
|
|
||||||
?? throw new InvalidOperationException("Hiányzik az 'AyCode:Urls:BaseUrl' az appsettings-ből — a hub-ok URL-je ebből származik.");
|
|
||||||
|
|
||||||
builder.Services.AddDevExpressBlazor(configure => configure.SizeMode = DevExpress.Blazor.SizeMode.Medium);
|
builder.Services.AddDevExpressBlazor(configure => configure.SizeMode = DevExpress.Blazor.SizeMode.Medium);
|
||||||
|
|
||||||
// Add device-specific services used by the FruitBankHybrid.Shared project
|
// Add device-specific services used by the FruitBankHybrid.Shared project
|
||||||
|
|
@ -37,12 +32,7 @@ builder.Services.AddSingleton<LoggedInModel>(sp => new LoggedInModel(sp.GetRequi
|
||||||
|
|
||||||
// Bind SignalR options from wwwroot/appsettings.json (loaded automatically by WebAssemblyHostBuilder) —
|
// Bind SignalR options from wwwroot/appsettings.json (loaded automatically by WebAssemblyHostBuilder) —
|
||||||
// single Configure call per options type, combining section Bind with runtime overrides.
|
// single Configure call per options type, combining section Bind with runtime overrides.
|
||||||
builder.Services.Configure<AcHubConnectionOptions>(opts =>
|
builder.Services.Configure<AcHubConnectionOptions>(opts => builder.Configuration.GetSection("AcHubConnection").Bind(opts));
|
||||||
{
|
|
||||||
builder.Configuration.GetSection("AcHubConnection").Bind(opts);
|
|
||||||
// Az fbHub URL a közös BaseUrl-ből (nem külön AcHubConnection:Url) — így nem tud eltérni a loggerHub-tól.
|
|
||||||
opts.Url = $"{FruitBankConstClient.BaseUrl}/{FruitBankConstClient.DefaultHubName}";
|
|
||||||
});
|
|
||||||
|
|
||||||
builder.Services.Configure<AcBinaryHubProtocolOptions>(opts =>
|
builder.Services.Configure<AcBinaryHubProtocolOptions>(opts =>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,8 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
"AcHubConnection": {
|
"AcHubConnection": {
|
||||||
// Az Url innen KIVÉVE: az fbHub és a loggerHub is az AyCode:Urls:BaseUrl-ből származik (kódban: +/fbHub, +/loggerHub).
|
"Url": "https://localhost:59579/fbHub",
|
||||||
|
//"Url": "https://shop.fruitbank.hu/fbHub",
|
||||||
"TransportMaxBufferSize": 30000000,
|
"TransportMaxBufferSize": 30000000,
|
||||||
"ApplicationMaxBufferSize": 30000000,
|
"ApplicationMaxBufferSize": 30000000,
|
||||||
"CloseTimeout": "00:00:10",
|
"CloseTimeout": "00:00:10",
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,6 @@ using Microsoft.Extensions.Options;
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
// Hub-URL-ek EGY forrásból: az fbHub és a loggerHub is az AyCode:Urls:BaseUrl-ből származik.
|
|
||||||
FruitBankConstClient.BaseUrl = builder.Configuration["AyCode:Urls:BaseUrl"]
|
|
||||||
?? throw new InvalidOperationException("Hiányzik az 'AyCode:Urls:BaseUrl' az appsettings-ből — a hub-ok URL-je ebből származik.");
|
|
||||||
|
|
||||||
builder.Services.AddRazorComponents().AddInteractiveWebAssemblyComponents();
|
builder.Services.AddRazorComponents().AddInteractiveWebAssemblyComponents();
|
||||||
builder.Services.AddDevExpressBlazor(configure => configure.SizeMode = DevExpress.Blazor.SizeMode.Medium);
|
builder.Services.AddDevExpressBlazor(configure => configure.SizeMode = DevExpress.Blazor.SizeMode.Medium);
|
||||||
builder.Services.AddMvc();
|
builder.Services.AddMvc();
|
||||||
|
|
@ -40,12 +36,7 @@ builder.Services.AddSingleton<LoggedInModel>(sp => new LoggedInModel(sp.GetRequi
|
||||||
|
|
||||||
// Bind SignalR options from appsettings.json — single Configure call per options type.
|
// Bind SignalR options from appsettings.json — single Configure call per options type.
|
||||||
// The lambda runs the appsettings Bind first, then any runtime overrides (e.g. the WASM safety net).
|
// The lambda runs the appsettings Bind first, then any runtime overrides (e.g. the WASM safety net).
|
||||||
builder.Services.Configure<AcHubConnectionOptions>(opts =>
|
builder.Services.Configure<AcHubConnectionOptions>(opts => builder.Configuration.GetSection("AcHubConnection").Bind(opts));
|
||||||
{
|
|
||||||
builder.Configuration.GetSection("AcHubConnection").Bind(opts);
|
|
||||||
// Az fbHub URL a közös BaseUrl-ből (nem külön AcHubConnection:Url) — így nem tud eltérni a loggerHub-tól.
|
|
||||||
opts.Url = $"{FruitBankConstClient.BaseUrl}/{FruitBankConstClient.DefaultHubName}";
|
|
||||||
});
|
|
||||||
|
|
||||||
builder.Services.Configure<AcBinaryHubProtocolOptions>(opts =>
|
builder.Services.Configure<AcBinaryHubProtocolOptions>(opts =>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,8 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
"AcHubConnection": {
|
"AcHubConnection": {
|
||||||
// Az Url innen KIVÉVE: az fbHub és a loggerHub is az AyCode:Urls:BaseUrl-ből származik (kódban: +/fbHub, +/loggerHub).
|
"Url": "https://localhost:59579/fbHub",
|
||||||
|
//"Url": "https://shop.fruitbank.hu/fbHub",
|
||||||
"TransportMaxBufferSize": 30000000,
|
"TransportMaxBufferSize": 30000000,
|
||||||
"ApplicationMaxBufferSize": 30000000,
|
"ApplicationMaxBufferSize": 30000000,
|
||||||
"CloseTimeout": "00:00:10",
|
"CloseTimeout": "00:00:10",
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
using AyCode.Core.Enums;
|
using AyCode.Core.Enums;
|
||||||
using AyCode.Core.Loggers;
|
using AyCode.Core.Loggers;
|
||||||
using AyCode.Services.SignalRs;
|
using AyCode.Services.SignalRs;
|
||||||
using FruitBank.Common;
|
|
||||||
using FruitBank.Common.Loggers;
|
using FruitBank.Common.Loggers;
|
||||||
using FruitBank.Common.Models;
|
using FruitBank.Common.Models;
|
||||||
using FruitBank.Common.Services;
|
using FruitBank.Common.Services;
|
||||||
|
|
@ -47,10 +46,6 @@ namespace FruitBankHybrid
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hub-URL-ek EGY forrásból: az fbHub és a loggerHub is az AyCode:Urls:BaseUrl-ből származik.
|
|
||||||
FruitBankConstClient.BaseUrl = builder.Configuration["AyCode:Urls:BaseUrl"]
|
|
||||||
?? throw new InvalidOperationException("Hiányzik az 'AyCode:Urls:BaseUrl' az appsettings-ből — a hub-ok URL-je ebből származik.");
|
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
builder.Services.AddSingleton<IAcLogWriterClientBase, BrowserConsoleLogWriter>();
|
builder.Services.AddSingleton<IAcLogWriterClientBase, BrowserConsoleLogWriter>();
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -64,12 +59,7 @@ namespace FruitBankHybrid
|
||||||
|
|
||||||
// Bind SignalR options from configuration.
|
// Bind SignalR options from configuration.
|
||||||
// Precedence: code default → appsettings.json (this line) → any later Configure<T> action.
|
// Precedence: code default → appsettings.json (this line) → any later Configure<T> action.
|
||||||
builder.Services.Configure<AcHubConnectionOptions>(opts =>
|
builder.Services.Configure<AcHubConnectionOptions>(builder.Configuration.GetSection("AcHubConnection"));
|
||||||
{
|
|
||||||
builder.Configuration.GetSection("AcHubConnection").Bind(opts);
|
|
||||||
// Az fbHub URL a közös BaseUrl-ből (nem külön AcHubConnection:Url) — így nem tud eltérni a loggerHub-tól.
|
|
||||||
opts.Url = $"{FruitBankConstClient.BaseUrl}/{FruitBankConstClient.DefaultHubName}";
|
|
||||||
});
|
|
||||||
builder.Services.Configure<AcBinaryHubProtocolOptions>(builder.Configuration.GetSection("AcBinaryHubProtocol"));
|
builder.Services.Configure<AcBinaryHubProtocolOptions>(builder.Configuration.GetSection("AcBinaryHubProtocol"));
|
||||||
|
|
||||||
// Add device-specific services used by the FruitBankHybrid.Shared project
|
// Add device-specific services used by the FruitBankHybrid.Shared project
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue