Remove the 500-point bulk mapping cap
This commit is contained in:
1 parent
36b2057991
commit
353a1fb741
4 files changed
+10
-4
No files matched your search
@@ -20,9 +20,9 @@ public sealed partial class GatewayStore
|
||||
{
|
||||
public BulkMappingResult CreateBulkMappings(BulkMappingRequest request)
|
||||
{
|
||||
if (request.SourcePointIds is not { Length: >= 1 and <= 500 } || request.SourcePointIds.Distinct().Count() != request.SourcePointIds.Length ||
|
||||
if (request.SourcePointIds is not { Length: > 0 } || request.SourcePointIds.Distinct().Count() != request.SourcePointIds.Length ||
|
||||
!Enum.IsDefined(request.Target))
|
||||
throw new DomainValidationException("Bitte 1 bis 500 verschiedene Datenpunkte und ein gültiges Ziel auswählen.");
|
||||
throw new DomainValidationException("Bitte Datenpunkte ohne Duplikate und ein gültiges Ziel auswählen.");
|
||||
|
||||
using var connection = _database.OpenConnection();
|
||||
using var transaction = connection.BeginTransaction();
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<script src="/bacnet-browser.js?v=20261119-batch-2" defer></script>
|
||||
<script src="/mqtt-mapping-form.js?v=20261119-mqtt-template-1" defer></script>
|
||||
<script src="/gateway-status.js?v=20261119-status-1" defer></script>
|
||||
<script src="/mapping-batch.js?v=20261119-mqtt-template-1" defer></script>
|
||||
<script src="/mapping-batch.js?v=20261124-bulk-selection-1" defer></script>
|
||||
<script src="/mqtt-topic-browser.js?v=20261119-mqtt-browser-1" defer></script>
|
||||
<script src="/vendor/markdown-it-15.0.3.min.js" defer></script>
|
||||
<script src="/documentation.js?v=20261119-docs-1" defer></script>
|
||||
|
||||
@@ -156,7 +156,6 @@ function bindMappingBatch() {
|
||||
form.addEventListener('submit', async event => {
|
||||
event.preventDefault();
|
||||
if (running || selected.size === 0) return;
|
||||
if (selected.size > 500) { message.textContent = 'Maximal 500 Datenpunkte pro Sammelmapping.'; return; }
|
||||
const fields = new FormData(form);
|
||||
const mqtt = target.value === 'Mqtt';
|
||||
const monitoring = mqtt && fields.has('seMonitoring');
|
||||
|
||||
@@ -361,6 +361,13 @@ Assert(store.ListPoints().All(point => point.Id != sampledSourcePoint.Id) &&
|
||||
store.ListTrendRecords(sampledLog.Id, 10).Count == 2, "Removing a point must stop logging and preserve the history.");
|
||||
|
||||
await LtdFeatureTests.RunAsync(store, database, options, authenticatedAdmin!);
|
||||
|
||||
var bulkSources = Enumerable.Range(1, 501).Select(index => store.CreatePoint(new(
|
||||
$"Bulk source {index}", PointProtocol.Internal, PointScope.Internal, "Boolean", true, false, null, JsonElementFor("{}"))).Id).ToArray();
|
||||
var largeMapping = store.CreateBulkMappings(new(bulkSources, BulkMappingTarget.OpcUa));
|
||||
Assert(largeMapping is { Created: 501, Existing: 0 } && largeMapping.Assignments.Count == 501,
|
||||
"A single bulk mapping must accept a selection beyond the former 500-point limit.");
|
||||
|
||||
Console.WriteLine("Gateway smoke tests passed.");
|
||||
if (args.Contains("--preview", StringComparer.Ordinal)) Console.WriteLine($"Preview data: {dataDirectory}");
|
||||
|
||||
|
||||
Reference in new issue
Block a user